go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTransformBendingEnergyPenaltyTerm.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkTransformBendingEnergyPenaltyTerm_h
19#define itkTransformBendingEnergyPenaltyTerm_h
20
22#include "itkImageGridSampler.h"
23
24namespace itk
25{
26
49template <class TFixedImage, class TScalarType>
50class ITK_TEMPLATE_EXPORT TransformBendingEnergyPenaltyTerm : public TransformPenaltyTerm<TFixedImage, TScalarType>
51{
52public:
54
58 using Pointer = SmartPointer<Self>;
59 using ConstPointer = SmartPointer<const Self>;
60
62 itkNewMacro(Self);
63
66
68 using typename Superclass::CoordinateRepresentationType;
69 using typename Superclass::MovingImageType;
70 using typename Superclass::MovingImagePixelType;
71 using typename Superclass::MovingImagePointer;
72 using typename Superclass::MovingImageConstPointer;
73 using typename Superclass::FixedImageType;
74 using typename Superclass::FixedImagePointer;
75 using typename Superclass::FixedImageConstPointer;
76 using typename Superclass::FixedImageRegionType;
77 using typename Superclass::TransformType;
78 using typename Superclass::TransformPointer;
79 using typename Superclass::InputPointType;
80 using typename Superclass::OutputPointType;
81 using typename Superclass::TransformParametersType;
82 using typename Superclass::TransformJacobianType;
84 using typename Superclass::InterpolatorType;
85 using typename Superclass::InterpolatorPointer;
86 using typename Superclass::RealType;
87 using typename Superclass::GradientPixelType;
88 using typename Superclass::GradientImageType;
89 using typename Superclass::GradientImagePointer;
90 using typename Superclass::GradientImageFilterType;
91 using typename Superclass::GradientImageFilterPointer;
92 using typename Superclass::FixedImageMaskType;
93 using typename Superclass::FixedImageMaskPointer;
94 using typename Superclass::MovingImageMaskType;
95 using typename Superclass::MovingImageMaskPointer;
96 using typename Superclass::MeasureType;
97 using typename Superclass::DerivativeType;
99 using typename Superclass::ParametersType;
100 using typename Superclass::FixedImagePixelType;
103 using typename Superclass::ScalarType;
104 using typename Superclass::ThreaderType;
105 using typename Superclass::ThreadInfoType;
106
115
117 using typename Superclass::SpatialJacobianType;
119 using typename Superclass::SpatialHessianType;
121 using typename Superclass::InternalMatrixType;
122 using typename Superclass::HessianValueType;
123 using typename Superclass::HessianType;
124
126 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
127
129 MeasureType
130 GetValue(const ParametersType & parameters) const override;
131
133 void
134 GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override;
135
137 virtual void
138 GetValueAndDerivativeSingleThreaded(const ParametersType & parameters,
139 MeasureType & value,
140 DerivativeType & derivative) const;
141
142 void
143 GetValueAndDerivative(const ParametersType & parameters,
144 MeasureType & value,
145 DerivativeType & derivative) const override;
146
148 void
149 ThreadedGetValueAndDerivative(ThreadIdType threadID) override;
150
152 void
153 AfterThreadedGetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const override;
154
156 void
157 GetSelfHessian(const TransformParametersType & parameters, HessianType & H) const override;
158
160 itkSetMacro(NumberOfSamplesForSelfHessian, unsigned int);
161 itkGetConstMacro(NumberOfSamplesForSelfHessian, unsigned int);
162
163protected:
165 using typename Superclass::FixedImageIndexType;
168 using typename Superclass::FixedImagePointType;
172
175
178
181
182private:
184};
185
186} // end namespace itk
187
188#ifndef ITK_MANUAL_INSTANTIATION
189# include "itkTransformBendingEnergyPenaltyTerm.hxx"
190#endif
191
192#endif // #ifndef itkTransformBendingEnergyPenaltyTerm_h
Deformable transform using a B-spline representation.
This class combines two transforms: an 'initial transform' with a 'current transform'.
typename BSplineOrder1TransformType::Pointer BSplineOrder1TransformPointer
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
typename BSplineOrder3TransformType::Pointer BSplineOrder3TransformPointer
typename BSplineOrder2TransformType::Pointer BSplineOrder2TransformPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
typename AdvancedTransformType::NumberOfParametersType NumberOfParametersType
Samples image voxels on a regular grid.
A cost function that calculates the bending energy of a transformation.
virtual void GetValueAndDerivativeSingleThreaded(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const override
ITK_DISALLOW_COPY_AND_MOVE(TransformBendingEnergyPenaltyTerm)
void ThreadedGetValueAndDerivative(ThreadIdType threadID) override
void GetSelfHessian(const TransformParametersType &parameters, HessianType &H) const override
~TransformBendingEnergyPenaltyTerm() override=default
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
MeasureType GetValue(const ParametersType &parameters) const override
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
A cost function that calculates a penalty term on a transformation.
typename TransformType::JacobianOfSpatialJacobianType JacobianOfSpatialJacobianType
typename Superclass::AdvancedTransformType TransformType
typename TransformType::SpatialHessianType SpatialHessianType
typename TransformType::SpatialJacobianType SpatialJacobianType
typename TransformType::InternalMatrixType InternalMatrixType
typename TransformType::JacobianOfSpatialHessianType JacobianOfSpatialHessianType


Generated on Wed 12 Apr 2023 for elastix by doxygen 1.9.6 elastix logo