Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Hybrid/vtkTransformToGrid.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTransformToGrid.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00033 #ifndef __vtkTransformToGrid_h 00034 #define __vtkTransformToGrid_h 00035 00036 #include "vtkImageSource.h" 00037 00038 class vtkAbstractTransform; 00039 00040 class VTK_HYBRID_EXPORT vtkTransformToGrid : public vtkImageSource 00041 { 00042 public: 00043 static vtkTransformToGrid *New(); 00044 vtkTypeRevisionMacro(vtkTransformToGrid,vtkImageSource); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 virtual void SetInput(vtkAbstractTransform*); 00050 vtkGetObjectMacro(Input,vtkAbstractTransform); 00052 00054 00055 vtkSetVector6Macro(GridExtent,int); 00056 vtkGetVector6Macro(GridExtent,int); 00058 00060 00061 vtkSetVector3Macro(GridOrigin,float); 00062 vtkGetVector3Macro(GridOrigin,float); 00064 00066 00067 vtkSetVector3Macro(GridSpacing,float); 00068 vtkGetVector3Macro(GridSpacing,float); 00070 00072 00073 vtkSetMacro(GridScalarType,int); 00074 vtkGetMacro(GridScalarType,int); 00075 void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_FLOAT);}; 00076 void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);}; 00077 void SetGridScalarTypeToUnsignedShort() 00078 {this->SetGridScalarType(VTK_UNSIGNED_SHORT);}; 00079 void SetGridScalarTypeToUnsignedChar() 00080 {this->SetGridScalarType(VTK_UNSIGNED_CHAR);}; 00081 void SetGridScalarTypeToChar() 00082 {this->SetGridScalarType(VTK_CHAR);}; 00084 00086 00089 float GetDisplacementScale() { 00090 this->UpdateShiftScale(); return this->DisplacementScale; }; 00091 float GetDisplacementShift() { 00092 this->UpdateShiftScale(); return this->DisplacementShift; }; 00094 00095 protected: 00096 vtkTransformToGrid(); 00097 ~vtkTransformToGrid(); 00098 00099 void ExecuteInformation(); 00100 00101 void ExecuteData(vtkDataObject *data); 00102 00105 void UpdateShiftScale(); 00106 00107 unsigned long GetMTime(); 00108 00109 vtkAbstractTransform *Input; 00110 00111 int GridScalarType; 00112 int GridExtent[6]; 00113 float GridOrigin[3]; 00114 float GridSpacing[3]; 00115 00116 float DisplacementScale; 00117 float DisplacementShift; 00118 vtkTimeStamp ShiftScaleTime; 00119 private: 00120 vtkTransformToGrid(const vtkTransformToGrid&); // Not implemented. 00121 void operator=(const vtkTransformToGrid&); // Not implemented. 00122 }; 00123 00124 #endif