VTK
vtkPDataSetReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPDataSetReader.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
25 #ifndef __vtkPDataSetReader_h
26 #define __vtkPDataSetReader_h
27 
28 #include "vtkDataSetAlgorithm.h"
29 
30 class vtkDataSet;
31 
33 {
34 public:
35  void PrintSelf(ostream& os, vtkIndent indent);
37  static vtkPDataSetReader *New();
38 
40 
41  vtkSetStringMacro(FileName);
42  vtkGetStringMacro(FileName);
44 
46 
48  vtkGetMacro(DataType, int);
50 
52  int CanReadFile(const char* filename);
53 
54 protected:
57 
58  virtual int RequestDataObject(vtkInformation* request,
59  vtkInformationVector** inputVector,
60  vtkInformationVector* outputVector);
61  void ReadPVTKFileInformation(ifstream *fp,
62  vtkInformation* request,
63  vtkInformationVector** inputVector,
64  vtkInformationVector* outputVector);
65  void ReadVTKFileInformation(ifstream *fp,
66  vtkInformation* request,
67  vtkInformationVector** inputVector,
68  vtkInformationVector* outputVector);
69 
70  virtual int RequestData(vtkInformation*,
73  int PolyDataExecute(vtkInformation*,
76  int UnstructuredGridExecute(vtkInformation*,
79  int ImageDataExecute(vtkInformation*,
82  int StructuredGridExecute(vtkInformation*,
85 
86  void CoverExtent(int ext[6], int *pieceMask);
87 
88  vtkDataSet *CheckOutput();
89  void SetNumberOfPieces(int num);
90 
91 //BTX
92  ifstream *OpenFile(const char *);
93 //ETX
94  int ReadXML(ifstream *file, char **block, char **param, char **value);
95  void SkipFieldData(ifstream *file);
96 
99  char *FileName;
100  int DataType;
104 
105 private:
106  vtkPDataSetReader(const vtkPDataSetReader&); // Not implemented
107  void operator=(const vtkPDataSetReader&); // Not implemented
108 };
109 
110 #endif