VTK
vtkXMLPDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLPDataReader.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 =========================================================================*/
27 #ifndef vtkXMLPDataReader_h
28 #define vtkXMLPDataReader_h
29 
30 #include "vtkIOXMLModule.h" // For export macro
31 #include "vtkXMLReader.h"
32 
33 class vtkDataArray;
34 class vtkDataSet;
35 class vtkXMLDataReader;
36 
37 class VTKIOXML_EXPORT vtkXMLPDataReader : public vtkXMLReader
38 {
39 public:
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
47  vtkGetMacro(NumberOfPieces, int);
49 
50  // For the specified port, copy the information this reader sets up in
51  // SetupOutputInformation to outInfo
52  virtual void CopyOutputInformation(vtkInformation *outInfo, int port);
53 
54 protected:
57 
58  // Pipeline execute information driver. Called by vtkXMLReader.
59  int ReadXMLInformation();
60  virtual void SetupOutputInformation(vtkInformation *outInfo);
61 
63 
64  vtkDataSet* GetPieceInputAsDataSet(int piece);
65  void SetupOutputData();
66 
67  virtual vtkXMLDataReader* CreatePieceReader()=0;
68  virtual vtkIdType GetNumberOfPoints()=0;
69  virtual vtkIdType GetNumberOfCells()=0;
70  virtual void CopyArrayForPoints(vtkDataArray* inArray,
71  vtkDataArray* outArray)=0;
72  virtual void CopyArrayForCells(vtkDataArray* inArray,
73  vtkDataArray* outArray)=0;
74 
75  virtual void SetupPieces(int numPieces);
76  virtual void DestroyPieces();
77  int ReadPiece(vtkXMLDataElement* ePiece, int index);
78  virtual int ReadPiece(vtkXMLDataElement* ePiece);
79  int ReadPieceData(int index);
80  virtual int ReadPieceData();
81  int CanReadPiece(int index);
82 
83  char* CreatePieceFileName(const char* fileName);
84  void SplitFileName();
85 
86  // Callback registered with the PieceProgressObserver.
87  static void PieceProgressCallbackFunction(vtkObject*, unsigned long, void*,
88  void*);
89  virtual void PieceProgressCallback();
90 
91  // Pieces from the input summary file.
93 
94  // The ghost level available on each input piece.
96 
97  // The piece currently being read.
98  int Piece;
99 
100  // The path to the input file without the file name.
101  char* PathName;
102 
103  // Information per-piece.
107 
108  // The PPointData and PCellData element representations.
111 
112  // The observer to report progress from reading serial data in each
113  // piece.
115 
116 private:
117  vtkXMLPDataReader(const vtkXMLPDataReader&) VTK_DELETE_FUNCTION;
118  void operator=(const vtkXMLPDataReader&) VTK_DELETE_FUNCTION;
119 };
120 
121 #endif
vtkXMLDataElement * PCellDataElement
abstract base class for most VTK objects
Definition: vtkObject.h:59
vtkXMLDataElement ** PieceElements
Represents an XML element and those nested inside.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
int vtkIdType
Definition: vtkType.h:287
virtual int ReadXMLInformation()
supports function callbacks
vtkXMLDataElement * PPointDataElement
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual void SetupOutputInformation(vtkInformation *vtkNotUsed(outInfo))
Definition: vtkXMLReader.h:194
Superclass for PVTK XML file readers.
vtkXMLDataReader ** PieceReaders
virtual int ReadPrimaryElement(vtkXMLDataElement *ePrimary)
Superclass for VTK XML file readers.
virtual void CopyOutputInformation(vtkInformation *vtkNotUsed(outInfo), int vtkNotUsed(port))
Definition: vtkXMLReader.h:123
vtkCallbackCommand * PieceProgressObserver
Superclass for VTK's XML format readers.
Definition: vtkXMLReader.h:43
virtual void SetupOutputData()