VTK  9.4.20250206
vtkXMLPTableReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
20#ifndef vtkXMLPTableReader_h
21#define vtkXMLPTableReader_h
22
23#include "vtkIOXMLModule.h" // For export macro
25
26VTK_ABI_NAMESPACE_BEGIN
27class vtkTable;
29
30class VTKIOXML_EXPORT vtkXMLPTableReader : public vtkXMLPDataObjectReader
31{
32public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
36
38
44
49 void CopyOutputInformation(vtkInformation* outInfo, int port) override;
50
55
60 const char* GetColumnArrayName(int index);
61
63
67 int GetColumnArrayStatus(const char* name);
68 void SetColumnArrayStatus(const char* name, int status);
70
75 vtkGetObjectMacro(ColumnSelection, vtkDataArraySelection);
76
77protected:
80
84 const char* GetDataSetName() override;
85
90
96
98
100
104 void GetOutputUpdateExtent(int& piece, int& numberOfPieces);
105
109 void SetupEmptyOutput() override;
110
114 void SetupOutputData() override;
115
119 void SetupOutputInformation(vtkInformation* outInfo) override;
120
125
130
134 void SetupPieces(int numPieces) override;
135
139 void SetupUpdateExtent(int piece, int numberOfPieces);
140
144 void ReadXMLData() override;
145
149 int CanReadPiece(int index) override;
150
154 int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
155
159 void DestroyPieces() override;
160
162
166 int ReadPiece(vtkXMLDataElement* ePiece) override;
167
171 int ReadPieceData(int index);
172
177
182
184
186 vtkInformationVector* outputVector) override;
187
191 void PieceProgressCallback() override;
192
196 int ColumnIsEnabled(vtkXMLDataElement* elementRowData);
197
199 const char* GetRowArrayName(int index);
200
206
214
216
221
223
224private:
225 vtkXMLPTableReader(const vtkXMLPTableReader&) = delete;
226 void operator=(const vtkXMLPTableReader&) = delete;
227};
228
229VTK_ABI_NAMESPACE_END
230#endif
Store on/off settings for data arrays, etc.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
Represents an XML element and those nested inside.
Superclass for PVTK XML file readers.
int ReadPiece(vtkXMLDataElement *ePiece, int index)
Setup the piece reader at the given index.
Read PVTK XML Table files.
const char * GetRowArrayName(int index)
void DestroyPieces() override
Delete all piece readers and related information.
vtkTable * GetOutput()
Get the reader's output.
int ColumnIsEnabled(vtkXMLDataElement *elementRowData)
Check whether the given array element is an enabled array.
int GetColumnArrayStatus(const char *name)
Get/Set whether the column array with the given name is to be read.
void GetOutputUpdateExtent(int &piece, int &numberOfPieces)
Get the current piece index and the total number of piece in the dataset.
vtkXMLTableReader * CreatePieceReader()
Create a reader according to the data to read.
virtual vtkIdType GetNumberOfRowsInPiece(int piece)
Get the number of rows in the given piece.
void SetupUpdateExtent(int piece, int numberOfPieces)
Setup the extent for the parallel reader and the piece readers.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
void PieceProgressCallback() override
Callback registered with the PieceProgressObserver.
vtkXMLDataElement * PRowElement
The PRowData element representations.
int ReadPieceData(int index)
Read piece at the given index RowData.
void SetupNextPiece()
Initialize the index of the first row to be read in the next piece.
void SetupOutputInformation(vtkInformation *outInfo) override
Setup the output's information.
int FillOutputPortInformation(int, vtkInformation *) override
Fill the output port information objects for this algorithm.
vtkTable * GetOutputAsTable()
void ReadXMLData() override
Setup the readers and then read the input data.
vtkTable * GetOutput(int idx)
Get the reader's output.
vtkDataArraySelection * ColumnSelection
vtkIdType GetNumberOfRows()
Get the number of rows of the table.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Pipeline execute data driver.
void SetColumnArrayStatus(const char *name, int status)
Get/Set whether the column array with the given name is to be read.
void SetupOutputTotals()
Initialize the total number of rows to be read.
int GetNumberOfColumnArrays()
Get the number of columns arrays available in the input.
int UpdatePieceId
The update request.
const char * GetColumnArrayName(int index)
Get the name of the column with the given index in the input.
int ReadPiece(vtkXMLDataElement *ePiece) override
Setup the current piece reader.
void SetupOutputData() override
Initialize current output data: allocate arrays for RowData.
int CanReadPiece(int index) override
Whether or not the current reader can read the current piece.
void SetupEmptyOutput() override
Initialize current output.
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...
void SetupPieces(int numPieces) override
Setup the number of pieces to be read and allocate space accordingly.
int StartPiece
The range of pieces from the file that will form the UpdatePiece.
vtkXMLTableReader ** PieceReaders
int ReadPieceData()
Actually read the current piece data.
vtkTable * GetPieceInputAsTable(int piece)
static vtkXMLPTableReader * New()
const char * GetDataSetName() override
Return the type of the dataset being read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkXMLPTableReader() override
Read VTK XML Table files.
int vtkIdType
Definition vtkType.h:315