00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00032 #ifndef __vtkImageReader_h
00033 #define __vtkImageReader_h
00034
00035 #include "vtkImageReader2.h"
00036
00037 class vtkTransform;
00038
00039 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
00040 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
00041
00042 class VTK_IO_EXPORT vtkImageReader : public vtkImageReader2
00043 {
00044 public:
00045 static vtkImageReader *New();
00046 vtkTypeMacro(vtkImageReader,vtkImageReader2);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050
00052 vtkSetVector6Macro(DataVOI,int);
00053 vtkGetVector6Macro(DataVOI,int);
00055
00057
00063 vtkGetMacro(DataMask, vtkTypeUInt64);
00064 vtkSetMacro(DataMask, vtkTypeUInt64);
00066
00068
00071 virtual void SetTransform(vtkTransform*);
00072 vtkGetObjectMacro(Transform,vtkTransform);
00074
00075
00076
00077 void ComputeInverseTransformedExtent(int inExtent[6],
00078 int outExtent[6]);
00079 void ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
00080 vtkIdType outIncr[3]);
00081
00082 int OpenAndSeekFile(int extent[6], int slice);
00083
00085
00086 vtkSetStringMacro(ScalarArrayName);
00087 vtkGetStringMacro(ScalarArrayName);
00089
00090 protected:
00091 vtkImageReader();
00092 ~vtkImageReader();
00093
00094 vtkTypeUInt64 DataMask;
00095
00096 vtkTransform *Transform;
00097
00098 void ComputeTransformedSpacing (double Spacing[3]);
00099 void ComputeTransformedOrigin (double origin[3]);
00100 void ComputeTransformedExtent(int inExtent[6],
00101 int outExtent[6]);
00102 void ComputeTransformedIncrements(vtkIdType inIncr[3],
00103 vtkIdType outIncr[3]);
00104
00105 int DataVOI[6];
00106
00107 char *ScalarArrayName;
00108
00109 virtual int RequestInformation(vtkInformation* request,
00110 vtkInformationVector** inputVector,
00111 vtkInformationVector* outputVector);
00112
00113 void ExecuteData(vtkDataObject *data);
00114 private:
00115 vtkImageReader(const vtkImageReader&);
00116 void operator=(const vtkImageReader&);
00117 };
00118
00119 #endif