ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkPointSetToImageMetric.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkPointSetToImageMetric_h
19#define itkPointSetToImageMetric_h
20
21#include "itkImageBase.h"
22#include "itkTransform.h"
25#include "itkMacro.h"
27
28namespace itk
29{
46
47template <typename TFixedPointSet, typename TMovingImage>
48class ITK_TEMPLATE_EXPORT PointSetToImageMetric : public SingleValuedCostFunction
49{
50public:
51 ITK_DISALLOW_COPY_AND_MOVE(PointSetToImageMetric);
52
58
61
63 itkOverrideGetNameOfClassMacro(PointSetToImageMetric);
64
66 using MovingImageType = TMovingImage;
67 using MovingImagePixelType = typename TMovingImage::PixelType;
68 using MovingImageConstPointer = typename MovingImageType::ConstPointer;
69
71 using FixedPointSetType = TFixedPointSet;
72 using FixedPointSetConstPointer = typename FixedPointSetType::ConstPointer;
73
75 static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension;
76 static constexpr unsigned int FixedPointSetDimension = TFixedPointSet::PointDimension;
77
78 using PointIterator = typename FixedPointSetType::PointsContainer::ConstIterator;
79 using PointDataIterator = typename FixedPointSetType::PointDataContainer::ConstIterator;
80
84
90
93
100
102
104
107
110
113
115 itkSetConstObjectMacro(FixedPointSet, FixedPointSetType);
116 itkGetConstObjectMacro(FixedPointSet, FixedPointSetType);
118
120 itkSetConstObjectMacro(MovingImage, MovingImageType);
121 itkGetConstObjectMacro(MovingImage, MovingImageType);
123
125 itkSetObjectMacro(Transform, TransformType);
126
128 itkGetModifiableObjectMacro(Transform, TransformType);
129
131 itkSetObjectMacro(Interpolator, InterpolatorType);
132
134 itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
135
137 itkGetModifiableObjectMacro(GradientImage, GradientImageType);
138
140 itkGetConstReferenceMacro(NumberOfPixelsCounted, SizeValueType);
141
143 void
144 SetTransformParameters(const ParametersType & parameters) const;
145
153 itkSetMacro(ComputeGradient, bool);
154 itkGetConstReferenceMacro(ComputeGradient, bool);
156
158 unsigned int
159 GetNumberOfParameters() const override
160 {
161 return m_Transform->GetNumberOfParameters();
162 }
163
165 virtual void
167
168protected:
170 ~PointSetToImageMetric() override = default;
171 void
172 PrintSelf(std::ostream & os, Indent indent) const override;
173
175
177
179
181
183
185
187};
188} // end namespace itk
189
190#ifndef ITK_MANUAL_INSTANTIATION
191# include "itkPointSetToImageMetric.hxx"
192#endif
193
194#endif
A templated class holding a n-Dimensional covariant vector.
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
Base class for all image interpolators.
typename TransformType::InputPointType InputPointType
unsigned int GetNumberOfParameters() const override
Superclass::MeasureType MeasureType
void SetTransformParameters(const ParametersType &parameters) const
typename TransformType::Pointer TransformPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Superclass::DerivativeType DerivativeType
GradientRecursiveGaussianImageFilter< MovingImageType, GradientImageType > GradientImageFilterType
Transform< CoordinateRepresentationType, Self::MovingImageDimension, Self::FixedPointSetDimension > TransformType
CovariantVector< RealType, Self::MovingImageDimension > GradientPixelType
Superclass::ParametersValueType CoordinateRepresentationType
typename TransformType::JacobianType TransformJacobianType
typename FixedPointSetType::ConstPointer FixedPointSetConstPointer
typename TMovingImage::PixelType MovingImagePixelType
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > InterpolatorType
SmartPointer< GradientImageType > GradientImagePointer
typename GradientImageFilterType::Pointer GradientImageFilterPointer
typename FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator
void PrintSelf(std::ostream &os, Indent indent) const override
~PointSetToImageMetric() override=default
typename NumericTraits< MovingImagePixelType >::RealType RealType
typename FixedPointSetType::PointsContainer::ConstIterator PointIterator
typename InterpolatorType::Pointer InterpolatorPointer
SmartPointer< const Self > ConstPointer
Superclass::ParametersType ParametersType
SingleValuedCostFunction Superclass
typename TransformType::ParametersType TransformParametersType
Image< GradientPixelType, Self::MovingImageDimension > GradientImageType
typename TransformType::OutputPointType OutputPointType
Array< ParametersValueType > DerivativeType
Superclass::ParametersValueType ParametersValueType
Superclass::ParametersType ParametersType
Implements transparent reference counting.
Transform points and vectors from an input space to an output space.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86