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 "vtkXMLPDataReader.h"
29 
30 class vtkPointSet;
31 class vtkCellArray;
33 
35 {
36 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
40  // For the specified port, copy the information this reader sets up in
41  // SetupOutputInformation to outInfo
42  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
43 
44 protected:
47 
48  vtkPointSet* GetOutputAsPointSet();
49  vtkPointSet* GetPieceInputAsPointSet(int piece);
50  virtual void SetupOutputTotals();
51  virtual void SetupNextPiece();
54  void CopyArrayForPoints(vtkDataArray* inArray, vtkDataArray* outArray);
55 
56  void SetupEmptyOutput();
57 
58  // Setup the output's information.
60 
61  void SetupOutputData();
62  virtual void GetOutputUpdateExtent(int& piece, int& numberOfPieces,
63  int& ghostLevel)=0;
64 
65  // Pipeline execute data driver. Called by vtkXMLReader.
66  void ReadXMLData();
68  void SetupUpdateExtent(int piece, int numberOfPieces, int ghostLevel);
69 
70  int ReadPieceData();
71  void CopyCellArray(vtkIdType totalNumberOfCells, vtkCellArray* inCells,
72  vtkCellArray* outCells);
73 
74  // Get the number of points/cells in the given piece. Valid after
75  // UpdateInformation.
76  virtual vtkIdType GetNumberOfPointsInPiece(int piece);
77  virtual vtkIdType GetNumberOfCellsInPiece(int piece);
78 
79  // The update request.
83 
84  // The range of pieces from the file that will form the UpdatePiece.
86  int EndPiece;
90 
91  // The PPoints element with point information.
93 
94 private:
96  void operator=(const vtkXMLPUnstructuredDataReader&); // Not implemented.
97 };
98 
99 #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:40
Superclass for unstructured data XML readers.
virtual void ReadXMLData()
int vtkIdType
Definition: vtkType.h:255
int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
a simple class to control print indentation
Definition: vtkIndent.h:37
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:48
virtual void CopyOutputInformation(vtkInformation *outInfo, int port)
#define VTK_IO_EXPORT