VTK
vtkXMLStructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLStructuredDataReader.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 =========================================================================*/
27 #ifndef vtkXMLStructuredDataReader_h
28 #define vtkXMLStructuredDataReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
31 #include "vtkXMLDataReader.h"
32 
33 
34 class VTKIOXML_EXPORT vtkXMLStructuredDataReader : public vtkXMLDataReader
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
39 
43  vtkIdType GetNumberOfPoints() VTK_OVERRIDE;
44 
48  vtkIdType GetNumberOfCells() VTK_OVERRIDE;
49 
51 
57  vtkSetMacro(WholeSlices, int);
58  vtkGetMacro(WholeSlices, int);
59  vtkBooleanMacro(WholeSlices, int);
61 
66  void CopyOutputInformation(vtkInformation *outInfo, int port) VTK_OVERRIDE;
67 
68 protected:
70  ~vtkXMLStructuredDataReader() VTK_OVERRIDE;
71 
72  virtual void SetOutputExtent(int* extent)=0;
73  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) VTK_OVERRIDE;
74 
75  // Pipeline execute data driver. Called by vtkXMLReader.
76  void ReadXMLData() VTK_OVERRIDE;
77 
78  void SetupOutputInformation(vtkInformation *outInfo) VTK_OVERRIDE;
79 
80  // Internal representation of pieces in the file that may have come
81  // from a streamed write.
82  int* PieceExtents;
83  int* PiecePointDimensions;
84  vtkIdType* PiecePointIncrements;
85  int* PieceCellDimensions;
86  vtkIdType* PieceCellIncrements;
87 
88  // Whether to read in whole slices mode.
89  int WholeSlices;
90 
91  // The update extent and corresponding increments and dimensions.
92  int UpdateExtent[6];
93  int PointDimensions[3];
94  int CellDimensions[3];
95  vtkIdType PointIncrements[3];
96  vtkIdType CellIncrements[3];
97 
98  int WholeExtent[6];
99 
100  // The extent currently being read.
101  int SubExtent[6];
102  int SubPointDimensions[3];
103  int SubCellDimensions[3];
104 
105  // Override methods from superclass.
106  void SetupEmptyOutput() VTK_OVERRIDE;
107  void SetupPieces(int numPieces) VTK_OVERRIDE;
108  void DestroyPieces() VTK_OVERRIDE;
109  int ReadArrayForPoints(vtkXMLDataElement* da,
110  vtkAbstractArray* outArray) VTK_OVERRIDE;
111  int ReadArrayForCells(vtkXMLDataElement* da,
112  vtkAbstractArray* outArray) VTK_OVERRIDE;
113 
114  // Internal utility methods.
115  int ReadPiece(vtkXMLDataElement* ePiece) VTK_OVERRIDE;
116  virtual int ReadSubExtent(
117  int* inExtent, int* inDimensions, vtkIdType* inIncrements,
118  int* outExtent,int* outDimensions,vtkIdType* outIncrements,
119  int* subExtent, int* subDimensions, vtkXMLDataElement* da,
121 
122 private:
123  vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&) VTK_DELETE_FUNCTION;
124  void operator=(const vtkXMLStructuredDataReader&) VTK_DELETE_FUNCTION;
125 };
126 
127 #endif
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
Superclass for structured data XML readers.
int vtkIdType
Definition: vtkType.h:345
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual vtkIdType GetNumberOfPoints()=0
Get the number of points in the output.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Superclass for VTK XML file readers.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.