VTK
vtkXMLPUnstructuredDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPUnstructuredDataReader.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 =========================================================================*/
25 #ifndef vtkXMLPUnstructuredDataReader_h
26 #define vtkXMLPUnstructuredDataReader_h
27 
28 #include "vtkIOXMLModule.h" // For export macro
29 #include "vtkXMLPDataReader.h"
30 
31 class vtkPointSet;
32 class vtkCellArray;
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 
45 protected:
48 
49  virtual int RequestInformation(vtkInformation *request,
50  vtkInformationVector **inputVector,
51  vtkInformationVector *outputVector);
52 
53 
56  virtual void SetupOutputTotals();
57  virtual void SetupNextPiece();
60  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
61 
63 
64  // Setup the output's information.
66 
68  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
69  int& ghostLevel)=0;
70 
71  // Pipeline execute data driver. Called by vtkXMLReader.
72  void ReadXMLData();
74  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
75 
77  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
78  vtkCellArray* outCells);
79 
80  // Get the number of points/cells in the given piece. Valid after
81  // UpdateInformation.
82  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
83  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
84 
85  // The update request.
89 
90  // The range of pieces from the file that will form the UpdatePiece.
92  int EndPiece;
96 
97  // The PPoints element with point information.
99 
100 private:
102  void operator=(const vtkXMLPUnstructuredDataReader&); // Not implemented.
103 };
104 
105 #endif
vtkXMLPUnstructuredDataReader::ReadPieceData
int ReadPieceData()
VTKIOXML_EXPORT
#define VTKIOXML_EXPORT
Definition: vtkIOXMLModule.h:15
vtkXMLPUnstructuredDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkXMLPUnstructuredDataReader::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkXMLPUnstructuredDataReader
Superclass for parallel unstructured data XML readers.
Definition: vtkXMLPUnstructuredDataReader.h:36
vtkXMLPUnstructuredDataReader::CopyArrayForPoints
void CopyArrayForPoints(vtkDataArray *inArray, vtkDataArray *outArray)
vtkXMLPUnstructuredDataReader::GetNumberOfCells
vtkIdType GetNumberOfCells()
vtkXMLPUnstructuredDataReader::GetNumberOfCellsInPiece
virtual vtkIdType GetNumberOfCellsInPiece(int piece)
vtkIdType
int vtkIdType
Definition: vtkType.h:275
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkXMLPUnstructuredDataReader::SetupUpdateExtent
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkXMLPUnstructuredDataReader::GetNumberOfPointsInPiece
virtual vtkIdType GetNumberOfPointsInPiece(int piece)
vtkXMLPUnstructuredDataReader::~vtkXMLPUnstructuredDataReader
~vtkXMLPUnstructuredDataReader()
vtkXMLPUnstructuredDataReader::ReadXMLData
void ReadXMLData()
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkXMLPUnstructuredDataReader::EndPiece
int EndPiece
Definition: vtkXMLPUnstructuredDataReader.h:92
vtkXMLPUnstructuredDataReader::vtkXMLPUnstructuredDataReader
vtkXMLPUnstructuredDataReader()
vtkXMLPUnstructuredDataReader::SetupOutputInformation
void SetupOutputInformation(vtkInformation *outInfo)
vtkIOXMLModule.h
vtkXMLPUnstructuredDataReader::CopyCellArray
void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray *inCells, vtkCellArray *outCells)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkXMLPUnstructuredDataReader::UpdatePiece
int UpdatePiece
Definition: vtkXMLPUnstructuredDataReader.h:86
vtkXMLPDataReader.h
vtkXMLPUnstructuredDataReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints()
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:37
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkXMLPUnstructuredDataReader::StartPoint
vtkIdType StartPoint
Definition: vtkXMLPUnstructuredDataReader.h:95
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:50
vtkXMLPUnstructuredDataReader::ReadPrimaryElement
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:36
vtkXMLPUnstructuredDataReader::PPointsElement
vtkXMLDataElement * PPointsElement
Definition: vtkXMLPUnstructuredDataReader.h:98
vtkXMLPUnstructuredDataReader::UpdateGhostLevel
int UpdateGhostLevel
Definition: vtkXMLPUnstructuredDataReader.h:88
vtkXMLPUnstructuredDataReader::SetupEmptyOutput
void SetupEmptyOutput()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkXMLPUnstructuredDataReader::GetOutputAsPointSet
vtkPointSet * GetOutputAsPointSet()
vtkXMLPUnstructuredDataReader::StartPiece
int StartPiece
Definition: vtkXMLPUnstructuredDataReader.h:91
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:45
vtkXMLPUnstructuredDataReader::SetupOutputTotals
virtual void SetupOutputTotals()
vtkXMLPUnstructuredDataReader::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkXMLPUnstructuredDataReader.h:93
vtkXMLPUnstructuredDataReader::TotalNumberOfCells
vtkIdType TotalNumberOfCells
Definition: vtkXMLPUnstructuredDataReader.h:94
vtkXMLPUnstructuredDataReader::GetPieceInputAsPointSet
vtkPointSet * GetPieceInputAsPointSet(int piece)
vtkXMLPUnstructuredDataReader::GetOutputUpdateExtent
virtual void GetOutputUpdateExtent(int &piece, int &numberOfPieces, int &ghostLevel)=0
vtkXMLPDataReader
Superclass for PVTK XML file readers.
Definition: vtkXMLPDataReader.h:37
vtkXMLPUnstructuredDataReader::SetupOutputData
void SetupOutputData()
vtkXMLPUnstructuredDataReader::SetupNextPiece
virtual void SetupNextPiece()
vtkXMLPUnstructuredDataReader::CopyOutputInformation
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
vtkXMLPUnstructuredDataReader::UpdateNumberOfPieces
int UpdateNumberOfPieces
Definition: vtkXMLPUnstructuredDataReader.h:87