go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkParzenWindowMutualInformationImageToImageMetric.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 __itkParzenWindowMutualInformationImageToImageMetric_H__
19#define __itkParzenWindowMutualInformationImageToImageMetric_H__
20
22
23#include "itkArray2D.h"
24
25namespace itk
26{
27
74template< class TFixedImage, class TMovingImage >
76 public ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage >
77{
78public:
79
83 TFixedImage, TMovingImage > Superclass;
85 typedef SmartPointer< const Self > ConstPointer;
86
88 itkNewMacro( Self );
89
91 itkTypeMacro(
94
96 typedef typename
132 typedef typename
136 typedef typename
138 typedef typename
140 typedef typename
144
146 itkStaticConstMacro( FixedImageDimension, unsigned int,
147 FixedImageType::ImageDimension );
148
150 itkStaticConstMacro( MovingImageDimension, unsigned int,
151 MovingImageType::ImageDimension );
152
154 MeasureType GetValue( const ParametersType & parameters ) const override;
155
157 itkGetConstMacro( UseJacobianPreconditioning, bool );
158 itkSetMacro( UseJacobianPreconditioning, bool );
159
160protected:
161
164
167
195
204 const ParametersType & parameters,
205 MeasureType & value, DerivativeType & derivative ) const override;
206
217 const ParametersType & parameters,
218 MeasureType & value, DerivativeType & derivative ) const;
219
226 const ParametersType & parameters,
227 MeasureType & value, DerivativeType & derivative ) const override;
228
231 const TransformJacobianType & jac,
232 const NonZeroJacobianIndicesType & nzji,
233 DerivativeType & preconditioner,
234 DerivativeType & divisor ) const;
235
237 void InitializeHistograms( void ) override;
238
241 {
243 };
245
247 inline void ThreadedComputeDerivativeLowMemory( ThreadIdType threadId );
248
251 DerivativeType & derivative ) const;
252
254 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ComputeDerivativeLowMemoryThreaderCallback( void * arg );
255
258
259private:
260
262 ParzenWindowMutualInformationImageToImageMetric( const Self & ); // purposely not implemented
264 void operator=( const Self & ); // purposely not implemented
265
267 typedef double PRatioType;
270
273
276
277 void ComputeDerivativeLowMemory( DerivativeType & derivative ) const;
278
281 const RealType & fixedImageValue,
282 const RealType & movingImageValue,
283 const DerivativeType & imageJacobian,
284 const NonZeroJacobianIndicesType & nzji,
285 DerivativeType & derivative ) const;
286
288 void ComputeValueAndPRatioArray( double & MI ) const;
289
290};
291
292} // end namespace itk
293
294#ifndef ITK_MANUAL_INSTANTIATION
295#include "itkParzenWindowMutualInformationImageToImageMetric.hxx"
296#endif
297
298#endif // end #ifndef __itkParzenWindowMutualInformationImageToImageMetric_H__
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Superclass::TransformJacobianType TransformJacobianType
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedTransformType::NumberOfParametersType NumberOfParametersType
A base class for image metrics based on a joint histogram computed using Parzen Windowing.
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Computes the mutual information between two images to be registered using the method of Mattes et al.
virtual void ComputeJacobianPreconditioner(const TransformJacobianType &jac, const NonZeroJacobianIndicesType &nzji, DerivativeType &preconditioner, DerivativeType &divisor) const
void ComputeDerivativeLowMemorySingleThreaded(DerivativeType &derivative) const
void GetValueAndAnalyticDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
void ThreadedComputeDerivativeLowMemory(ThreadIdType threadId)
void GetValueAndFiniteDifferenceDerivative(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const override
void ComputeDerivativeLowMemory(DerivativeType &derivative) const
MeasureType GetValue(const ParametersType &parameters) const override
void UpdateDerivativeLowMemory(const RealType &fixedImageValue, const RealType &movingImageValue, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &derivative) const
ParzenWindowHistogramImageToImageMetric< TFixedImage, TMovingImage > Superclass
ParzenWindowMutualInformationMultiThreaderParameterType m_ParzenWindowMutualInformationThreaderParameters
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
virtual void GetValueAndAnalyticDerivativeLowMemory(const ParametersType &parameters, MeasureType &value, DerivativeType &derivative) const
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ComputeDerivativeLowMemoryThreaderCallback(void *arg)
void AfterThreadedComputeDerivativeLowMemory(DerivativeType &derivative) const


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo