Hybrid/vtkTransformToGrid.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkTransformToGrid_h
00030 #define __vtkTransformToGrid_h
00031
00032 #include "vtkImageSource.h"
00033
00034 class vtkAbstractTransform;
00035
00036 class VTK_HYBRID_EXPORT vtkTransformToGrid : public vtkImageSource
00037 {
00038 public:
00039 static vtkTransformToGrid *New();
00040 vtkTypeRevisionMacro(vtkTransformToGrid,vtkImageSource);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00045 virtual void SetInput(vtkAbstractTransform*);
00046 vtkGetObjectMacro(Input,vtkAbstractTransform);
00048
00050
00051 vtkSetVector6Macro(GridExtent,int);
00052 vtkGetVector6Macro(GridExtent,int);
00054
00056
00057 vtkSetVector3Macro(GridOrigin,double);
00058 vtkGetVector3Macro(GridOrigin,double);
00060
00062
00063 vtkSetVector3Macro(GridSpacing,double);
00064 vtkGetVector3Macro(GridSpacing,double);
00066
00068
00069 vtkSetMacro(GridScalarType,int);
00070 vtkGetMacro(GridScalarType,int);
00071 void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_DOUBLE);};
00072 void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);};
00073 void SetGridScalarTypeToUnsignedShort()
00074 {this->SetGridScalarType(VTK_UNSIGNED_SHORT);};
00075 void SetGridScalarTypeToUnsignedChar()
00076 {this->SetGridScalarType(VTK_UNSIGNED_CHAR);};
00077 void SetGridScalarTypeToChar()
00078 {this->SetGridScalarType(VTK_CHAR);};
00080
00082
00085 double GetDisplacementScale() {
00086 this->UpdateShiftScale(); return this->DisplacementScale; };
00087 double GetDisplacementShift() {
00088 this->UpdateShiftScale(); return this->DisplacementShift; };
00090
00091 protected:
00092 vtkTransformToGrid();
00093 ~vtkTransformToGrid();
00094
00095 void ExecuteInformation();
00096
00097 void ExecuteData(vtkDataObject *data);
00098
00101 void UpdateShiftScale();
00102
00103 unsigned long GetMTime();
00104
00105 vtkAbstractTransform *Input;
00106
00107 int GridScalarType;
00108 int GridExtent[6];
00109 double GridOrigin[3];
00110 double GridSpacing[3];
00111
00112 double DisplacementScale;
00113 double DisplacementShift;
00114 vtkTimeStamp ShiftScaleTime;
00115 private:
00116 vtkTransformToGrid(const vtkTransformToGrid&);
00117 void operator=(const vtkTransformToGrid&);
00118 };
00119
00120 #endif