vtkITKBSplineTransform.h
Go to the documentation of this file.00001
00002 #ifndef __vtkITKBSplineTransform_h
00003 #define __vtkITKBSplineTransform_h
00004
00005 #include "vtkWarpTransform.h"
00006 #include "vtkDoubleArray.h"
00007
00008 #include "itkBSplineDeformableTransform.h"
00009 #include "itkAffineTransform.h"
00010
00011 #include "vtkITK.h"
00012
00013 class vtkITKBSplineTransformHelper;
00014
00016
00019
00020 class VTK_ITK_EXPORT vtkITKBSplineTransform : public vtkWarpTransform
00021 {
00022 public:
00023
00024 typedef itk::AffineTransform<double,3> BulkTransformType;
00025
00026 static vtkITKBSplineTransform *New();
00027 vtkTypeRevisionMacro( vtkITKBSplineTransform, vtkWarpTransform );
00028 virtual void PrintSelf( ostream& os, vtkIndent indent );
00029
00030 vtkAbstractTransform* MakeTransform();
00031
00033 void SetSplineOrder( unsigned int );
00034
00035 unsigned int GetSplineOrder() const;
00036
00039 void SetGridOrigin( const double origin[3] );
00040
00042 void SetGridSpacing( const double spacing[3] );
00043
00045
00051 void SetGridSize( const unsigned int size[3] );
00052
00054 void SetParameters( vtkDoubleArray& param );
00055
00057
00061
00071
00074
00075 void SetParameters( const double* param );
00076
00078
00080 unsigned int GetNumberOfParameters() const;
00081
00082 const double* GetParameters() const;
00083
00084
00086
00088 void SetFixedParameters( const double* param, unsigned N );
00089
00091 unsigned int GetNumberOfFixedParameters() const;
00092
00094
00096 const double* GetFixedParameters() const;
00097
00099 void SetBulkTransform( const double linear[3][3], const double offset[3] );
00100 void GetBulkTransform( double linear[3][3], double offset[3] );
00101
00102 BulkTransformType const* GetBulkTransform() const;
00103
00104
00106
00113
00116 void SetSwitchCoordinateSystem( bool v );
00117
00118 bool GetSwitchCoordinateSystem() const;
00119
00120
00121 itk::Transform<double,3,3>::Pointer GetITKTransform() const;
00122
00123
00124 protected:
00125 vtkITKBSplineTransform();
00126 virtual ~vtkITKBSplineTransform();
00127
00128 void ForwardTransformPoint( const float in[3], float out[3] );
00129 void ForwardTransformPoint( const double in[3], double out[3] );
00130
00131 void ForwardTransformDerivative( const float in[3], float out[3],
00132 float derivative[3][3] );
00133 void ForwardTransformDerivative( const double in[3], double out[3],
00134 double derivative[3][3] );
00135
00136 void InverseTransformPoint( const float in[3], float out[3] );
00137
00138 void InverseTransformPoint( const double in[3], double out[3] );
00139
00140 void InverseTransformDerivative( const float in[3], float out[3],
00141 float derivative[3][3] );
00142 void InverseTransformDerivative( const double in[3], double out[3],
00143 double derivative[3][3] );
00144
00145 private:
00146 vtkITKBSplineTransformHelper* Helper;
00147 };
00148
00149 #endif