go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
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
23namespace itk
24{
89template< class TFixedImage, class TMovingImage >
91 public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
92{
93public:
94
98 TFixedImage, TMovingImage > Superclass;
100 typedef SmartPointer< const Self > ConstPointer;
101
103 itkNewMacro( Self );
104
107
109 typedef typename
145 typedef typename
149 typedef typename
151 typedef typename
153 typedef typename
157
159 itkStaticConstMacro( FixedImageDimension, unsigned int,
160 FixedImageType::ImageDimension );
161
163 itkStaticConstMacro( MovingImageDimension, unsigned int,
164 MovingImageType::ImageDimension );
165
167 MeasureType GetValue( const TransformParametersType & parameters ) const override;
168
171 const TransformParametersType & parameters,
172 DerivativeType & derivative ) const override;
173
176 const TransformParametersType & parameters,
177 MeasureType & value, DerivativeType & derivative ) const;
178
180 const TransformParametersType & parameters,
181 MeasureType & value, DerivativeType & derivative ) const override;
182
188 itkSetMacro( SubtractMean, bool );
189 itkGetConstReferenceMacro( SubtractMean, bool );
190 itkBooleanMacro( SubtractMean );
191
192protected:
193
196
197 void PrintSelf( std::ostream & os, Indent indent ) const override;
198
212
217 const RealType & fixedImageValue,
218 const RealType & movingImageValue,
219 const DerivativeType & imageJacobian,
220 const NonZeroJacobianIndicesType & nzji,
221 DerivativeType & derivativeF,
222 DerivativeType & derivativeM,
223 DerivativeType & differential ) const;
224
229 void InitializeThreadingParameters( void ) const override;
230
232 inline void ThreadedGetValueAndDerivative( ThreadIdType threadID ) override;
233
236 MeasureType & value, DerivativeType & derivative ) const override;
237
239 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback( void * arg );
240
241private:
242
243 AdvancedNormalizedCorrelationImageToImageMetric( const Self & ); // purposely not implemented
244 void operator=( const Self & ); // purposely not implemented
245
246 mutable bool m_SubtractMean;
247
248 typedef typename NumericTraits< MeasureType >::AccumulateType AccumulateType;
249
254 {
256
262 };
263
265 {
275 };
277 PaddedCorrelationGetValueAndDerivativePerThreadStruct );
278 itkAlignedTypedef( ITK_CACHE_LINE_ALIGNMENT, PaddedCorrelationGetValueAndDerivativePerThreadStruct,
279 AlignedCorrelationGetValueAndDerivativePerThreadStruct );
280 mutable AlignedCorrelationGetValueAndDerivativePerThreadStruct * m_CorrelationGetValueAndDerivativePerThreadVariables;
282
283};
284
285} // end namespace itk
286
287#ifndef ITK_MANUAL_INSTANTIATION
288#include "itkAdvancedNormalizedCorrelationImageToImageMetric.hxx"
289#endif
290
291#endif // end #ifndef __itkAdvancedNormalizedCorrelationImageToImageMetric_h
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::FixedImageMaskPointer FixedImageMaskPointer
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImageFilterType GradientImageFilterType
Superclass::TransformJacobianType TransformJacobianType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
Superclass::GradientImagePointer GradientImagePointer
Superclass::TransformPointer TransformPointer
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
ImageSamplerBase< FixedImageType > ImageSamplerType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Superclass::InterpolatorPointer InterpolatorPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
TransformType::InputPointType FixedImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
Superclass::GradientPixelType GradientPixelType
MovingImageType::IndexType MovingImageIndexType
MovingImageType::RegionType MovingImageRegionType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
Superclass::MovingImagePixelType MovingImagePixelType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Superclass::FixedImageMaskType FixedImageMaskType
Superclass::GradientImageType GradientImageType
Superclass::InterpolatorType InterpolatorType
TransformType::OutputPointType MovingImagePointType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::FixedImageRegionType FixedImageRegionType
AdvancedTransformType::NumberOfParametersType NumberOfParametersType
Computes normalized correlation between two images, based on AdvancedImageToImageMetric....
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback(void *arg)
AlignedCorrelationGetValueAndDerivativePerThreadStruct * m_CorrelationGetValueAndDerivativePerThreadVariables
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedCorrelationGetValueAndDerivativePerThreadStruct, AlignedCorrelationGetValueAndDerivativePerThreadStruct)
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
MeasureType GetValue(const TransformParametersType &parameters) const override
void ThreadedGetValueAndDerivative(ThreadIdType threadID) override
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void UpdateDerivativeTerms(const RealType &fixedImageValue, const RealType &movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &derivativeF, DerivativeType &derivativeM, DerivativeType &differential) const
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, CorrelationGetValueAndDerivativePerThreadStruct, PaddedCorrelationGetValueAndDerivativePerThreadStruct)
void GetValueAndDerivativeSingleThreaded(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
void PrintSelf(std::ostream &os, Indent indent) const override
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo