VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 //class vtkTableExtentTranslator;
36 
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
47  virtual vtkExtentTranslator* GetExtentTranslator();
48 
49  // For the specified port, copy the information this reader sets up in
50  // SetupOutputInformation to outInfo
51  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
52 protected:
55 
58  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
59  void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
60 
61  virtual void SetOutputExtent(int* extent)=0;
62  virtual void GetPieceInputExtent(int index, int* extent)=0;
63 
64  // Pipeline execute data driver. Called by vtkXMLReader.
65  void ReadXMLData();
67 
68  void SetupOutputData();
69 
70  void SetupPieces(int numPieces);
71  void DestroyPieces();
72  int ReadPiece(vtkXMLDataElement* ePiece);
73  int ReadPieceData();
74  void CopySubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
75  int* outExtent,int* outDimensions,vtkIdType* outIncrements,
76  int* subExtent, int* subDimensions,
77  vtkDataArray* inArray, vtkDataArray* outArray);
78  int ComputePieceSubExtents();
79 
80  //vtkTableExtentTranslator* ExtentTranslator;
82 
83  // The extent to be updated in the output.
84  int UpdateExtent[6];
85  int PointDimensions[3];
86  vtkIdType PointIncrements[3];
87  int CellDimensions[3];
88  vtkIdType CellIncrements[3];
89 
90  // The extent currently being read from a piece.
91  int SubExtent[6];
92  int SubPointDimensions[3];
93  int SubCellDimensions[3];
94  int SubPieceExtent[6];
95  int SubPiecePointDimensions[3];
96  vtkIdType SubPiecePointIncrements[3];
97  int SubPieceCellDimensions[3];
98  vtkIdType SubPieceCellIncrements[3];
99 
100  // Information per-piece.
102 
103  virtual int RequestInformation(vtkInformation *request,
104  vtkInformationVector **inputVector,
105  vtkInformationVector *outputVector);
106 
107 private:
108  vtkXMLPStructuredDataReader(const vtkXMLPStructuredDataReader&); // Not implemented.
109  void operator=(const vtkXMLPStructuredDataReader&); // Not implemented.
110 };
111 
112 #endif
virtual vtkIdType GetNumberOfPoints()=0
Represents an XML element and those nested inside.
GLuint index
Definition: vtkgl.h:11983
Store vtkAlgorithm input/output information.
Superclass for structured data XML readers.
virtual vtkIdType GetNumberOfCells()=0
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Generates a structured extent from unstructured.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:268
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
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:53
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()