VTK
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 =========================================================================*/
27 #ifndef vtkImageReader_h
28 #define vtkImageReader_h
29 
30 #include "vtkIOImageModule.h" // For export macro
31 #include "vtkImageReader2.h"
32 
33 class vtkTransform;
34 
35 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
36 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
37 
38 class VTKIOIMAGE_EXPORT vtkImageReader : public vtkImageReader2
39 {
40 public:
41  static vtkImageReader *New();
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
44 
46 
50  vtkSetVector6Macro(DataVOI,int);
51  vtkGetVector6Macro(DataVOI,int);
53 
55 
62  vtkGetMacro(DataMask, vtkTypeUInt64);
63  vtkSetMacro(DataMask, vtkTypeUInt64);
65 
67 
72  virtual void SetTransform(vtkTransform*);
73  vtkGetObjectMacro(Transform,vtkTransform);
75 
76  // Warning !!!
77  // following should only be used by methods or template helpers, not users
78  void ComputeInverseTransformedExtent(int inExtent[6],
79  int outExtent[6]);
80  void ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
81  vtkIdType outIncr[3]);
82 
83  int OpenAndSeekFile(int extent[6], int slice);
84 
86 
89  vtkSetStringMacro(ScalarArrayName);
90  vtkGetStringMacro(ScalarArrayName);
92 
93 protected:
95  ~vtkImageReader() VTK_OVERRIDE;
96 
97  vtkTypeUInt64 DataMask;
98 
100 
101  void ComputeTransformedSpacing (double Spacing[3]);
102  void ComputeTransformedOrigin (double origin[3]);
103  void ComputeTransformedExtent(int inExtent[6],
104  int outExtent[6]);
105  void ComputeTransformedIncrements(vtkIdType inIncr[3],
106  vtkIdType outIncr[3]);
107 
108  int DataVOI[6];
109 
110  char *ScalarArrayName;
111 
112  int RequestInformation(vtkInformation* request,
113  vtkInformationVector** inputVector,
114  vtkInformationVector* outputVector) VTK_OVERRIDE;
115 
116  void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo) VTK_OVERRIDE;
117 private:
118  vtkImageReader(const vtkImageReader&) VTK_DELETE_FUNCTION;
119  void operator=(const vtkImageReader&) VTK_DELETE_FUNCTION;
120 };
121 
122 #endif
static vtkImageReader2 * New()
Store vtkAlgorithm input/output information.
describes linear transformations via a 4x4 matrix
Definition: vtkTransform.h:54
int vtkIdType
Definition: vtkType.h:345
a simple class to control print indentation
Definition: vtkIndent.h:33
Superclass of transformable binary file readers.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
Superclass of binary file readers.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
general representation of visualization data
Definition: vtkDataObject.h:58
Transform
Definition: ADIOSDefs.h:39