vtkXMLPStructuredGridReader.h 2.4 KB
Newer Older
1 2 3 4 5
/*=========================================================================

  Program:   Visualization Toolkit
  Module:    vtkXMLPStructuredGridReader.h

6
  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 8 9
  All rights reserved.
  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.

10 11
     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 13 14 15 16 17 18 19 20 21 22 23 24 25
     PURPOSE.  See the above copyright notice for more information.

=========================================================================*/
// .NAME vtkXMLPStructuredGridReader - Read PVTK XML StructuredGrid files.
// .SECTION Description
// vtkXMLPStructuredGridReader reads the PVTK XML StructuredGrid file
// format.  This reads the parallel format's summary file and then
// uses vtkXMLStructuredGridReader to read data from the individual
// StructuredGrid piece files.  Streaming is supported.  The standard
// extension for this reader's file format is "pvts".

// .SECTION See Also
// vtkXMLStructuredGridReader

26 27
#ifndef vtkXMLPStructuredGridReader_h
#define vtkXMLPStructuredGridReader_h
28

29
#include "vtkIOXMLModule.h" // For export macro
30 31 32 33
#include "vtkXMLPStructuredDataReader.h"

class vtkStructuredGrid;

34
class VTKIOXML_EXPORT vtkXMLPStructuredGridReader : public vtkXMLPStructuredDataReader
35 36
{
public:
37
  vtkTypeMacro(vtkXMLPStructuredGridReader,vtkXMLPStructuredDataReader);
38 39
  void PrintSelf(ostream& os, vtkIndent indent);
  static vtkXMLPStructuredGridReader *New();
40

41
  // Description:
42
  // Get the reader's output.
43
  vtkStructuredGrid *GetOutput();
44 45 46 47

  // Description:
  // Needed for ParaView
  vtkStructuredGrid* GetOutput(int idx);
48

49 50 51
protected:
  vtkXMLPStructuredGridReader();
  ~vtkXMLPStructuredGridReader();
52

53
  vtkStructuredGrid* GetPieceInput(int index);
54 55

  void SetupEmptyOutput();
56 57 58
  const char* GetDataSetName();
  void SetOutputExtent(int* extent);
  void GetPieceInputExtent(int index, int* extent);
59
  int ReadPrimaryElement(vtkXMLDataElement* ePrimary);
60 61
  void SetupOutputData();
  int ReadPieceData();
62
  vtkXMLDataReader* CreatePieceReader();
63
  virtual int FillOutputPortInformation(int, vtkInformation*);
64

65 66
  // The PPoints element with point information.
  vtkXMLDataElement* PPointsElement;
67

68 69 70 71 72 73
private:
  vtkXMLPStructuredGridReader(const vtkXMLPStructuredGridReader&);  // Not implemented.
  void operator=(const vtkXMLPStructuredGridReader&);  // Not implemented.
};

#endif