VTK
vtkTransformToGrid.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTransformToGrid.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkTransformToGrid_h
30 #define vtkTransformToGrid_h
31 
32 #include "vtkFiltersHybridModule.h" // For export macro
33 #include "vtkAlgorithm.h"
34 #include "vtkImageData.h" // makes things a bit easier
35 
37 
39 {
40 public:
41  static vtkTransformToGrid *New();
43  void PrintSelf(ostream& os, vtkIndent indent);
44 
46 
47  virtual void SetInput(vtkAbstractTransform*);
48  vtkGetObjectMacro(Input,vtkAbstractTransform);
50 
52 
53  vtkSetVector6Macro(GridExtent,int);
54  vtkGetVector6Macro(GridExtent,int);
56 
58 
59  vtkSetVector3Macro(GridOrigin,double);
60  vtkGetVector3Macro(GridOrigin,double);
62 
64 
65  vtkSetVector3Macro(GridSpacing,double);
66  vtkGetVector3Macro(GridSpacing,double);
68 
70 
71  vtkSetMacro(GridScalarType,int);
72  vtkGetMacro(GridScalarType,int);
73  void SetGridScalarTypeToDouble(){this->SetGridScalarType(VTK_DOUBLE);};
74  void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_FLOAT);};
75  void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);};
77  {this->SetGridScalarType(VTK_UNSIGNED_SHORT);};
79  {this->SetGridScalarType(VTK_UNSIGNED_CHAR);};
81  {this->SetGridScalarType(VTK_CHAR);};
83 
85 
89  this->UpdateShiftScale(); return this->DisplacementScale; };
91  this->UpdateShiftScale(); return this->DisplacementShift; };
93 
95  vtkImageData* GetOutput();
96 
98 
99  virtual int ProcessRequest(vtkInformation*,
103 
104 protected:
107 
108  void RequestInformation (vtkInformation *,
110 
111  void RequestData(vtkInformation *,
113 
116  void UpdateShiftScale();
117 
118  unsigned long GetMTime();
119 
121 
123  int GridExtent[6];
124  double GridOrigin[3];
125  double GridSpacing[3];
126 
130 
131  // see algorithm for more info
133 
134 private:
135  vtkTransformToGrid(const vtkTransformToGrid&); // Not implemented.
136  void operator=(const vtkTransformToGrid&); // Not implemented.
137 };
138 
139 #endif
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
vtkAbstractTransform * Input
record modification and/or execution time
Definition: vtkTimeStamp.h:34
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkTimeStamp ShiftScaleTime
void SetGridScalarTypeToUnsignedShort()
#define VTK_DOUBLE
Definition: vtkType.h:36
#define VTK_FLOAT
Definition: vtkType.h:35
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
virtual int FillOutputPortInformation(int port, vtkInformation *info)
void SetGridScalarTypeToUnsignedChar()
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSHYBRID_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
superclass for all geometric transformations
#define VTK_SHORT
Definition: vtkType.h:29
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
create a grid for a vtkGridTransform
void PrintSelf(ostream &os, vtkIndent indent)