VTK
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 =========================================================================*/
26 #ifndef vtkXMLPStructuredDataReader_h
27 #define vtkXMLPStructuredDataReader_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLPDataReader.h"
31 
32 class vtkExtentSplitter;
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
41  // For the specified port, copy the information this reader sets up in
42  // SetupOutputInformation to outInfo
43  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
44 protected:
47 
50  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
51  void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
52 
53  virtual void SetOutputExtent(int* extent)=0;
54  virtual void GetPieceInputExtent(int index, int* extent)=0;
55 
56  // Pipeline execute data driver. Called by vtkXMLReader.
57  void ReadXMLData();
59 
60  void SetupOutputData();
61 
62  void SetupPieces(int numPieces);
63  void DestroyPieces();
64  int ReadPiece(vtkXMLDataElement* ePiece);
65  int ReadPieceData();
66  void CopySubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
67  int* outExtent,int* outDimensions,vtkIdType* outIncrements,
68  int* subExtent, int* subDimensions,
69  vtkDataArray* inArray, vtkDataArray* outArray);
70  int ComputePieceSubExtents();
71 
73 
74  // The extent to be updated in the output.
75  int UpdateExtent[6];
76  int PointDimensions[3];
77  vtkIdType PointIncrements[3];
78  int CellDimensions[3];
79  vtkIdType CellIncrements[3];
80 
81  // The extent currently being read from a piece.
82  int SubExtent[6];
83  int SubPointDimensions[3];
84  int SubCellDimensions[3];
85  int SubPieceExtent[6];
86  int SubPiecePointDimensions[3];
87  vtkIdType SubPiecePointIncrements[3];
88  int SubPieceCellDimensions[3];
89  vtkIdType SubPieceCellIncrements[3];
90 
91  // Information per-piece.
93 
94  virtual int RequestInformation(vtkInformation *request,
95  vtkInformationVector **inputVector,
96  vtkInformationVector *outputVector);
97 
98 private:
99  vtkXMLPStructuredDataReader(const vtkXMLPStructuredDataReader&); // Not implemented.
100  void operator=(const vtkXMLPStructuredDataReader&); // Not implemented.
101 };
102 
103 #endif
virtual vtkIdType GetNumberOfPoints()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
Superclass for structured data XML readers.
virtual vtkIdType GetNumberOfCells()=0
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:275
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Split an extent across other extents.
a simple class to control print indentation
Definition: vtkIndent.h:38
Superclass for parallel structured data XML readers.
#define VTKIOXML_EXPORT
int ReadPiece(vtkXMLDataElement *ePiece, int index)
virtual void CopyArrayForPoints(vtkDataArray *inArray, vtkDataArray *outArray)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
Superclass for PVTK XML file readers.
void PrintSelf(ostream &os, vtkIndent indent)
virtual int ReadPieceData()
virtual void CopyArrayForCells(vtkDataArray *inArray, vtkDataArray *outArray)=0
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
Store zero or more vtkInformation instances.
virtual void SetupPieces(int numPieces)
virtual void DestroyPieces()