NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkBSplineBendingEnergyConstraint.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkBSplineBendingEnergyConstraint_h
16 #define itkBSplineBendingEnergyConstraint_h
17 
18 #include "itkConstraint.h"
19 #include <itkUCLBSplineTransform.h>
20 
21 
22 namespace itk
23 {
24 
37 template <
38  class TFixedImage, // Templated over the image type.
39  class TScalarType, // Data type for scalars
40  unsigned int NDimensions, // Number of Dimensions i.e. 2D or 3D
41  class TDeformationScalar // The data type for the vector field
42  >
43 class ITK_EXPORT BSplineBendingEnergyConstraint :
44  public Constraint
45 {
46 public:
50  typedef SmartPointer<Self> Pointer;
51  typedef SmartPointer<const Self> ConstPointer;
55 
59 
61  itkNewMacro(Self);
62 
65 
67  virtual MeasureType EvaluateConstraint(const ParametersType & parameters) override;
68 
70  virtual void EvaluateDerivative(const ParametersType & parameters, DerivativeType & derivative ) const override;
71 
73  itkSetObjectMacro( Transform, TransformType );
74  itkGetObjectMacro( Transform, TransformType );
75 
76 protected:
77 
80 
81  void PrintSelf(std::ostream& os, Indent indent) const override;
82 
83 private:
84 
85  BSplineBendingEnergyConstraint(const Self&); // purposely not implemented
86  void operator=(const Self&); // purposely not implemented
87 
89  TransformPointer m_Transform;
90 
91 };
92 
93 } // end namespace itk
94 
95 #ifndef ITK_MANUAL_INSTANTIATION
96 #include "itkBSplineBendingEnergyConstraint.txx"
97 #endif
98 
99 #endif
SingleValuedCostFunction::ParametersType ParametersType
Definition: itkConstraint.h:53
Deformable transform using a BSpline representation.
Definition: itkUCLBSplineTransform.h:56
SingleValuedCostFunction::DerivativeType DerivativeType
Definition: itkConstraint.h:52
Superclass::MeasureType MeasureType
Definition: itkBSplineBendingEnergyConstraint.h:52
SmartPointer< Self > Pointer
Definition: itkBSplineBendingEnergyConstraint.h:50
Definition: niftkITKAffineResampleImage.cxx:74
Calculated the bending energy, to be used as regulariser in FFD.
Definition: itkBSplineBendingEnergyConstraint.h:43
Abstract Base class for constraints, which are objects that return a single double value...
Definition: itkConstraint.h:42
Superclass::ParametersType ParametersType
Definition: itkBSplineBendingEnergyConstraint.h:54
SmartPointer< Self > Pointer
Definition: itkUCLBSplineTransform.h:64
virtual ~BSplineBendingEnergyConstraint()
Definition: itkBSplineBendingEnergyConstraint.h:79
SingleValuedCostFunction::MeasureType MeasureType
Definition: itkConstraint.h:51
Superclass::DerivativeType DerivativeType
Definition: itkBSplineBendingEnergyConstraint.h:53
BSplineBendingEnergyConstraint Self
Definition: itkBSplineBendingEnergyConstraint.h:48
Constraint Superclass
Definition: itkBSplineBendingEnergyConstraint.h:49
SmartPointer< const Self > ConstPointer
Definition: itkBSplineBendingEnergyConstraint.h:51
TransformType::Pointer TransformPointer
Definition: itkBSplineBendingEnergyConstraint.h:58
itk::UCLBSplineTransform< TFixedImage, TScalarType, NDimensions, TDeformationScalar > TransformType
Definition: itkBSplineBendingEnergyConstraint.h:57