VTK  9.0.1
vtkXMLPTableReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPTableReader.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 =========================================================================*/
29 #ifndef vtkXMLPTableReader_h
30 #define vtkXMLPTableReader_h
31 
32 #include "vtkIOXMLModule.h" // For export macro
34 
35 class vtkTable;
36 class vtkXMLTableReader;
37 
38 class VTKIOXML_EXPORT vtkXMLPTableReader : public vtkXMLPDataObjectReader
39 {
40 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43  static vtkXMLPTableReader* New();
44 
46 
49  vtkTable* GetOutput();
50  vtkTable* GetOutput(int idx);
52 
57  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
58 
63 
68  const char* GetColumnArrayName(int index);
69 
71 
75  int GetColumnArrayStatus(const char* name);
76  void SetColumnArrayStatus(const char* name, int status);
78 
83  vtkGetObjectMacro(ColumnSelection, vtkDataArraySelection);
84 
85 protected:
87  ~vtkXMLPTableReader() override;
88 
92  const char* GetDataSetName() override;
93 
97  vtkIdType GetNumberOfRows();
98 
103  virtual vtkIdType GetNumberOfRowsInPiece(int piece);
104 
105  vtkTable* GetOutputAsTable();
106 
107  vtkTable* GetPieceInputAsTable(int piece);
108 
112  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
113 
117  void SetupEmptyOutput() override;
118 
122  void SetupOutputData() override;
123 
127  void SetupOutputInformation(vtkInformation* outInfo) override;
128 
132  void SetupOutputTotals();
133 
137  void SetupNextPiece();
138 
142  void SetupPieces(int numPieces) override;
143 
147  void SetupUpdateExtent(int piece, int numberOfPieces);
148 
152  void ReadXMLData() override;
153 
157  int CanReadPiece(int index) override;
158 
162  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
163 
167  void DestroyPieces() override;
168 
170 
174  int ReadPiece(vtkXMLDataElement* ePiece) override;
175 
179  int ReadPieceData(int index);
180 
184  int ReadPieceData();
185 
189  vtkXMLTableReader* CreatePieceReader();
190 
191  int FillOutputPortInformation(int, vtkInformation*) override;
192 
193  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
194  vtkInformationVector* outputVector) override;
195 
199  void PieceProgressCallback() override;
200 
204  int ColumnIsEnabled(vtkXMLDataElement* elementRowData);
205 
206  int GetNumberOfRowArrays();
207  const char* GetRowArrayName(int index);
208 
214 
219  int EndPiece;
222 
224 
229 
231 
232 private:
233  vtkXMLPTableReader(const vtkXMLPTableReader&) = delete;
234  void operator=(const vtkXMLPTableReader&) = delete;
235 };
236 
237 #endif
vtkXMLPDataObjectReader::ReadPiece
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.
vtkXMLPDataObjectReader
Superclass for PVTK XML file readers.
Definition: vtkXMLPDataObjectReader.h:29
vtkXMLReader::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkXMLReader::ReadPrimaryElement
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
vtkXMLPDataObjectReader::PieceProgressCallback
virtual void PieceProgressCallback()=0
vtkXMLPTableReader::ColumnSelection
vtkDataArraySelection * ColumnSelection
Definition: vtkXMLPTableReader.h:230
vtkXMLReader::GetColumnArrayStatus
int GetColumnArrayStatus(const char *name)
vtkXMLReader::GetNumberOfColumnArrays
int GetNumberOfColumnArrays()
vtkXMLPTableReader
Read PVTK XML Table files.
Definition: vtkXMLPTableReader.h:38
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:34
vtkXMLPTableReader::StartRow
vtkIdType StartRow
Definition: vtkXMLPTableReader.h:221
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkXMLPTableReader::TotalNumberOfRows
vtkIdType TotalNumberOfRows
Definition: vtkXMLPTableReader.h:220
vtkXMLReader::ReadXMLData
virtual void ReadXMLData()
vtkXMLReader::SetupEmptyOutput
virtual void SetupEmptyOutput()=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkXMLTableReader
Read VTK XML Table files.
Definition: vtkXMLTableReader.h:37
vtkXMLPDataObjectReader::DestroyPieces
virtual void DestroyPieces()
Delete all piece readers and related information.
vtkXMLReader::GetDataSetName
virtual const char * GetDataSetName()=0
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:36
vtkXMLPDataObjectReader::SetupOutputData
void SetupOutputData() override
Initialize the output data.
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkXMLPTableReader::UpdatePieceId
int UpdatePieceId
The update request.
Definition: vtkXMLPTableReader.h:212
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkXMLPTableReader::StartPiece
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
Definition: vtkXMLPTableReader.h:218
vtkXMLReader::GetColumnArrayName
const char * GetColumnArrayName(int index)
vtkXMLReader::SetupOutputInformation
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:201
vtkXMLPDataObjectReader::SetupPieces
virtual void SetupPieces(int numPieces)
Setup the number of pieces to be read and allocate space accordingly.
vtkXMLPTableReader::EndPiece
int EndPiece
Definition: vtkXMLPTableReader.h:219
vtkXMLPTableReader::PRowElement
vtkXMLDataElement * PRowElement
The PRowData element representations.
Definition: vtkXMLPTableReader.h:228
vtkXMLPDataObjectReader.h
vtkXMLReader::CopyOutputInformation
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:135
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkXMLPDataObjectReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
vtkXMLReader::SetColumnArrayStatus
void SetColumnArrayStatus(const char *name, int status)
vtkXMLPDataObjectReader::CanReadPiece
virtual int CanReadPiece(int index)=0
Whether or not the current reader can read the current piece.
vtkXMLPTableReader::PieceReaders
vtkXMLTableReader ** PieceReaders
Definition: vtkXMLPTableReader.h:223
vtkXMLPTableReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPTableReader.h:213