VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/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 RequestInformation(vtkInformation*,
00072                                  vtkInformationVector**,
00073                                  vtkInformationVector*);
00074 
00075   virtual int RequestData(vtkInformation*,
00076                           vtkInformationVector**,
00077                           vtkInformationVector*);
00078   int PolyDataExecute(vtkInformation*,
00079                       vtkInformationVector**,
00080                       vtkInformationVector*);
00081   int UnstructuredGridExecute(vtkInformation*,
00082                               vtkInformationVector**,
00083                               vtkInformationVector*);
00084   int ImageDataExecute(vtkInformation*,
00085                        vtkInformationVector**,
00086                        vtkInformationVector*);
00087   int StructuredGridExecute(vtkInformation*,
00088                             vtkInformationVector**,
00089                             vtkInformationVector*);
00090 
00091   void CoverExtent(int ext[6], int *pieceMask);
00092 
00093   vtkDataSet *CheckOutput();
00094   void SetNumberOfPieces(int num);
00095 
00096 //BTX
00097   ifstream *OpenFile(const char *);
00098 //ETX
00099   int ReadXML(ifstream *file, char **block, char **param, char **value);
00100   void SkipFieldData(ifstream *file);
00101 
00102   int VTKFileFlag;
00103   int StructuredFlag;
00104   char *FileName;
00105   int DataType;
00106   int NumberOfPieces;
00107   char **PieceFileNames;
00108   int **PieceExtents;
00109 
00110 private:
00111   vtkPDataSetReader(const vtkPDataSetReader&); // Not implemented
00112   void operator=(const vtkPDataSetReader&); // Not implemented
00113 };
00114 
00115 #endif