Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __itkDeformationFieldInterpolatingTransform_h
00016 #define __itkDeformationFieldInterpolatingTransform_h
00017
00018 #include <iostream>
00019 #include "itkAdvancedTransform.h"
00020 #include "itkExceptionObject.h"
00021 #include "itkImage.h"
00022 #include "itkVectorInterpolateImageFunction.h"
00023 #include "itkVectorNearestNeighborInterpolateImageFunction.h"
00024
00025
00026 namespace itk
00027 {
00028
00040 template <
00041 class TScalarType=double,
00042 unsigned int NDimensions=3,
00043 class TComponentType=double>
00044 class DeformationFieldInterpolatingTransform :
00045 public AdvancedTransform< TScalarType, NDimensions, NDimensions >
00046 {
00047 public:
00049 typedef DeformationFieldInterpolatingTransform Self;
00050 typedef AdvancedTransform< TScalarType, NDimensions, NDimensions > Superclass;
00051 typedef SmartPointer<Self> Pointer;
00052 typedef SmartPointer<const Self> ConstPointer;
00053
00055 itkNewMacro( Self );
00056
00058 itkTypeMacro( DeformationFieldInterpolatingTransform, AdvancedTransform );
00059
00061 itkStaticConstMacro(InputSpaceDimension, unsigned int, Superclass::InputSpaceDimension);
00062 itkStaticConstMacro(OutputSpaceDimension, unsigned int, Superclass::OutputSpaceDimension);
00063
00065 typedef typename Superclass::ScalarType ScalarType;
00066 typedef typename Superclass::ParametersType ParametersType;
00067 typedef typename Superclass::JacobianType JacobianType;
00068 typedef typename Superclass::InputVectorType InputVectorType;
00069 typedef typename Superclass::OutputVectorType OutputVectorType;
00070 typedef typename Superclass::InputCovariantVectorType InputCovariantVectorType;
00071 typedef typename Superclass::OutputCovariantVectorType OutputCovariantVectorType;
00072 typedef typename Superclass::InputVnlVectorType InputVnlVectorType;
00073 typedef typename Superclass::OutputVnlVectorType OutputVnlVectorType;
00074 typedef typename Superclass::InputPointType InputPointType;
00075 typedef typename Superclass::OutputPointType OutputPointType;
00076
00077 typedef TComponentType DeformationFieldComponentType;
00078 typedef Vector<DeformationFieldComponentType,
00079 itkGetStaticConstMacro(OutputSpaceDimension) > DeformationFieldVectorType;
00080 typedef Image< DeformationFieldVectorType,
00081 itkGetStaticConstMacro(InputSpaceDimension) > DeformationFieldType;
00082
00083 typedef VectorInterpolateImageFunction<
00084 DeformationFieldType, ScalarType >
00085 DeformationFieldInterpolatorType;
00086 typedef VectorNearestNeighborInterpolateImageFunction<
00087 DeformationFieldType, ScalarType >
00088 DefaultDeformationFieldInterpolatorType;
00089
00090
00094 OutputPointType TransformPoint(const InputPointType &point ) const;
00095
00098 void SetIdentity(void);
00099
00101 virtual void SetDeformationField( DeformationFieldType * _arg );
00102 itkGetObjectMacro(DeformationField, DeformationFieldType);
00103
00105 virtual void SetDeformationFieldInterpolator( DeformationFieldInterpolatorType * _arg );
00106 itkGetObjectMacro(DeformationFieldInterpolator, DeformationFieldInterpolatorType);
00107
00108 virtual bool IsLinear( void ) const { return false; };
00109
00110 protected:
00111 DeformationFieldInterpolatingTransform();
00112 ~DeformationFieldInterpolatingTransform();
00113
00115 typedef typename DeformationFieldInterpolatorType::ContinuousIndexType
00116 InputContinuousIndexType;
00117 typedef typename DeformationFieldInterpolatorType::OutputType InterpolatorOutputType;
00118
00120 void PrintSelf(std::ostream &os, Indent indent) const;
00121
00122 typename DeformationFieldType::Pointer m_DeformationField;
00123 typename DeformationFieldType::Pointer m_ZeroDeformationField;
00124 typename DeformationFieldInterpolatorType::Pointer m_DeformationFieldInterpolator;
00125
00126 private:
00127 DeformationFieldInterpolatingTransform(const Self&);
00128 void operator=(const Self&);
00129
00130
00131 };
00132
00133
00134 }
00135
00136
00137 #ifndef ITK_MANUAL_INSTANTIATION
00138 #include "itkDeformationFieldInterpolatingTransform.txx"
00139 #endif
00140
00141 #endif