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 =========================================================================*/
26 #ifndef vtkXMLPUnstructuredDataReader_h
27 #define vtkXMLPUnstructuredDataReader_h
28 
29 #include "vtkIOXMLModule.h" // For export macro
30 #include "vtkXMLPDataReader.h"
31 
32 class vtkPointSet;
33 class vtkCellArray;
35 
36 class VTKIOXML_EXPORT vtkXMLPUnstructuredDataReader : public vtkXMLPDataReader
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
42  // For the specified port, copy the information this reader sets up in
43  // SetupOutputInformation to outInfo
44  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
45 
46 protected:
49 
50  virtual int RequestInformation(vtkInformation *request,
51  vtkInformationVector **inputVector,
52  vtkInformationVector *outputVector);
53 
54 
57  virtual void SetupOutputTotals();
58  virtual void SetupNextPiece();
61  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
62 
64 
65  // Setup the output's information.
67 
69  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
70  int& ghostLevel)=0;
71 
72  // Pipeline execute data driver. Called by vtkXMLReader.
73  void ReadXMLData();
75  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
76 
78  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
79  vtkCellArray* outCells);
80 
81  // Get the number of points/cells in the given piece. Valid after
82  // UpdateInformation.
83  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
84  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
85 
86  // The update request.
90 
91  // The range of pieces from the file that will form the UpdatePiece.
93  int EndPiece;
97 
98  // The PPoints element with point information.
100 
101 private:
103  void operator=(const vtkXMLPUnstructuredDataReader&) VTK_DELETE_FUNCTION;
104 };
105 
106 #endif
vtkXMLPUnstructuredDataReader::ReadPieceData
int ReadPieceData()
vtkXMLPUnstructuredDataReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkXMLPUnstructuredDataReader::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkXMLPUnstructuredDataReader
Superclass for parallel unstructured data XML readers.
Definition: vtkXMLPUnstructuredDataReader.h:37
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:287
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkXMLPUnstructuredDataReader::SetupUpdateExtent
void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel)
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:93
vtkXMLPUnstructuredDataReader::vtkXMLPUnstructuredDataReader
vtkXMLPUnstructuredDataReader()
vtkXMLPUnstructuredDataReader::SetupOutputInformation
void SetupOutputInformation(vtkInformation *outInfo)
vtkXMLPUnstructuredDataReader::CopyCellArray
void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray *inCells, vtkCellArray *outCells)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkXMLPUnstructuredDataReader::UpdatePiece
int UpdatePiece
Definition: vtkXMLPUnstructuredDataReader.h:87
vtkXMLPDataReader.h
vtkXMLPUnstructuredDataReader::GetNumberOfPoints
vtkIdType GetNumberOfPoints()
vtkXMLUnstructuredDataReader
Superclass for unstructured data XML readers.
Definition: vtkXMLUnstructuredDataReader.h:38
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkXMLPUnstructuredDataReader::StartPoint
vtkIdType StartPoint
Definition: vtkXMLPUnstructuredDataReader.h:96
vtkCellArray
object to represent cell connectivity
Definition: vtkCellArray.h:51
vtkXMLPUnstructuredDataReader::ReadPrimaryElement
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
vtkXMLDataElement
Represents an XML element and those nested inside.
Definition: vtkXMLDataElement.h:37
vtkXMLPUnstructuredDataReader::PPointsElement
vtkXMLDataElement * PPointsElement
Definition: vtkXMLPUnstructuredDataReader.h:99
vtkXMLPUnstructuredDataReader::UpdateGhostLevel
int UpdateGhostLevel
Definition: vtkXMLPUnstructuredDataReader.h:89
vtkXMLPUnstructuredDataReader::SetupEmptyOutput
void SetupEmptyOutput()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkXMLPUnstructuredDataReader::GetOutputAsPointSet
vtkPointSet * GetOutputAsPointSet()
vtkXMLPUnstructuredDataReader::StartPiece
int StartPiece
Definition: vtkXMLPUnstructuredDataReader.h:92
vtkPointSet
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:43
vtkXMLPUnstructuredDataReader::SetupOutputTotals
virtual void SetupOutputTotals()
vtkXMLPUnstructuredDataReader::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkXMLPUnstructuredDataReader.h:94
vtkXMLPUnstructuredDataReader::TotalNumberOfCells
vtkIdType TotalNumberOfCells
Definition: vtkXMLPUnstructuredDataReader.h:95
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:38
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:88