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 "vtkAlgorithm.h"
33 #include "vtkImageData.h" // makes things a bit easier
34 
36 
38 {
39 public:
40  static vtkTransformToGrid *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
46  virtual void SetInput(vtkAbstractTransform*);
47  vtkGetObjectMacro(Input,vtkAbstractTransform);
49 
51 
52  vtkSetVector6Macro(GridExtent,int);
53  vtkGetVector6Macro(GridExtent,int);
55 
57 
58  vtkSetVector3Macro(GridOrigin,double);
59  vtkGetVector3Macro(GridOrigin,double);
61 
63 
64  vtkSetVector3Macro(GridSpacing,double);
65  vtkGetVector3Macro(GridSpacing,double);
67 
69 
70  vtkSetMacro(GridScalarType,int);
71  vtkGetMacro(GridScalarType,int);
72  void SetGridScalarTypeToFloat(){this->SetGridScalarType(VTK_DOUBLE);};
73  void SetGridScalarTypeToShort(){this->SetGridScalarType(VTK_SHORT);};
75  {this->SetGridScalarType(VTK_UNSIGNED_SHORT);};
77  {this->SetGridScalarType(VTK_UNSIGNED_CHAR);};
79  {this->SetGridScalarType(VTK_CHAR);};
81 
83 
87  this->UpdateShiftScale(); return this->DisplacementScale; };
89  this->UpdateShiftScale(); return this->DisplacementShift; };
91 
93  vtkImageData* GetOutput();
94 
96 
97  virtual int ProcessRequest(vtkInformation*,
101 
102 protected:
105 
106  void RequestInformation (vtkInformation *,
108 
109  void RequestData(vtkInformation *,
111 
114  void UpdateShiftScale();
115 
116  unsigned long GetMTime();
117 
119 
121  int GridExtent[6];
122  double GridOrigin[3];
123  double GridSpacing[3];
124 
128 
129  // see algorithm for more info
131 
132 private:
133  vtkTransformToGrid(const vtkTransformToGrid&); // Not implemented.
134  void operator=(const vtkTransformToGrid&); // Not implemented.
135 };
136 
137 #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:33
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
vtkTimeStamp ShiftScaleTime
void SetGridScalarTypeToUnsignedShort()
#define VTK_DOUBLE
Definition: vtkType.h:36
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
virtual int FillOutputPortInformation(int port, vtkInformation *info)
void SetGridScalarTypeToUnsignedChar()
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:37
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
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
#define VTK_HYBRID_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)