VTK
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 =========================================================================*/
32 #ifndef vtkXMLPTableReader_h
33 #define vtkXMLPTableReader_h
34 
35 #include "vtkIOXMLModule.h" // For export macro
37 
38 class vtkTable;
39 class vtkXMLTableReader;
40 
41 class VTKIOXML_EXPORT vtkXMLPTableReader : public vtkXMLPDataObjectReader
42 {
43 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46  static vtkXMLPTableReader* New();
47 
49 
52  vtkTable* GetOutput();
53  vtkTable* GetOutput(int idx);
55 
60  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
61 
66 
71  const char* GetColumnArrayName(int index);
72 
74 
78  int GetColumnArrayStatus(const char* name);
79  void SetColumnArrayStatus(const char* name, int status);
81 
86  vtkGetObjectMacro(ColumnSelection, vtkDataArraySelection);
87 
88 protected:
90  ~vtkXMLPTableReader() override;
91 
95  const char* GetDataSetName() override;
96 
100  vtkIdType GetNumberOfRows();
101 
106  virtual vtkIdType GetNumberOfRowsInPiece(int piece);
107 
108  vtkTable* GetOutputAsTable();
109 
110  vtkTable* GetPieceInputAsTable(int piece);
111 
115  void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
116 
120  void SetupEmptyOutput() override;
121 
125  void SetupOutputData() override;
126 
130  void SetupOutputInformation(vtkInformation* outInfo) override;
131 
135  void SetupOutputTotals();
136 
140  void SetupNextPiece();
141 
145  void SetupPieces(int numPieces) override;
146 
150  void SetupUpdateExtent(int piece, int numberOfPieces);
151 
155  void ReadXMLData() override;
156 
160  int CanReadPiece(int index) override;
161 
165  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
166 
170  void DestroyPieces() override;
171 
173 
177  int ReadPiece(vtkXMLDataElement* ePiece) override;
178 
182  int ReadPieceData(int index);
183 
187  int ReadPieceData();
188 
192  vtkXMLTableReader* CreatePieceReader();
193 
194  int FillOutputPortInformation(int, vtkInformation*) override;
195 
196  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
197  vtkInformationVector* outputVector) override;
198 
202  void PieceProgressCallback() override;
203 
207  int ColumnIsEnabled(vtkXMLDataElement* elementRowData);
208 
209  int GetNumberOfRowArrays();
210  const char* GetRowArrayName(int index);
211 
217 
222  int EndPiece;
225 
227 
232 
234 
235 private:
236  vtkXMLPTableReader(const vtkXMLPTableReader&) = delete;
237  void operator=(const vtkXMLPTableReader&) = delete;
238 };
239 
240 #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:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkXMLPDataObjectReader::PieceProgressCallback
virtual void PieceProgressCallback()=0
vtkXMLPTableReader::ColumnSelection
vtkDataArraySelection * ColumnSelection
Definition: vtkXMLPTableReader.h:233
vtkXMLReader::GetColumnArrayStatus
int GetColumnArrayStatus(const char *name)
vtkXMLReader::GetNumberOfColumnArrays
int GetNumberOfColumnArrays()
vtkXMLPTableReader
Read PVTK XML Table files.
Definition: vtkXMLPTableReader.h:41
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:37
vtkXMLPTableReader::StartRow
vtkIdType StartRow
Definition: vtkXMLPTableReader.h:224
vtkX3D::port
Definition: vtkX3D.h:447
vtkXMLPTableReader::UpdatePiece
int UpdatePiece
The update request.
Definition: vtkXMLPTableReader.h:215
vtkXMLPTableReader::TotalNumberOfRows
vtkIdType TotalNumberOfRows
Definition: vtkXMLPTableReader.h:223
vtkXMLReader::ReadXMLData
virtual void ReadXMLData()
vtkXMLReader::SetupEmptyOutput
virtual void SetupEmptyOutput()=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXMLTableReader
Read VTK XML Table files.
Definition: vtkXMLTableReader.h:38
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
Definition: vtkX3D.h:219
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkXMLPTableReader::StartPiece
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
Definition: vtkXMLPTableReader.h:221
vtkXMLReader::GetColumnArrayName
const char * GetColumnArrayName(int index)
vtkXMLReader::SetupOutputInformation
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:207
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:222
vtkXMLPTableReader::PRowElement
vtkXMLDataElement * PRowElement
The PRowData element representations.
Definition: vtkXMLPTableReader.h:231
vtkXMLPDataObjectReader.h
vtkXMLReader::CopyOutputInformation
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:136
vtkX3D::index
Definition: vtkX3D.h:246
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:226
vtkXMLPTableReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPTableReader.h:216