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

Hybrid/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 =========================================================================*/
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&);  // Not implemented.
00117   void operator=(const vtkTransformToGrid&);  // Not implemented.
00118 };
00119 
00120 #endif