VTK
vtkXMLImageDataReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkXMLImageDataReader.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 =========================================================================*/
35 #ifndef vtkXMLImageDataReader_h
36 #define vtkXMLImageDataReader_h
37 
38 #include "vtkIOXMLModule.h" // For export macro
40 
41 class vtkImageData;
42 
43 class VTKIOXML_EXPORT vtkXMLImageDataReader : public vtkXMLStructuredDataReader
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48  static vtkXMLImageDataReader *New();
49 
51 
54  vtkImageData *GetOutput();
55  vtkImageData *GetOutput(int idx);
57 
62  void CopyOutputInformation(vtkInformation *outInfo, int port) override;
63 
64 protected:
66  ~vtkXMLImageDataReader() override;
67 
68  double Origin[3];
69  double Spacing[3];
70  int PieceExtent[6];
71 
72  const char* GetDataSetName() override;
73  void SetOutputExtent(int* extent) override;
74 
75  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
76 
77  // Setup the output's information.
78  void SetupOutputInformation(vtkInformation *outInfo) override;
79 
80  int FillOutputPortInformation(int, vtkInformation*) override;
81 
82 
83 
84 private:
86  void operator=(const vtkXMLImageDataReader&) = delete;
87 };
88 
89 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual const char * GetDataSetName()=0
Represents an XML element and those nested inside.
virtual void SetOutputExtent(int *extent)=0
Store vtkAlgorithm input/output information.
Superclass for structured data XML readers.
void SetupOutputInformation(vtkInformation *outInfo) override
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
Read VTK XML ImageData files.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
static vtkAlgorithm * New()
void CopyOutputInformation(vtkInformation *outInfo, int port) override
For the specified port, copy the information this reader sets up in SetupOutputInformation to outInfo...