VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/IO/Image/vtkImageReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00032 #ifndef vtkImageReader_h
00033 #define vtkImageReader_h
00034 
00035 #include "vtkIOImageModule.h" // For export macro
00036 #include "vtkImageReader2.h"
00037 
00038 class vtkTransform;
00039 
00040 #define VTK_FILE_BYTE_ORDER_BIG_ENDIAN 0
00041 #define VTK_FILE_BYTE_ORDER_LITTLE_ENDIAN 1
00042 
00043 class VTKIOIMAGE_EXPORT vtkImageReader : public vtkImageReader2
00044 {
00045 public:
00046   static vtkImageReader *New();
00047   vtkTypeMacro(vtkImageReader,vtkImageReader2);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00053   vtkSetVector6Macro(DataVOI,int);
00054   vtkGetVector6Macro(DataVOI,int);
00056 
00058 
00064   vtkGetMacro(DataMask, vtkTypeUInt64);
00065   vtkSetMacro(DataMask, vtkTypeUInt64);
00067 
00069 
00072   virtual void SetTransform(vtkTransform*);
00073   vtkGetObjectMacro(Transform,vtkTransform);
00075 
00076   // Warning !!!
00077   // following should only be used by methods or template helpers, not users
00078   void ComputeInverseTransformedExtent(int inExtent[6],
00079                                        int outExtent[6]);
00080   void ComputeInverseTransformedIncrements(vtkIdType inIncr[3],
00081                                            vtkIdType outIncr[3]);
00082 
00083   int OpenAndSeekFile(int extent[6], int slice);
00084 
00086 
00087   vtkSetStringMacro(ScalarArrayName);
00088   vtkGetStringMacro(ScalarArrayName);
00090 
00091 protected:
00092   vtkImageReader();
00093   ~vtkImageReader();
00094 
00095   vtkTypeUInt64 DataMask;
00096 
00097   vtkTransform *Transform;
00098 
00099   void ComputeTransformedSpacing (double Spacing[3]);
00100   void ComputeTransformedOrigin (double origin[3]);
00101   void ComputeTransformedExtent(int inExtent[6],
00102                                 int outExtent[6]);
00103   void ComputeTransformedIncrements(vtkIdType inIncr[3],
00104                                     vtkIdType outIncr[3]);
00105 
00106   int DataVOI[6];
00107 
00108   char *ScalarArrayName;
00109 
00110   virtual int RequestInformation(vtkInformation* request,
00111                                  vtkInformationVector** inputVector,
00112                                  vtkInformationVector* outputVector);
00113 
00114   void ExecuteDataWithInformation(vtkDataObject *data, vtkInformation *outInfo);
00115 private:
00116   vtkImageReader(const vtkImageReader&);  // Not implemented.
00117   void operator=(const vtkImageReader&);  // Not implemented.
00118 };
00119 
00120 #endif