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 "vtkXMLPDataReader.h"
30 
31 class vtkExtentSplitter;
33 //class vtkTableExtentTranslator;
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
46  virtual vtkExtentTranslator* GetExtentTranslator();
47 
48  // For the specified port, copy the information this reader sets up in
49  // SetupOutputInformation to outInfo
50  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
51 protected:
54 
57  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
58  void CopyArrayForCells(vtkDataArray* inArray, vtkDataArray* outArray);
59 
60  virtual void SetOutputExtent(int* extent)=0;
61  virtual void GetPieceInputExtent(int index, int* extent)=0;
62 
63  // Pipeline execute data driver. Called by vtkXMLReader.
64  void ReadXMLData();
66 
67  void SetupOutputData();
68 
69  void SetupPieces(int numPieces);
70  void DestroyPieces();
71  int ReadPiece(vtkXMLDataElement* ePiece);
72  int ReadPieceData();
73  void CopySubExtent(int* inExtent, int* inDimensions, vtkIdType* inIncrements,
74  int* outExtent,int* outDimensions,vtkIdType* outIncrements,
75  int* subExtent, int* subDimensions,
76  vtkDataArray* inArray, vtkDataArray* outArray);
77  int ComputePieceSubExtents();
78 
79  //vtkTableExtentTranslator* ExtentTranslator;
81 
82  // The extent to be updated in the output.
83  int UpdateExtent[6];
84  int PointDimensions[3];
85  vtkIdType PointIncrements[3];
86  int CellDimensions[3];
87  vtkIdType CellIncrements[3];
88 
89  // The extent currently being read from a piece.
90  int SubExtent[6];
91  int SubPointDimensions[3];
92  int SubCellDimensions[3];
93  int SubPieceExtent[6];
94  int SubPiecePointDimensions[3];
95  vtkIdType SubPiecePointIncrements[3];
96  int SubPieceCellDimensions[3];
97  vtkIdType SubPieceCellIncrements[3];
98 
99  // Information per-piece.
101 
102  virtual int RequestInformation(vtkInformation *request,
103  vtkInformationVector **inputVector,
104  vtkInformationVector *outputVector);
105 
106 private:
107  vtkXMLPStructuredDataReader(const vtkXMLPStructuredDataReader&); // Not implemented.
108  void operator=(const vtkXMLPStructuredDataReader&); // Not implemented.
109 };
110 
111 #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)
Generates a structured extent from unstructured.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:255
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Split an extent across other extents.
a simple class to control print indentation
Definition: vtkIndent.h:37
Superclass for parallel structured data XML readers.
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.
#define VTK_IO_EXPORT
virtual void SetupPieces(int numPieces)
virtual void DestroyPieces()