go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
itkAdvancedNormalizedCorrelationImageToImageMetric.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 itkAdvancedNormalizedCorrelationImageToImageMetric_h
19#define itkAdvancedNormalizedCorrelationImageToImageMetric_h
20
22#include <vector>
23
24namespace itk
25{
89
90template <typename TFixedImage, typename TMovingImage>
92 : public AdvancedImageToImageMetric<TFixedImage, TMovingImage>
93{
94public:
96
100 using Pointer = SmartPointer<Self>;
101 using ConstPointer = SmartPointer<const Self>;
102
104 itkNewMacro(Self);
105
108
110 using typename Superclass::CoordinateRepresentationType;
111 using typename Superclass::MovingImageType;
112 using typename Superclass::MovingImagePixelType;
113 using typename Superclass::MovingImageConstPointer;
114 using typename Superclass::FixedImageType;
115 using typename Superclass::FixedImageConstPointer;
116 using typename Superclass::FixedImageRegionType;
117 using typename Superclass::TransformType;
118 using typename Superclass::TransformPointer;
119 using typename Superclass::InputPointType;
120 using typename Superclass::OutputPointType;
121 using typename Superclass::TransformJacobianType;
123 using typename Superclass::InterpolatorType;
124 using typename Superclass::InterpolatorPointer;
125 using typename Superclass::RealType;
126 using typename Superclass::GradientPixelType;
127 using typename Superclass::GradientImageType;
128 using typename Superclass::GradientImagePointer;
129 using typename Superclass::FixedImageMaskType;
131 using typename Superclass::MovingImageMaskType;
133 using typename Superclass::MeasureType;
134 using typename Superclass::DerivativeType;
135 using typename Superclass::DerivativeValueType;
136 using typename Superclass::ParametersType;
137 using typename Superclass::FixedImagePixelType;
139 using typename Superclass::ImageSamplerType;
140 using typename Superclass::ImageSamplerPointer;
148 using typename Superclass::ThreadInfoType;
149
151 itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
152
154 itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
155
157 MeasureType
158 GetValue(const ParametersType & parameters) const override;
159
161 void
162 GetDerivative(const ParametersType & parameters, DerivativeType & derivative) const override;
163
165 void
166 GetValueAndDerivativeSingleThreaded(const ParametersType & parameters,
167 MeasureType & value,
168 DerivativeType & derivative) const;
169
170 void
171 GetValueAndDerivative(const ParametersType & parameters,
172 MeasureType & value,
173 DerivativeType & derivative) const override;
174
175protected:
178
180
182
184 using typename Superclass::FixedImageIndexType;
187 using typename Superclass::FixedImagePointType;
193
197 void
198 UpdateDerivativeTerms(const RealType fixedImageValue,
199 const RealType movingImageValue,
200 const DerivativeType & imageJacobian,
201 const NonZeroJacobianIndicesType & nzji,
202 DerivativeType & derivativeF,
203 DerivativeType & derivativeM,
204 DerivativeType & differential) const;
205
210 void
212
214 void
215 ThreadedGetValueAndDerivative(ThreadIdType threadID) const override;
216
218 void
219 AfterThreadedGetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const override;
220
222 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
224
225private:
226 using AccumulateType = typename NumericTraits<MeasureType>::AccumulateType;
227
241
254 itkPadStruct(ITK_CACHE_LINE_ALIGNMENT,
255 CorrelationGetValueAndDerivativePerThreadStruct,
256 PaddedCorrelationGetValueAndDerivativePerThreadStruct);
257 itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT,
258 PaddedCorrelationGetValueAndDerivativePerThreadStruct,
259 AlignedCorrelationGetValueAndDerivativePerThreadStruct);
260 mutable std::vector<AlignedCorrelationGetValueAndDerivativePerThreadStruct>
262};
263
264} // end namespace itk
265
266#ifndef ITK_MANUAL_INSTANTIATION
267# include "itkAdvancedNormalizedCorrelationImageToImageMetric.hxx"
268#endif
269
270#endif // end #ifndef itkAdvancedNormalizedCorrelationImageToImageMetric_h
typename TransformType::OutputPointType MovingImagePointType
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
void PrintSelf(std::ostream &os, Indent indent) const override
typename MovingImageType::RegionType MovingImageRegionType
typename AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
typename FixedImageType::PixelType FixedImagePixelType
typename DerivativeType::ValueType DerivativeValueType
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
typename MovingImageType::IndexType MovingImageIndexType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
typename FixedImageType::IndexType FixedImageIndexType
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
ImageSamplerBase< FixedImageType > ImageSamplerType
MultiThreaderBase::WorkUnitInfo ThreadInfoType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
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
typename AdvancedTransformType::NumberOfParametersType NumberOfParametersType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
void UpdateDerivativeTerms(const RealType fixedImageValue, const RealType movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &derivativeF, DerivativeType &derivativeM, DerivativeType &differential) const
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback(void *arg)
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedCorrelationGetValueAndDerivativePerThreadStruct, AlignedCorrelationGetValueAndDerivativePerThreadStruct)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void GetValueAndDerivativeSingleThreaded(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
void GetValueAndDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, CorrelationGetValueAndDerivativePerThreadStruct, PaddedCorrelationGetValueAndDerivativePerThreadStruct)
void ThreadedGetValueAndDerivative(ThreadIdType threadID) const override
MeasureType GetValue(const ParametersType &parameters) const override
ITK_DISALLOW_COPY_AND_MOVE(AdvancedNormalizedCorrelationImageToImageMetric)
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
itkOverrideGetNameOfClassMacro(AdvancedNormalizedCorrelationImageToImageMetric)
void GetDerivative(const ParametersType &parameters, DerivativeType &derivative) const override
AdvancedImageToImageMetric< typename MetricBase< TElastix >::FixedImageType, typename MetricBase< TElastix >::MovingImageType > Superclass


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo