go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkDistancePreservingRigidityPenaltyTerm.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 itkDistancePreservingRigidityPenaltyTerm_h
19#define itkDistancePreservingRigidityPenaltyTerm_h
20
22
26
28#include "itkNeighborhood.h"
29#include "itkImageRegionIterator.h"
30#include "itkNeighborhoodOperatorImageFilter.h"
31#include "itkNeighborhoodIterator.h"
32
33#include "itkImageRegionIterator.h"
34#include "itkMultiResolutionPyramidImageFilter.h"
35
36namespace itk
37{
75template <class TFixedImage, class TScalarType>
76class ITK_TEMPLATE_EXPORT DistancePreservingRigidityPenaltyTerm : public TransformPenaltyTerm<TFixedImage, TScalarType>
77{
78public:
80
84 using Pointer = SmartPointer<Self>;
85 using ConstPointer = SmartPointer<const Self>;
86
88 itkNewMacro(Self);
89
92
94 using typename Superclass::CoordinateRepresentationType;
95 using typename Superclass::MovingImageType;
96 using typename Superclass::MovingImagePixelType;
97 using typename Superclass::MovingImagePointer;
98 using typename Superclass::MovingImageConstPointer;
99 using typename Superclass::FixedImageType;
100 using typename Superclass::FixedImagePointer;
101 using typename Superclass::FixedImageConstPointer;
102 using typename Superclass::FixedImageRegionType;
103 using typename Superclass::TransformType;
104 using typename Superclass::TransformPointer;
105 using typename Superclass::InputPointType;
106 using typename Superclass::OutputPointType;
107 using typename Superclass::TransformParametersType;
108 using typename Superclass::TransformJacobianType;
109 using typename Superclass::InterpolatorType;
110 using typename Superclass::InterpolatorPointer;
111 using typename Superclass::RealType;
112 using typename Superclass::GradientPixelType;
113 using typename Superclass::GradientImageType;
114 using typename Superclass::GradientImagePointer;
115 using typename Superclass::GradientImageFilterType;
116 using typename Superclass::GradientImageFilterPointer;
117 using typename Superclass::FixedImageMaskType;
118 using typename Superclass::FixedImageMaskPointer;
119 using typename Superclass::MovingImageMaskType;
120 using typename Superclass::MovingImageMaskPointer;
121 using typename Superclass::MeasureType;
122 using typename Superclass::DerivativeType;
123 using typename Superclass::DerivativeValueType;
124 using typename Superclass::ParametersType;
125 using typename Superclass::FixedImagePixelType;
128 using typename Superclass::ScalarType;
129
131 using typename Superclass::SpatialJacobianType;
133 using typename Superclass::SpatialHessianType;
135 using typename Superclass::InternalMatrixType;
136
138 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
139 itkStaticConstMacro(MovingImageDimension, unsigned int, FixedImageType::ImageDimension);
140 itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension);
141
143 void
144 Initialize() override;
145
151 using CoefficientImagePointer = typename CoefficientImageType::Pointer;
152 using CoefficientImageSpacingType = typename CoefficientImageType::SpacingType;
154
156 MeasureType
157 GetValue(const ParametersType & parameters) const override;
158
160 void
161 GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override;
162
164 void
165 GetValueAndDerivative(const ParametersType & parameters,
166 MeasureType & value,
167 DerivativeType & derivative) const override;
168
173
176 using BSplineKnotImagePointer = typename BSplineKnotImageType::Pointer;
177 using BSplineKnotImageRegionType = typename BSplineKnotImageType::RegionType;
178
181 using PenaltyGridImagePointer = typename PenaltyGridImageType::Pointer;
182 using PenaltyGridImageRegionType = typename PenaltyGridImageType::RegionType;
183
186 using SegmentedImagePointer = typename SegmentedImageType::Pointer;
187 using SegmentedImageRegionType = typename SegmentedImageType::RegionType;
188
190 itkSetObjectMacro(SegmentedImage, SegmentedImageType);
191
194
196 itkSetObjectMacro(SampledSegmentedImage, SegmentedImageType);
197
200
201 itkGetConstMacro(NumberOfRigidGrids, unsigned int);
202
203protected:
206
209
211 void
212 PrintSelf(std::ostream & os, Indent indent) const override;
213
214private:
217
218 mutable MeasureType m_RigidityPenaltyTermValue;
219
224
226};
227
228// end class DistancePreservingRigidityPenaltyTerm
229
230} // end namespace itk
231
232#ifndef ITK_MANUAL_INSTANTIATION
233# include "itkDistancePreservingRigidityPenaltyTerm.hxx"
234#endif
235
236#endif // #ifndef itkDistancePreservingRigidityPenaltyTerm_h
Deformable transform using a B-spline representation.
This class combines two transforms: an 'initial transform' with a 'current transform'.
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
typename BSplineTransformType::SpacingType GridSpacingType
typename BSplineKnotImageType::RegionType BSplineKnotImageRegionType
typename PenaltyGridImageType::RegionType PenaltyGridImageRegionType
ITK_DISALLOW_COPY_AND_MOVE(DistancePreservingRigidityPenaltyTerm)
~DistancePreservingRigidityPenaltyTerm() override=default
itkStaticConstMacro(ImageDimension, unsigned int, FixedImageType::ImageDimension)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkGetModifiableObjectMacro(SegmentedImage, SegmentedImageType)
void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const override
itkGetModifiableObjectMacro(SampledSegmentedImage, SegmentedImageType)
itkStaticConstMacro(MovingImageDimension, unsigned int, FixedImageType::ImageDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
typename CoefficientImageType::SpacingType CoefficientImageSpacingType
MeasureType GetValue(const ParametersType &parameters) const override
typename SegmentedImageType::RegionType SegmentedImageRegionType
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 2023-01-13 for elastix by doxygen 1.9.6 elastix logo