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

vtkTransformToGrid.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkTransformToGrid.h,v $
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 =========================================================================*/
00040 #ifndef __vtkTransformToGrid_h
00041 #define __vtkTransformToGrid_h
00042 
00043 #include "vtkImageSource.h"
00044 
00045 class vtkAbstractTransform;
00046 
00047 class VTK_HYBRID_EXPORT vtkTransformToGrid : public vtkImageSource
00048 {
00049 public:
00050   static vtkTransformToGrid *New();
00051   vtkTypeRevisionMacro(vtkTransformToGrid,vtkImageSource);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00055 
00056   virtual void SetInput(vtkAbstractTransform*);
00057   vtkGetObjectMacro(Input,vtkAbstractTransform);
00059 
00061 
00062   vtkSetVector6Macro(GridExtent,int);
00063   vtkGetVector6Macro(GridExtent,int);
00065 
00067 
00068   vtkSetVector3Macro(GridOrigin,double);
00069   vtkGetVector3Macro(GridOrigin,double);
00071 
00073 
00074   vtkSetVector3Macro(GridSpacing,double);
00075   vtkGetVector3Macro(GridSpacing,double);
00077 
00079 
00080   vtkSetMacro(GridScalarType,int);
00081   vtkGetMacro(GridScalarType,int);
00082   void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_DOUBLE);};
00083   void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);};
00084   void SetGridScalarTypeToUnsignedShort()
00085     {this->SetGridScalarType(VTK_UNSIGNED_SHORT);};
00086   void SetGridScalarTypeToUnsignedChar()
00087     {this->SetGridScalarType(VTK_UNSIGNED_CHAR);};
00088   void SetGridScalarTypeToChar()
00089     {this->SetGridScalarType(VTK_CHAR);};
00091 
00093 
00096   double GetDisplacementScale() {
00097     this->UpdateShiftScale(); return this->DisplacementScale; };
00098   double GetDisplacementShift() {
00099     this->UpdateShiftScale(); return this->DisplacementShift; };
00101 
00102 protected:
00103   vtkTransformToGrid();
00104   ~vtkTransformToGrid();
00105 
00106   void ExecuteInformation();
00107 
00108   void ExecuteData(vtkDataObject *data);
00109 
00112   void UpdateShiftScale();
00113 
00114   unsigned long GetMTime();
00115 
00116   vtkAbstractTransform *Input;
00117 
00118   int GridScalarType;
00119   int GridExtent[6];
00120   double GridOrigin[3];
00121   double GridSpacing[3];
00122 
00123   double DisplacementScale;
00124   double DisplacementShift;
00125   vtkTimeStamp ShiftScaleTime;
00126 private:
00127   vtkTransformToGrid(const vtkTransformToGrid&);  // Not implemented.
00128   void operator=(const vtkTransformToGrid&);  // Not implemented.
00129 };
00130 
00131 #endif