VTK  9.1.0
vtkImageReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageReader.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=========================================================================*/
46#ifndef vtkImageReader_h
47#define vtkImageReader_h
48
49#include "vtkIOImageModule.h" // For export macro
50#include "vtkImageReader2.h"
51
52class vtkTransform;
53
54#define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
55#define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
56
57class VTKIOIMAGE_EXPORT vtkImageReader : public vtkImageReader2
58{
59public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
69 vtkSetVector6Macro(DataVOI, int);
70 vtkGetVector6Macro(DataVOI, int);
72
74
81 vtkGetMacro(DataMask, vtkTypeUInt64);
82 vtkSetMacro(DataMask, vtkTypeUInt64);
84
86
91 virtual void SetTransform(vtkTransform*);
92 vtkGetObjectMacro(Transform, vtkTransform);
94
95 // Warning !!!
96 // following should only be used by methods or template helpers, not users
97 void ComputeInverseTransformedExtent(int inExtent[6], int outExtent[6]);
99
100 int OpenAndSeekFile(int extent[6], int slice);
101
103
106 vtkSetStringMacro(ScalarArrayName);
107 vtkGetStringMacro(ScalarArrayName);
109
116 int CanReadFile(VTK_FILEPATH const char*) override
117 {
118 return 1; // I think I can read the file but I cannot prove it
119 }
120
121protected:
123 ~vtkImageReader() override;
124
125 vtkTypeUInt64 DataMask;
126
128
129 void ComputeTransformedSpacing(double Spacing[3]);
130 void ComputeTransformedOrigin(double origin[3]);
131 void ComputeTransformedExtent(int inExtent[6], int outExtent[6]);
133
134 int DataVOI[6];
135
137
139 vtkInformationVector* outputVector) override;
140
142
143private:
144 vtkImageReader(const vtkImageReader&) = delete;
145 void operator=(const vtkImageReader&) = delete;
146};
147
148#endif
general representation of visualization data
Superclass of binary file readers.
Superclass of transformable binary file readers.
static vtkImageReader * New()
void ComputeTransformedExtent(int inExtent[6], int outExtent[6])
int CanReadFile(VTK_FILEPATH const char *) override
vtkImageReader itself can read raw binary files.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkImageReader() override
void ComputeInverseTransformedExtent(int inExtent[6], int outExtent[6])
void ComputeTransformedSpacing(double Spacing[3])
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
int OpenAndSeekFile(int extent[6], int slice)
char * ScalarArrayName
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) override
This is a convenience method that is implemented in many subclasses instead of RequestData.
virtual void SetTransform(vtkTransform *)
Set/Get transformation matrix to transform the data from slice space into world space.
void ComputeTransformedOrigin(double origin[3])
void ComputeInverseTransformedIncrements(vtkIdType inIncr[3], vtkIdType outIncr[3])
vtkTypeUInt64 DataMask
void ComputeTransformedIncrements(vtkIdType inIncr[3], vtkIdType outIncr[3])
vtkTransform * Transform
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:164
@ Transform
Definition: vtkX3D.h:47
@ extent
Definition: vtkX3D.h:351
@ data
Definition: vtkX3D.h:321
int vtkIdType
Definition: vtkType.h:332
#define VTK_FILEPATH