VTK
dox/IO/Parallel/vtkPDataSetReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPDataSetReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00025 #ifndef __vtkPDataSetReader_h
00026 #define __vtkPDataSetReader_h
00027 
00028 #include "vtkIOParallelModule.h" // For export macro
00029 #include "vtkDataSetAlgorithm.h"
00030 
00031 class vtkDataSet;
00032 
00033 class VTKIOPARALLEL_EXPORT vtkPDataSetReader : public vtkDataSetAlgorithm
00034 {
00035 public:
00036   void PrintSelf(ostream& os, vtkIndent indent);
00037   vtkTypeMacro(vtkPDataSetReader,vtkDataSetAlgorithm);
00038   static vtkPDataSetReader *New();
00039 
00041 
00042   vtkSetStringMacro(FileName);
00043   vtkGetStringMacro(FileName);
00045 
00047 
00049   vtkGetMacro(DataType, int);
00051 
00053   int CanReadFile(const char* filename);
00054 
00055 protected:
00056   vtkPDataSetReader();
00057   ~vtkPDataSetReader();
00058 
00059   virtual int RequestDataObject(vtkInformation* request,
00060                                 vtkInformationVector** inputVector,
00061                                 vtkInformationVector* outputVector);
00062   void ReadPVTKFileInformation(ifstream *fp,
00063                                vtkInformation* request,
00064                                vtkInformationVector** inputVector,
00065                                vtkInformationVector* outputVector);
00066   void ReadVTKFileInformation(ifstream *fp,
00067                                vtkInformation* request,
00068                                vtkInformationVector** inputVector,
00069                                vtkInformationVector* outputVector);
00070 
00071   virtual int RequestData(vtkInformation*,
00072                           vtkInformationVector**,
00073                           vtkInformationVector*);
00074   int PolyDataExecute(vtkInformation*,
00075                       vtkInformationVector**,
00076                       vtkInformationVector*);
00077   int UnstructuredGridExecute(vtkInformation*,
00078                               vtkInformationVector**,
00079                               vtkInformationVector*);
00080   int ImageDataExecute(vtkInformation*,
00081                        vtkInformationVector**,
00082                        vtkInformationVector*);
00083   int StructuredGridExecute(vtkInformation*,
00084                             vtkInformationVector**,
00085                             vtkInformationVector*);
00086 
00087   void CoverExtent(int ext[6], int *pieceMask);
00088 
00089   vtkDataSet *CheckOutput();
00090   void SetNumberOfPieces(int num);
00091 
00092 //BTX
00093   ifstream *OpenFile(const char *);
00094 //ETX
00095   int ReadXML(ifstream *file, char **block, char **param, char **value);
00096   void SkipFieldData(ifstream *file);
00097 
00098   int VTKFileFlag;
00099   int StructuredFlag;
00100   char *FileName;
00101   int DataType;
00102   int NumberOfPieces;
00103   char **PieceFileNames;
00104   int **PieceExtents;
00105 
00106 private:
00107   vtkPDataSetReader(const vtkPDataSetReader&); // Not implemented
00108   void operator=(const vtkPDataSetReader&); // Not implemented
00109 };
00110 
00111 #endif