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  vtkPointSet* GetOutputAsPointSet();
50  vtkPointSet* GetPieceInputAsPointSet(int piece);
51  virtual void SetupOutputTotals();
52  virtual void SetupNextPiece();
55  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
56 
57  void SetupEmptyOutput();
58 
59  // Setup the output's information.
61 
62  void SetupOutputData();
63  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
64  int& ghostLevel)=0;
65 
66  // Pipeline execute data driver. Called by vtkXMLReader.
67  void ReadXMLData();
69  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
70 
71  int ReadPieceData();
72  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
73  vtkCellArray* outCells);
74 
75  // Get the number of points/cells in the given piece. Valid after
76  // UpdateInformation.
77  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
78  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
79 
80  // The update request.
84 
85  // The range of pieces from the file that will form the UpdatePiece.
87  int EndPiece;
91 
92  // The PPoints element with point information.
94 
95 private:
97  void operator=(const vtkXMLPUnstructuredDataReader&); // Not implemented.
98 };
99 
100 #endif
virtual vtkIdType GetNumberOfPoints()=0
virtual void SetupOutputInformation(vtkInformation *outInfo)
virtual void SetupEmptyOutput()=0
Represents an XML element and those nested inside.
Store vtkAlgorithm input/output information.
virtual vtkIdType GetNumberOfCells()=0
abstract class for specifying dataset behavior
Definition: vtkPointSet.h:41
Superclass for unstructured data XML readers.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:268
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOXML_EXPORT
virtual void CopyArrayForPoints(vtkDataArray *inArray, vtkDataArray *outArray)=0
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
Superclass for parallel unstructured data XML readers.
Superclass for PVTK XML file readers.
void PrintSelf(ostream &os, vtkIndent indent)
virtual int ReadPieceData()
object to represent cell connectivity
Definition: vtkCellArray.h:49
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)