go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageToImageMetricWithFeatures.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 itkImageToImageMetricWithFeatures_h
19#define itkImageToImageMetricWithFeatures_h
20
22#include "itkInterpolateImageFunction.h"
23
24namespace itk
25{
26
37template <class TFixedImage,
38 class TMovingImage,
39 class TFixedFeatureImage = TFixedImage,
40 class TMovingFeatureImage = TMovingImage>
41class ITK_TEMPLATE_EXPORT ImageToImageMetricWithFeatures : public AdvancedImageToImageMetric<TFixedImage, TMovingImage>
42{
43public:
45
49 using Pointer = SmartPointer<Self>;
50 using ConstPointer = SmartPointer<const Self>;
51
54
56 using typename Superclass::CoordinateRepresentationType;
57 using typename Superclass::MovingImageType;
58 using typename Superclass::MovingImagePixelType;
59 using typename Superclass::MovingImageConstPointer;
60 using typename Superclass::FixedImageType;
61 using typename Superclass::FixedImageConstPointer;
62 using typename Superclass::FixedImageRegionType;
63 using typename Superclass::TransformType;
64 using typename Superclass::TransformPointer;
65 using typename Superclass::InputPointType;
66 using typename Superclass::OutputPointType;
67 using typename Superclass::TransformParametersType;
68 using typename Superclass::TransformJacobianType;
69 using typename Superclass::InterpolatorType;
70 using typename Superclass::InterpolatorPointer;
71 using typename Superclass::RealType;
72 using typename Superclass::GradientPixelType;
73 using typename Superclass::GradientImageType;
74 using typename Superclass::GradientImagePointer;
75 using typename Superclass::FixedImageMaskType;
79 using typename Superclass::MeasureType;
80 using typename Superclass::DerivativeType;
81 using typename Superclass::ParametersType;
84 using typename Superclass::ImageSamplerType;
88 using typename Superclass::InternalMaskPixelType;
89 using typename Superclass::InternalMovingImageMaskType;
90 using typename Superclass::MovingImageMaskInterpolatorType;
95
97 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
98
100 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
101
103 using FixedFeatureImageType = TFixedFeatureImage;
104 using FixedFeatureImagePointer = typename FixedFeatureImageType::Pointer;
105 using MovingFeatureImageType = TMovingFeatureImage;
106 using MovingFeatureImagePointer = typename MovingFeatureImageType::Pointer;
107 using FixedFeatureImageVectorType = std::vector<FixedFeatureImagePointer>;
108 using MovingFeatureImageVectorType = std::vector<MovingFeatureImagePointer>;
109
111 using FixedFeatureInterpolatorType = InterpolateImageFunction<FixedFeatureImageType, double>;
112 using MovingFeatureInterpolatorType = InterpolateImageFunction<MovingFeatureImageType, double>;
113 using FixedFeatureInterpolatorPointer = typename FixedFeatureInterpolatorType::Pointer;
114 using MovingFeatureInterpolatorPointer = typename MovingFeatureInterpolatorType::Pointer;
115 using FixedFeatureInterpolatorVectorType = std::vector<FixedFeatureInterpolatorPointer>;
116 using MovingFeatureInterpolatorVectorType = std::vector<MovingFeatureInterpolatorPointer>;
117
119 void
121
123 itkGetConstMacro(NumberOfFixedFeatureImages, unsigned int);
124
126 void
128
129 void
131 {
132 this->SetFixedFeatureImage(0, im);
133 }
134
135
137 const FixedFeatureImageType *
138 GetFixedFeatureImage(unsigned int i) const;
139
142 {
143 return this->GetFixedFeatureImage(0);
144 }
145
146
148 void
150
151 void
153 {
154 this->SetFixedFeatureInterpolator(0, interpolator);
155 }
156
157
159 const FixedFeatureInterpolatorType *
160 GetFixedFeatureInterpolator(unsigned int i) const;
161
164 {
165 return this->GetFixedFeatureInterpolator(0);
166 }
167
168
170 void
172
174 itkGetConstMacro(NumberOfMovingFeatureImages, unsigned int);
175
177 void
179
180 void
182 {
183 this->SetMovingFeatureImage(0, im);
184 }
185
186
188 const MovingFeatureImageType *
189 GetMovingFeatureImage(unsigned int i) const;
190
193 {
194 return this->GetMovingFeatureImage(0);
195 }
196
197
199 void
201
202 void
204 {
205 this->SetMovingFeatureInterpolator(0, interpolator);
206 }
207
208
210 const MovingFeatureInterpolatorType *
211 GetMovingFeatureInterpolator(unsigned int i) const;
212
215 {
216 return this->GetMovingFeatureInterpolator(0);
217 }
218
219
221 virtual void
223
224protected:
227 void
228 PrintSelf(std::ostream & os, Indent indent) const;
229
231 using BSplineInterpolatorPointer = typename BSplineInterpolatorType::Pointer;
232 using BSplineFeatureInterpolatorVectorType = std::vector<BSplineInterpolatorPointer>;
233 using typename Superclass::FixedImagePointType;
237
239 unsigned int m_NumberOfFixedFeatureImages{ 0 };
240 unsigned int m_NumberOfMovingFeatureImages{ 0 };
241 FixedFeatureImageVectorType m_FixedFeatureImages{};
242 MovingFeatureImageVectorType m_MovingFeatureImages{};
243 FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators{};
244 MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators{};
245
246 std::vector<bool> m_FeatureInterpolatorsIsBSpline{};
247 BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators{};
248
252 virtual void
254};
255
256} // end namespace itk
257
258#ifndef ITK_MANUAL_INSTANTIATION
259# include "itkImageToImageMetricWithFeatures.hxx"
260#endif
261
262#endif // end #ifndef itkImageToImageMetricWithFeatures_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
typename MovingImageType::RegionType MovingImageRegionType
typename FixedImageType::PixelType FixedImagePixelType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
typename TransformType::InputPointType FixedImagePointType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
This class is a base class for any image sampler.
Computes similarity between regions of two images.
void SetMovingFeatureImage(unsigned int i, MovingFeatureImageType *im)
typename FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer
typename FixedFeatureImageType::Pointer FixedFeatureImagePointer
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator() const
const MovingFeatureImageType * GetMovingFeatureImage() const
std::vector< MovingFeatureImagePointer > MovingFeatureImageVectorType
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator(unsigned int i) const
void SetNumberOfFixedFeatureImages(unsigned int arg)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator() const
void SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType *interpolator)
virtual void CheckForBSplineFeatureInterpolators()
void SetMovingFeatureImage(MovingFeatureImageType *im)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
const MovingFeatureImageType * GetMovingFeatureImage(unsigned int i) const
std::vector< MovingFeatureInterpolatorPointer > MovingFeatureInterpolatorVectorType
InterpolateImageFunction< FixedFeatureImageType, double > FixedFeatureInterpolatorType
const FixedFeatureImageType * GetFixedFeatureImage() const
void SetNumberOfMovingFeatureImages(unsigned int arg)
std::vector< BSplineInterpolatorPointer > BSplineFeatureInterpolatorVectorType
void SetMovingFeatureInterpolator(MovingFeatureInterpolatorType *interpolator)
void SetFixedFeatureInterpolator(unsigned int i, FixedFeatureInterpolatorType *interpolator)
typename MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer
typename MovingFeatureImageType::Pointer MovingFeatureImagePointer
void SetFixedFeatureImage(unsigned int i, FixedFeatureImageType *im)
std::vector< FixedFeatureInterpolatorPointer > FixedFeatureInterpolatorVectorType
void PrintSelf(std::ostream &os, Indent indent) const
const FixedFeatureImageType * GetFixedFeatureImage(unsigned int i) const
void SetFixedFeatureInterpolator(FixedFeatureInterpolatorType *interpolator)
typename BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricWithFeatures)
InterpolateImageFunction< MovingFeatureImageType, double > MovingFeatureInterpolatorType
std::vector< FixedFeatureImagePointer > FixedFeatureImageVectorType
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator(unsigned int i) const
Base class for all ITK limiter function objects.


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo