ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkTwoImageToOneImageMetric.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 itkTwoImageToOneImageMetric_h
19#define itkTwoImageToOneImageMetric_h
20
21#include "itkImageBase.h"
22#include "itkTransform.h"
26#include "itkSpatialObject.h"
27
28namespace itk
29{
30
50
51template <typename TFixedImage, typename TMovingImage>
53{
54public:
55 ITK_DISALLOW_COPY_AND_MOVE(TwoImageToOneImageMetric);
56
62
65
67 itkOverrideGetNameOfClassMacro(TwoImageToOneImageMetric);
68
70 using MovingImageType = TMovingImage;
71 using MovingImagePixelType = typename TMovingImage::PixelType;
72 using MovingImageConstPointer = typename MovingImageType::ConstPointer;
73
75 using FixedImageType = TFixedImage;
76 using FixedImageConstPointer = typename FixedImageType::ConstPointer;
77 using FixedImageRegionType = typename FixedImageType::RegionType;
78
80 static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension;
81 static constexpr unsigned int FixedImageDimension = TFixedImage::ImageDimension;
82
85
91
94
95
104
109
114
115
118
121
124
126 itkSetConstObjectMacro(FixedImage1, FixedImageType);
127
129 itkSetConstObjectMacro(FixedImage2, FixedImageType);
130
132 itkGetConstObjectMacro(FixedImage1, FixedImageType);
133
135 itkGetConstObjectMacro(FixedImage2, FixedImageType);
136
138 itkSetConstObjectMacro(MovingImage, MovingImageType);
139
141 itkGetConstObjectMacro(MovingImage, MovingImageType);
142
144 itkSetObjectMacro(Transform, TransformType);
145
147 itkGetConstObjectMacro(Transform, TransformType);
148
150 itkSetObjectMacro(Interpolator1, InterpolatorType);
151
153 itkSetObjectMacro(Interpolator2, InterpolatorType);
154
156 itkGetConstObjectMacro(Interpolator1, InterpolatorType);
157
159 itkGetConstObjectMacro(Interpolator2, InterpolatorType);
160
162 itkGetConstReferenceMacro(NumberOfPixelsCounted, unsigned long);
163
166
169
171 itkGetConstReferenceMacro(FixedImageRegion1, FixedImageRegionType);
172
174 itkGetConstReferenceMacro(FixedImageRegion2, FixedImageRegionType);
175
177 itkSetObjectMacro(MovingImageMask, MovingImageMaskType);
178 itkGetConstObjectMacro(MovingImageMask, MovingImageMaskType);
179
181 itkSetObjectMacro(FixedImageMask1, FixedImageMaskType);
182 itkSetObjectMacro(FixedImageMask2, FixedImageMaskType);
183 itkGetConstObjectMacro(FixedImageMask1, FixedImageMaskType);
184 itkGetConstObjectMacro(FixedImageMask2, FixedImageMaskType);
185
187 itkSetMacro(ComputeGradient, bool);
188 itkGetConstReferenceMacro(ComputeGradient, bool);
189 itkBooleanMacro(ComputeGradient);
190
192 itkGetConstObjectMacro(GradientImage, GradientImageType);
193
195 void
196 SetTransformParameters(const ParametersType & parameters) const;
197
199 unsigned int
200 GetNumberOfParameters() const override
201 {
202 return m_Transform->GetNumberOfParameters();
203 }
204
207 virtual void
209
210protected:
212 ~TwoImageToOneImageMetric() override = default;
213 void
214 PrintSelf(std::ostream & os, Indent indent) const override;
215
216 mutable unsigned long m_NumberOfPixelsCounted;
217
221
225
228
232
233private:
236};
237
238} // end namespace itk
239
240#ifndef ITK_MANUAL_INSTANTIATION
241# include "itkTwoImageToOneImageMetric.hxx"
242#endif
243
244#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:53
Base class for all image interpolators.
Array< ParametersValueType > DerivativeType
Superclass::ParametersValueType ParametersValueType
Superclass::ParametersType ParametersType
Implements transparent reference counting.
Implementation of the composite pattern.
Transform points and vectors from an input space to an output space.
typename TransformType::JacobianType TransformJacobianType
Image< GradientPixelType, Self::MovingImageDimension > GradientImageType
SpatialObject< Self::FixedImageDimension > FixedImageMaskType
CovariantVector< RealType, Self::MovingImageDimension > GradientPixelType
Superclass::ParametersValueType CoordinateRepresentationType
typename TransformType::Pointer TransformPointer
InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > InterpolatorType
void PrintSelf(std::ostream &os, Indent indent) const override
typename TransformType::InputPointType InputPointType
unsigned int GetNumberOfParameters() const override
SpatialObject< Self::MovingImageDimension > MovingImageMaskType
Transform< CoordinateRepresentationType, Self::MovingImageDimension, Self::FixedImageDimension > TransformType
typename FixedImageType::RegionType FixedImageRegionType
typename TransformType::OutputPointType OutputPointType
Superclass::DerivativeType DerivativeType
void SetTransformParameters(const ParametersType &parameters) const
typename MovingImageMaskType::Pointer MovingImageMaskPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
typename GradientImageFilterType::Pointer GradientImageFilterPointer
GradientRecursiveGaussianImageFilter< MovingImageType, GradientImageType > GradientImageFilterType
typename FixedImageMaskType::Pointer FixedImageMaskPointer
SmartPointer< GradientImageType > GradientImagePointer
typename InterpolatorType::Pointer InterpolatorPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
SmartPointer< const Self > ConstPointer
typename TransformType::ParametersType TransformParametersType
typename TMovingImage::PixelType MovingImagePixelType
typename NumericTraits< MovingImagePixelType >::RealType RealType
~TwoImageToOneImageMetric() override=default
Superclass::ParametersType ParametersType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)