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::GradientImageFilterType;
76 using typename Superclass::GradientImageFilterPointer;
77 using typename Superclass::FixedImageMaskType;
78 using typename Superclass::FixedImageMaskPointer;
79 using typename Superclass::MovingImageMaskType;
80 using typename Superclass::MovingImageMaskPointer;
81 using typename Superclass::MeasureType;
82 using typename Superclass::DerivativeType;
83 using typename Superclass::ParametersType;
86 using typename Superclass::ImageSamplerType;
90 using typename Superclass::InternalMaskPixelType;
91 using typename Superclass::InternalMovingImageMaskType;
92 using typename Superclass::MovingImageMaskInterpolatorType;
97
99 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
100
102 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
103
105 using FixedFeatureImageType = TFixedFeatureImage;
106 using FixedFeatureImagePointer = typename FixedFeatureImageType::Pointer;
107 using MovingFeatureImageType = TMovingFeatureImage;
108 using MovingFeatureImagePointer = typename MovingFeatureImageType::Pointer;
109 using FixedFeatureImageVectorType = std::vector<FixedFeatureImagePointer>;
110 using MovingFeatureImageVectorType = std::vector<MovingFeatureImagePointer>;
111
113 using FixedFeatureInterpolatorType = InterpolateImageFunction<FixedFeatureImageType, double>;
114 using MovingFeatureInterpolatorType = InterpolateImageFunction<MovingFeatureImageType, double>;
115 using FixedFeatureInterpolatorPointer = typename FixedFeatureInterpolatorType::Pointer;
116 using MovingFeatureInterpolatorPointer = typename MovingFeatureInterpolatorType::Pointer;
117 using FixedFeatureInterpolatorVectorType = std::vector<FixedFeatureInterpolatorPointer>;
118 using MovingFeatureInterpolatorVectorType = std::vector<MovingFeatureInterpolatorPointer>;
119
121 void
123
125 itkGetConstMacro(NumberOfFixedFeatureImages, unsigned int);
126
128 void
130
131 void
133 {
134 this->SetFixedFeatureImage(0, im);
135 }
136
137
139 const FixedFeatureImageType *
140 GetFixedFeatureImage(unsigned int i) const;
141
144 {
145 return this->GetFixedFeatureImage(0);
146 }
147
148
150 void
152
153 void
155 {
156 this->SetFixedFeatureInterpolator(0, interpolator);
157 }
158
159
161 const FixedFeatureInterpolatorType *
162 GetFixedFeatureInterpolator(unsigned int i) const;
163
166 {
167 return this->GetFixedFeatureInterpolator(0);
168 }
169
170
172 void
174
176 itkGetConstMacro(NumberOfMovingFeatureImages, unsigned int);
177
179 void
181
182 void
184 {
185 this->SetMovingFeatureImage(0, im);
186 }
187
188
190 const MovingFeatureImageType *
191 GetMovingFeatureImage(unsigned int i) const;
192
195 {
196 return this->GetMovingFeatureImage(0);
197 }
198
199
201 void
203
204 void
206 {
207 this->SetMovingFeatureInterpolator(0, interpolator);
208 }
209
210
212 const MovingFeatureInterpolatorType *
213 GetMovingFeatureInterpolator(unsigned int i) const;
214
217 {
218 return this->GetMovingFeatureInterpolator(0);
219 }
220
221
223 virtual void
225
226protected:
229 void
230 PrintSelf(std::ostream & os, Indent indent) const;
231
233 using BSplineInterpolatorPointer = typename BSplineInterpolatorType::Pointer;
234 using BSplineFeatureInterpolatorVectorType = std::vector<BSplineInterpolatorPointer>;
235 using typename Superclass::FixedImagePointType;
239
247
250
254 virtual void
256};
257
258} // end namespace itk
259
260#ifndef ITK_MANUAL_INSTANTIATION
261# include "itkImageToImageMetricWithFeatures.hxx"
262#endif
263
264#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
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
typename TransformType::InputPointType FixedImagePointType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
typename ImageSamplerType::Pointer ImageSamplerPointer
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
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)
void SetFixedFeatureImage(FixedFeatureImageType *im)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator() const
void SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType *interpolator)
MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators
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)
FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators
BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators
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 2023-01-13 for elastix by doxygen 1.9.6 elastix logo