vtk-dicom  0.8.14
vtkImageReader.h
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);
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();
96 
97  vtkTypeUInt64 DataMask;
98 
99  vtkTransform *Transform;
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  virtual int RequestInformation(vtkInformation* request,
113  vtkInformationVector** inputVector,
114  vtkInformationVector* outputVector);
115 
116  void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo);
117 private:
118  vtkImageReader(const vtkImageReader&) VTK_DELETE_FUNCTION;
119  void operator=(const vtkImageReader&) VTK_DELETE_FUNCTION;
120 };
121 
122 #endif
Superclass of binary file readers.
Definition: vtkImageReader2.h:53
Superclass of transformable binary file readers.
Definition: vtkImageReader.h:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetTransform(vtkTransform *)
void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo)