NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkSumLogJacobianDeterminantConstraint.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 itkSumLogJacobianDeterminantConstraint_h
16 #define itkSumLogJacobianDeterminantConstraint_h
17 
18 #include "itkConstraint.h"
19 #include <itkUCLBSplineTransform.h>
20 
21 namespace itk
22 {
23 
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  >
44  public Constraint
45 {
46 public:
50  typedef SmartPointer<Self> Pointer;
51  typedef SmartPointer<const Self> ConstPointer;
52  typedef Superclass::MeasureType MeasureType;
53  typedef Superclass::DerivativeType DerivativeType;
54  typedef Superclass::ParametersType ParametersType;
55 
59 
61  itkNewMacro(Self);
62 
65 
67  virtual MeasureType EvaluateConstraint(const ParametersType & parameters);
68 
70  virtual void EvaluateDerivative(const ParametersType & parameters, DerivativeType & derivative ) const;
71 
73  itkSetObjectMacro( Transform, TransformType );
74  itkGetObjectMacro( Transform, TransformType );
75 
76 protected:
77 
80 
81  void PrintSelf(std::ostream& os, Indent indent) const;
82 
83 private:
84 
85  SumLogJacobianDeterminantConstraint(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 "itkSumLogJacobianDeterminantConstraint.txx"
97 #endif
98 
99 #endif
Deformable transform using a BSpline representation.
Definition: itkUCLBSplineTransform.h:56
Superclass::MeasureType MeasureType
Definition: itkSumLogJacobianDeterminantConstraint.h:52
Definition: niftkITKAffineResampleImage.cxx:74
Abstract Base class for constraints, which are objects that return a single double value...
Definition: itkConstraint.h:42
SumLogJacobianDeterminantConstraint Self
Definition: itkSumLogJacobianDeterminantConstraint.h:48
itk::UCLBSplineTransform< TFixedImage, TScalarType, NDimensions, TDeformationScalar > TransformType
Definition: itkSumLogJacobianDeterminantConstraint.h:57
Superclass::DerivativeType DerivativeType
Definition: itkSumLogJacobianDeterminantConstraint.h:53
SmartPointer< Self > Pointer
Definition: itkUCLBSplineTransform.h:64
Superclass::ParametersType ParametersType
Definition: itkSumLogJacobianDeterminantConstraint.h:54
Constraint Superclass
Definition: itkSumLogJacobianDeterminantConstraint.h:49
SmartPointer< Self > Pointer
Definition: itkSumLogJacobianDeterminantConstraint.h:50
SmartPointer< const Self > ConstPointer
Definition: itkSumLogJacobianDeterminantConstraint.h:51
Calculated the sum of the log of the jacobian determinant of a BSpline transform, to be used as regul...
Definition: itkSumLogJacobianDeterminantConstraint.h:43
TransformType::Pointer TransformPointer
Definition: itkSumLogJacobianDeterminantConstraint.h:58
virtual ~SumLogJacobianDeterminantConstraint()
Definition: itkSumLogJacobianDeterminantConstraint.h:79