VTK  9.1.0
vtkXMLPStructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPStructuredDataReader.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 =========================================================================*/
27 #ifndef vtkXMLPStructuredDataReader_h
28 #define vtkXMLPStructuredDataReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
31 #include "vtkXMLPDataReader.h"
32 
33 class vtkAbstractArray;
34 class vtkExtentSplitter;
36 
37 class VTKIOXML_EXPORT vtkXMLPStructuredDataReader : public vtkXMLPDataReader
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
43  // For the specified port, copy the information this reader sets up in
44  // SetupOutputInformation to outInfo
45  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
46 
47 protected:
50 
53  void CopyArrayForPoints(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
54  void CopyArrayForCells(vtkAbstractArray* inArray, vtkAbstractArray* outArray) override;
55 
56  virtual void SetOutputExtent(int* extent) = 0;
57  virtual void GetPieceInputExtent(int index, int* extent) = 0;
58 
59  // Pipeline execute data driver. Called by vtkXMLReader.
60  void ReadXMLData() override;
61  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
62 
63  void SetupOutputData() override;
64 
65  void SetupPieces(int numPieces) override;
66  void DestroyPieces() override;
67  int ReadPiece(vtkXMLDataElement* ePiece) override;
68  int ReadPieceData() override;
69  void CopySubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements, int* outExtent,
70  int* outDimensions, vtkIdType* outIncrements, int* subExtent, int* subDimensions,
71  vtkAbstractArray* inArray, vtkAbstractArray* outArray);
73 
75 
76  // The extent to be updated in the output.
77  int UpdateExtent[6];
78  int PointDimensions[3];
79  vtkIdType PointIncrements[3];
80  int CellDimensions[3];
81  vtkIdType CellIncrements[3];
82 
83  // The extent currently being read from a piece.
84  int SubExtent[6];
85  int SubPointDimensions[3];
86  int SubCellDimensions[3];
87  int SubPieceExtent[6];
88  int SubPiecePointDimensions[3];
89  vtkIdType SubPiecePointIncrements[3];
90  int SubPieceCellDimensions[3];
91  vtkIdType SubPieceCellIncrements[3];
92 
93  // Information per-piece.
95 
97  vtkInformationVector* outputVector) override;
98 
99 private:
101  void operator=(const vtkXMLPStructuredDataReader&) = delete;
102 };
103 
104 #endif
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkXMLPStructuredDataReader::PieceExtents
int * PieceExtents
Definition: vtkXMLPStructuredDataReader.h:94
vtkXMLPStructuredDataReader::ReadPieceData
int ReadPieceData() override
Actually read the current piece data.
vtkXMLPStructuredDataReader::ComputePieceSubExtents
int ComputePieceSubExtents()
vtkXMLPStructuredDataReader::~vtkXMLPStructuredDataReader
~vtkXMLPStructuredDataReader() override
vtkXMLPStructuredDataReader::ReadXMLData
void ReadXMLData() override
vtkXMLPStructuredDataReader::ReadPiece
int ReadPiece(vtkXMLDataElement *ePiece) override
Setup the current piece reader.
vtkXMLPStructuredDataReader
Superclass for parallel structured data XML readers.
Definition: vtkXMLPStructuredDataReader.h:38
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkXMLPStructuredDataReader::SetupPieces
void SetupPieces(int numPieces) override
Setup the number of pieces to be read and allocate space accordingly.
vtkXMLPStructuredDataReader::CopyArrayForCells
void CopyArrayForCells(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
vtkXMLPDataReader.h
vtkXMLPStructuredDataReader::GetPieceInputExtent
virtual void GetPieceInputExtent(int index, int *extent)=0
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkXMLPStructuredDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkXMLPStructuredDataReader::SetOutputExtent
virtual void SetOutputExtent(int *extent)=0
vtkXMLPStructuredDataReader::ExtentSplitter
vtkExtentSplitter * ExtentSplitter
Definition: vtkXMLPStructuredDataReader.h:74
vtkXMLPStructuredDataReader::SetupOutputData
void SetupOutputData() override
Initialize the output data.
vtkXMLPStructuredDataReader::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:37
vtkXMLPStructuredDataReader::CopyOutputInformation
void CopyOutputInformation(vtkInformation *outInfo, int port) override
vtkXMLStructuredDataReader
Superclass for structured data XML readers.
Definition: vtkXMLStructuredDataReader.h:34
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkXMLPStructuredDataReader::CopyArrayForPoints
void CopyArrayForPoints(vtkAbstractArray *inArray, vtkAbstractArray *outArray) override
vtkExtentSplitter
Split an extent across other extents.
Definition: vtkExtentSplitter.h:38
vtkXMLPStructuredDataReader::vtkXMLPStructuredDataReader
vtkXMLPStructuredDataReader()
vtkXMLPStructuredDataReader::ReadPrimaryElement
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the information relative to the dataset and allocate the needed structures according to it.
vtkXMLPStructuredDataReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints() override
vtkXMLPStructuredDataReader::DestroyPieces
void DestroyPieces() override
Delete all piece readers and related information.
vtkX3D::extent
@ extent
Definition: vtkX3D.h:351
vtkXMLPStructuredDataReader::CopySubExtent
void CopySubExtent(int *inExtent, int *inDimensions, vtkIdType *inIncrements, int *outExtent, int *outDimensions, vtkIdType *outIncrements, int *subExtent, int *subDimensions, vtkAbstractArray *inArray, vtkAbstractArray *outArray)
vtkXMLPDataReader
Superclass for PVTK XML file readers that read vtkDataSets.
Definition: vtkXMLPDataReader.h:38
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkXMLPStructuredDataReader::GetNumberOfCells
vtkIdType GetNumberOfCells() override