VTK  9.3.1
vtkXMLImageDataReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
23 #ifndef vtkXMLImageDataReader_h
24 #define vtkXMLImageDataReader_h
25 
26 #include "vtkIOXMLModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkImageData;
31 
32 class VTKIOXML_EXPORT vtkXMLImageDataReader : public vtkXMLStructuredDataReader
33 {
34 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37  static vtkXMLImageDataReader* New();
38 
40 
43  vtkImageData* GetOutput();
44  vtkImageData* GetOutput(int idx);
46 
51  void CopyOutputInformation(vtkInformation* outInfo, int port) override;
52 
53 protected:
55  ~vtkXMLImageDataReader() override;
56 
57  double Origin[3];
58  double Spacing[3];
59  double Direction[9];
60  int PieceExtent[6];
61 
62  const char* GetDataSetName() override;
63  void SetOutputExtent(int* extent) override;
64 
65  int ReadPrimaryElement(vtkXMLDataElement* ePrimary) override;
66 
67  // Setup the output's information.
68  void SetupOutputInformation(vtkInformation* outInfo) override;
69 
70  int FillOutputPortInformation(int, vtkInformation*) override;
71 
72 private:
74  void operator=(const vtkXMLImageDataReader&) = delete;
75 };
76 
77 VTK_ABI_NAMESPACE_END
78 #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
Get the name of the data set being read.
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:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
Read VTK XML ImageData files.
int ReadPrimaryElement(vtkXMLDataElement *ePrimary) override
Read the primary element from the file.
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...