VTK
vtkXMLTableReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLTableReader.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 =========================================================================*/
24 #ifndef vtkXMLTableReader_h
25 #define vtkXMLTableReader_h
26 
27 #include "vtkIOXMLModule.h" // For export macro
28 #include "vtkXMLReader.h"
29 
30 class vtkCellArray;
31 class vtkIdTypeArray;
33 class vtkTable;
34 
35 class VTKIOXML_EXPORT vtkXMLTableReader : public vtkXMLReader
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40  static vtkXMLTableReader* New();
41 
43 
46  vtkTable* GetOutput();
47  vtkTable* GetOutput(int idx);
49 
53  vtkIdType GetNumberOfRows();
54 
58  vtkIdType GetNumberOfPieces();
59 
66  void SetupUpdateExtent(int piece, int numberOfPieces);
67 
72  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
73 
74 protected:
76  ~vtkXMLTableReader() override;
77 
81  int ColumnIsEnabled(vtkXMLDataElement* eRowData);
82 
83  void DestroyPieces();
84 
88  const char* GetDataSetName() override;
89 
93  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
94 
98  int RowDataNeedToReadTimeStep(vtkXMLDataElement* eNested);
99 
103  void SetupEmptyOutput() override;
104 
108  void SetupOutputTotals();
109 
113  void SetupNextPiece();
114 
118  void SetupOutputData() override;
119 
123  void SetupOutputInformation(vtkInformation* outInfo) override;
124 
128  void SetupPieces(int numPieces);
129 
133  void ReadXMLData() override;
134 
138  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
139 
143  int ReadPiece(vtkXMLDataElement* ePiece, int piece);
144 
148  int ReadPiece(vtkXMLDataElement* ePiece);
149 
153  int ReadPieceData(int);
154 
155  int FillOutputPortInformation(int, vtkInformation*) override;
156 
166  int EndPiece;
169 
175 
180 
184  int Piece;
185 
190 
196 
198  vtkTypeInt64* RowDataOffset;
199 
200 private:
201  vtkXMLTableReader(const vtkXMLTableReader&) = delete;
202  void operator=(const vtkXMLTableReader&) = delete;
203 };
204 
205 #endif
virtual const char * GetDataSetName()=0
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
int UpdatedPiece
The update request.
Read VTK XML Table files.
int NumberOfPieces
The number of Pieces of data found in the file.
int NumberOfColumns
The number of columns arrays in the output.
dynamic, self-adjusting array of vtkIdType
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:347
vtkXMLDataElement ** RowDataElements
The RowData element representations for each piece.
int Piece
The piece currently being read.
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkIdType * NumberOfRows
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:207
vtkTypeInt64 * RowDataOffset
dynamic, self-adjusting array of unsigned char
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkXMLDataElement ** RowElements
The Points element for each piece.
object to represent cell connectivity
Definition: vtkCellArray.h:44
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:136
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAlgorithm * New()
int StartPiece
The range of pieces from the file that will form the UpdatedPiece.
Superclass for VTK's XML format readers.
Definition: vtkXMLReader.h:43
virtual void SetupOutputData()