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