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 =========================================================================*/
26 #ifndef vtkXMLStructuredDataReader_h
27 #define vtkXMLStructuredDataReader_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLDataReader.h"
31 
32 
34 {
35 public:
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40  virtual vtkIdType GetNumberOfPoints();
41 
43  virtual vtkIdType GetNumberOfCells();
44 
46 
50  vtkSetMacro(WholeSlices, int);
51  vtkGetMacro(WholeSlices, int);
52  vtkBooleanMacro(WholeSlices, int);
54 
56 
58  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
59 protected:
63 
64  virtual void SetOutputExtent(int* extent)=0;
66 
67  // Pipeline execute data driver. Called by vtkXMLReader.
68  void ReadXMLData();
69 
71 
72  // Internal representation of pieces in the file that may have come
73  // from a streamed write.
79 
80  // Whether to read in whole slices mode.
82 
83  // The update extent and corresponding increments and dimensions.
84  int UpdateExtent[6];
85  int PointDimensions[3];
86  int CellDimensions[3];
87  vtkIdType PointIncrements[3];
88  vtkIdType CellIncrements[3];
89 
90  int WholeExtent[6];
91 
92  // The extent currently being read.
93  int SubExtent[6];
94  int SubPointDimensions[3];
95  int SubCellDimensions[3];
96 
97  // Override methods from superclass.
98  void SetupEmptyOutput();
99  void SetupPieces(int numPieces);
100  void DestroyPieces();
101  virtual int ReadArrayForPoints(vtkXMLDataElement* da,
102  vtkAbstractArray* outArray);
103  virtual int ReadArrayForCells(vtkXMLDataElement* da,
104  vtkAbstractArray* outArray);
105 
106  // Internal utility methods.
107  int ReadPiece(vtkXMLDataElement* ePiece);
108  virtual int ReadSubExtent(
109  int* inExtent, int* inDimensions, vtkIdType* inIncrements,
110  int* outExtent,int* outDimensions,vtkIdType* outIncrements,
111  int* subExtent, int* subDimensions, vtkXMLDataElement* da,
113 
114 private:
115  vtkXMLStructuredDataReader(const vtkXMLStructuredDataReader&); // Not implemented.
116  void operator=(const vtkXMLStructuredDataReader&); // Not implemented.
117 };
118 
119 #endif
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual void SetupOutputInformation(vtkInformation *outInfo)
Abstract superclass for all arrays.
Superclass for structured data XML readers.
int vtkIdType
Definition: vtkType.h:275
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void DestroyPieces()
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void SetupPieces(int numPieces)
#define VTKIOXML_EXPORT
virtual vtkIdType GetNumberOfPoints()=0
virtual int ReadArrayForPoints(vtkXMLDataElement *da, vtkAbstractArray *outArray)
virtual vtkIdType GetNumberOfCells()=0
virtual void ReadXMLData()
Superclass for VTK XML file readers.
int ReadPiece(vtkXMLDataElement *ePiece, int piece)
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
virtual int ReadArrayForCells(vtkXMLDataElement *da, vtkAbstractArray *outArray)