Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __itkTransformBendingEnergyPenaltyTerm_h
00015 #define __itkTransformBendingEnergyPenaltyTerm_h
00016
00017 #include "itkTransformPenaltyTerm.h"
00018 #include "itkImageGridSampler.h"
00019
00020 namespace itk
00021 {
00022
00045 template< class TFixedImage, class TScalarType >
00046 class TransformBendingEnergyPenaltyTerm
00047 : public TransformPenaltyTerm< TFixedImage, TScalarType >
00048 {
00049 public:
00050
00052 typedef TransformBendingEnergyPenaltyTerm Self;
00053 typedef TransformPenaltyTerm<
00054 TFixedImage, TScalarType > Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00059 itkNewMacro( Self );
00060
00062 itkTypeMacro( TransformBendingEnergyPenaltyTerm, TransformPenaltyTerm );
00063
00065 typedef typename Superclass::CoordinateRepresentationType CoordinateRepresentationType;
00066 typedef typename Superclass::MovingImageType MovingImageType;
00067 typedef typename Superclass::MovingImagePixelType MovingImagePixelType;
00068 typedef typename Superclass::MovingImagePointer MovingImagePointer;
00069 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
00070 typedef typename Superclass::FixedImageType FixedImageType;
00071 typedef typename Superclass::FixedImagePointer FixedImagePointer;
00072 typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
00073 typedef typename Superclass::FixedImageRegionType FixedImageRegionType;
00074 typedef typename Superclass::TransformType TransformType;
00075 typedef typename Superclass::TransformPointer TransformPointer;
00076 typedef typename Superclass::InputPointType InputPointType;
00077 typedef typename Superclass::OutputPointType OutputPointType;
00078 typedef typename Superclass::TransformParametersType TransformParametersType;
00079 typedef typename Superclass::TransformJacobianType TransformJacobianType;
00080 typedef typename Superclass::InterpolatorType InterpolatorType;
00081 typedef typename Superclass::InterpolatorPointer InterpolatorPointer;
00082 typedef typename Superclass::RealType RealType;
00083 typedef typename Superclass::GradientPixelType GradientPixelType;
00084 typedef typename Superclass::GradientImageType GradientImageType;
00085 typedef typename Superclass::GradientImagePointer GradientImagePointer;
00086 typedef typename Superclass::GradientImageFilterType GradientImageFilterType;
00087 typedef typename Superclass::GradientImageFilterPointer GradientImageFilterPointer;
00088 typedef typename Superclass::FixedImageMaskType FixedImageMaskType;
00089 typedef typename Superclass::FixedImageMaskPointer FixedImageMaskPointer;
00090 typedef typename Superclass::MovingImageMaskType MovingImageMaskType;
00091 typedef typename Superclass::MovingImageMaskPointer MovingImageMaskPointer;
00092 typedef typename Superclass::MeasureType MeasureType;
00093 typedef typename Superclass::DerivativeType DerivativeType;
00094 typedef typename Superclass::DerivativeValueType DerivativeValueType;
00095 typedef typename Superclass::ParametersType ParametersType;
00096 typedef typename Superclass::FixedImagePixelType FixedImagePixelType;
00097 typedef typename Superclass::ImageSampleContainerType ImageSampleContainerType;
00098 typedef typename Superclass::ImageSampleContainerPointer ImageSampleContainerPointer;
00099 typedef typename Superclass::ScalarType ScalarType;
00100
00102 typedef typename Superclass::SpatialJacobianType SpatialJacobianType;
00103 typedef typename Superclass
00104 ::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType;
00105 typedef typename Superclass::SpatialHessianType SpatialHessianType;
00106 typedef typename Superclass
00107 ::JacobianOfSpatialHessianType JacobianOfSpatialHessianType;
00108 typedef typename Superclass::InternalMatrixType InternalMatrixType;
00109 typedef typename Superclass::HessianValueType HessianValueType;
00110 typedef typename Superclass::HessianType HessianType;
00111
00113 itkStaticConstMacro( FixedImageDimension, unsigned int, FixedImageType::ImageDimension );
00114
00116 virtual MeasureType GetValue( const ParametersType & parameters ) const;
00117
00119 virtual void GetDerivative( const ParametersType & parameters,
00120 DerivativeType & derivative ) const;
00121
00123 virtual void GetValueAndDerivative(
00124 const ParametersType & parameters,
00125 MeasureType & value,
00126 DerivativeType & derivative ) const;
00127
00129 virtual void GetSelfHessian( const TransformParametersType & parameters, HessianType & H ) const;
00130
00132 itkSetMacro( NumberOfSamplesForSelfHessian, unsigned int );
00133 itkGetConstMacro( NumberOfSamplesForSelfHessian, unsigned int );
00134
00135 protected:
00136
00138 typedef typename Superclass::FixedImageIndexType FixedImageIndexType;
00139 typedef typename Superclass::FixedImageIndexValueType FixedImageIndexValueType;
00140 typedef typename Superclass::MovingImageIndexType MovingImageIndexType;
00141 typedef typename Superclass::FixedImagePointType FixedImagePointType;
00142 typedef typename Superclass::MovingImagePointType MovingImagePointType;
00143 typedef typename Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType;
00144 typedef typename Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType;
00145
00147 typedef typename Superclass::BSplineTransformType BSplineTransformType;
00148 typedef typename Superclass::CombinationTransformType CombinationTransformType;
00149
00151 typedef ImageGridSampler<FixedImageType> SelfHessianSamplerType;
00152
00154 TransformBendingEnergyPenaltyTerm();
00155
00157 virtual ~TransformBendingEnergyPenaltyTerm() {};
00158
00159 private:
00160
00162 TransformBendingEnergyPenaltyTerm( const Self& );
00164 void operator=( const Self& );
00165
00166 unsigned int m_NumberOfSamplesForSelfHessian;
00167
00168 };
00169
00170
00171 }
00172
00173 #ifndef ITK_MANUAL_INSTANTIATION
00174 #include "itkTransformBendingEnergyPenaltyTerm.txx"
00175 #endif
00176
00177 #endif // #ifndef __itkTransformBendingEnergyPenaltyTerm_h
00178