Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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   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 =========================================================================*/
00044 #ifndef __vtkTransformToGrid_h
00045 #define __vtkTransformToGrid_h
00046 
00047 #include "vtkImageSource.h"
00048 
00049 class vtkAbstractTransform;
00050 
00051 class VTK_HYBRID_EXPORT vtkTransformToGrid : public vtkImageSource
00052 {
00053 public:
00054   static vtkTransformToGrid *New();
00055   vtkTypeRevisionMacro(vtkTransformToGrid,vtkImageSource);
00056   void PrintSelf(ostream& os, vtkIndent indent);
00057 
00059 
00060   virtual void SetInput(vtkAbstractTransform*);
00061   vtkGetObjectMacro(Input,vtkAbstractTransform);
00063 
00065 
00066   vtkSetVector6Macro(GridExtent,int);
00067   vtkGetVector6Macro(GridExtent,int);
00069 
00071 
00072   vtkSetVector3Macro(GridOrigin,float);
00073   vtkGetVector3Macro(GridOrigin,float);
00075 
00077 
00078   vtkSetVector3Macro(GridSpacing,float);
00079   vtkGetVector3Macro(GridSpacing,float);
00081 
00083 
00084   vtkSetMacro(GridScalarType,int);
00085   vtkGetMacro(GridScalarType,int);
00086   void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_FLOAT);};
00087   void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);};
00088   void SetGridScalarTypeToUnsignedShort()
00089     {this->SetGridScalarType(VTK_UNSIGNED_SHORT);};
00090   void SetGridScalarTypeToUnsignedChar()
00091     {this->SetGridScalarType(VTK_UNSIGNED_CHAR);};
00092   void SetGridScalarTypeToChar()
00093     {this->SetGridScalarType(VTK_CHAR);};
00095 
00097 
00100   float GetDisplacementScale() {
00101     this->UpdateShiftScale(); return this->DisplacementScale; };
00102   float GetDisplacementShift() {
00103     this->UpdateShiftScale(); return this->DisplacementShift; };
00105 
00106 protected:
00107   vtkTransformToGrid();
00108   ~vtkTransformToGrid();
00109 
00110   void ExecuteInformation();
00111 
00112   void ExecuteData(vtkDataObject *data);
00113 
00116   void UpdateShiftScale();
00117 
00118   unsigned long GetMTime();
00119 
00120   vtkAbstractTransform *Input;
00121 
00122   int GridScalarType;
00123   int GridExtent[6];
00124   float GridOrigin[3];
00125   float GridSpacing[3];
00126 
00127   float DisplacementScale;
00128   float DisplacementShift;
00129   vtkTimeStamp ShiftScaleTime;
00130 private:
00131   vtkTransformToGrid(const vtkTransformToGrid&);  // Not implemented.
00132   void operator=(const vtkTransformToGrid&);  // Not implemented.
00133 };
00134 
00135 #endif