Home
|
Main Page
|
Modules
|
Namespace List
|
Class Hierarchy
|
Alphabetical List
|
Data Structures
|
File List
|
Namespace Members
|
Data Fields
|
Globals
|
Related Pages
src
Components
Metrics
AdvancedMattesMutualInformation
itkParzenWindowMutualInformationImageToImageMetric.h
Go to the documentation of this file.
1
/*======================================================================
2
3
This file is part of the elastix software.
4
5
Copyright (c) University Medical Center Utrecht. All rights reserved.
6
See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7
details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notices for more information.
12
13
======================================================================*/
14
15
#ifndef __itkParzenWindowMutualInformationImageToImageMetric_H__
16
#define __itkParzenWindowMutualInformationImageToImageMetric_H__
17
18
#include "
itkParzenWindowHistogramImageToImageMetric.h
"
19
20
#include "itkArray2D.h"
21
22
namespace
itk
23
{
24
71
template
<
class
TFixedImage,
class
TMovingImage >
72
class
ParzenWindowMutualInformationImageToImageMetric
:
73
public
ParzenWindowHistogramImageToImageMetric
< TFixedImage, TMovingImage >
74
{
75
public
:
76
78
typedef
ParzenWindowMutualInformationImageToImageMetric
Self
;
79
typedef
ParzenWindowHistogramImageToImageMetric
<
80
TFixedImage, TMovingImage >
Superclass
;
81
typedef
SmartPointer<Self>
Pointer
;
82
typedef
SmartPointer<const Self>
ConstPointer
;
83
85
itkNewMacro(
Self
);
86
88
itkTypeMacro(
89
ParzenWindowMutualInformationImageToImageMetric
,
90
ParzenWindowHistogramImageToImageMetric
);
91
93
typedef
typename
94
Superclass::CoordinateRepresentationType
CoordinateRepresentationType
;
95
typedef
typename
Superclass::MovingImageType
MovingImageType
;
96
typedef
typename
Superclass::MovingImagePixelType
MovingImagePixelType
;
97
typedef
typename
Superclass::MovingImageConstPointer
MovingImageConstPointer
;
98
typedef
typename
Superclass::FixedImageType
FixedImageType
;
99
typedef
typename
Superclass::FixedImageConstPointer
FixedImageConstPointer
;
100
typedef
typename
Superclass::FixedImageRegionType
FixedImageRegionType
;
101
typedef
typename
Superclass::TransformType
TransformType
;
102
typedef
typename
Superclass::TransformPointer
TransformPointer
;
103
typedef
typename
Superclass::InputPointType
InputPointType
;
104
typedef
typename
Superclass::OutputPointType
OutputPointType
;
105
typedef
typename
Superclass::TransformParametersType
TransformParametersType
;
106
typedef
typename
Superclass::TransformJacobianType
TransformJacobianType
;
107
typedef
typename
Superclass::InterpolatorType
InterpolatorType
;
108
typedef
typename
Superclass::InterpolatorPointer
InterpolatorPointer
;
109
typedef
typename
Superclass::RealType
RealType
;
110
typedef
typename
Superclass::GradientPixelType
GradientPixelType
;
111
typedef
typename
Superclass::GradientImageType
GradientImageType
;
112
typedef
typename
Superclass::GradientImagePointer
GradientImagePointer
;
113
typedef
typename
Superclass::GradientImageFilterType
GradientImageFilterType
;
114
typedef
typename
Superclass::GradientImageFilterPointer
GradientImageFilterPointer
;
115
typedef
typename
Superclass::FixedImageMaskType
FixedImageMaskType
;
116
typedef
typename
Superclass::FixedImageMaskPointer
FixedImageMaskPointer
;
117
typedef
typename
Superclass::MovingImageMaskType
MovingImageMaskType
;
118
typedef
typename
Superclass::MovingImageMaskPointer
MovingImageMaskPointer
;
119
typedef
typename
Superclass::MeasureType
MeasureType
;
120
typedef
typename
Superclass::DerivativeType
DerivativeType
;
121
typedef
typename
Superclass::DerivativeValueType
DerivativeValueType
;
122
typedef
typename
Superclass::ParametersType
ParametersType
;
123
typedef
typename
Superclass::FixedImagePixelType
FixedImagePixelType
;
124
typedef
typename
Superclass::MovingImageRegionType
MovingImageRegionType
;
125
typedef
typename
Superclass::ImageSamplerType
ImageSamplerType
;
126
typedef
typename
Superclass::ImageSamplerPointer
ImageSamplerPointer
;
127
typedef
typename
Superclass::ImageSampleContainerType
ImageSampleContainerType
;
128
typedef
typename
129
Superclass::ImageSampleContainerPointer
ImageSampleContainerPointer
;
130
typedef
typename
Superclass::FixedImageLimiterType
FixedImageLimiterType
;
131
typedef
typename
Superclass::MovingImageLimiterType
MovingImageLimiterType
;
132
typedef
typename
133
Superclass::FixedImageLimiterOutputType
FixedImageLimiterOutputType
;
134
typedef
typename
135
Superclass::MovingImageLimiterOutputType
MovingImageLimiterOutputType
;
136
typedef
typename
137
Superclass::MovingImageDerivativeScalesType
MovingImageDerivativeScalesType
;
138
140
itkStaticConstMacro
( FixedImageDimension,
unsigned
int
,
141
FixedImageType::ImageDimension );
142
144
itkStaticConstMacro
( MovingImageDimension,
unsigned
int
,
145
MovingImageType::ImageDimension );
146
148
MeasureType
GetValue
(
const
ParametersType
& parameters )
const
;
149
151
itkGetConstMacro( UseJacobianPreconditioning,
bool
);
152
itkSetMacro( UseJacobianPreconditioning,
bool
);
153
154
protected
:
155
157
ParzenWindowMutualInformationImageToImageMetric
();
158
160
virtual
~ParzenWindowMutualInformationImageToImageMetric
() {};
161
165
typedef
typename
Superclass::FixedImageIndexType
FixedImageIndexType
;
166
typedef
typename
Superclass::FixedImageIndexValueType
FixedImageIndexValueType
;
167
typedef
typename
Superclass::MovingImageIndexType
MovingImageIndexType
;
168
typedef
typename
Superclass::FixedImagePointType
FixedImagePointType
;
169
typedef
typename
Superclass::MovingImagePointType
MovingImagePointType
;
170
typedef
typename
Superclass::MovingImageContinuousIndexType
MovingImageContinuousIndexType
;
171
typedef
typename
Superclass::BSplineInterpolatorType
BSplineInterpolatorType
;
172
typedef
typename
Superclass::CentralDifferenceGradientFilterType
CentralDifferenceGradientFilterType
;
173
typedef
typename
Superclass::MovingImageDerivativeType
MovingImageDerivativeType
;
174
typedef
typename
Superclass::PDFValueType
PDFValueType
;
175
typedef
typename
Superclass::MarginalPDFType
MarginalPDFType
;
176
typedef
typename
Superclass::JointPDFType
JointPDFType
;
177
typedef
typename
Superclass::JointPDFDerivativesType
JointPDFDerivativesType
;
178
typedef
typename
Superclass::IncrementalMarginalPDFType
IncrementalMarginalPDFType
;
179
typedef
typename
Superclass::JointPDFIndexType
JointPDFIndexType
;
180
typedef
typename
Superclass::JointPDFRegionType
JointPDFRegionType
;
181
typedef
typename
Superclass::JointPDFSizeType
JointPDFSizeType
;
182
typedef
typename
Superclass::JointPDFDerivativesIndexType
JointPDFDerivativesIndexType
;
183
typedef
typename
Superclass::JointPDFDerivativesRegionType
JointPDFDerivativesRegionType
;
184
typedef
typename
Superclass::JointPDFDerivativesSizeType
JointPDFDerivativesSizeType
;
185
typedef
typename
Superclass::ParzenValueContainerType
ParzenValueContainerType
;
186
typedef
typename
Superclass::KernelFunctionType
KernelFunctionType
;
187
typedef
typename
Superclass::NonZeroJacobianIndicesType
NonZeroJacobianIndicesType
;
188
192
virtual
void
GetValueAndAnalyticDerivative
(
193
const
ParametersType
& parameters,
194
MeasureType
& value,
DerivativeType
& derivative )
const
;
195
200
virtual
void
GetValueAndAnalyticDerivativeLowMemory
(
201
const
ParametersType
& parameters,
202
MeasureType
& value,
DerivativeType
& derivative )
const
;
203
207
virtual
void
GetValueAndFiniteDifferenceDerivative
(
const
ParametersType
& parameters,
208
MeasureType
& value,
DerivativeType
& derivative )
const
;
209
211
virtual
void
ComputeJacobianPreconditioner
(
212
const
TransformJacobianType
& jac,
213
const
NonZeroJacobianIndicesType
& nzji,
214
DerivativeType
& preconditioner,
215
DerivativeType
& divisor )
const
;
216
218
virtual
void
InitializeHistograms
(
void
);
219
220
private
:
221
223
ParzenWindowMutualInformationImageToImageMetric
(
const
Self
& );
// purposely not implemented
225
void
operator=
(
const
Self
& );
// purposely not implemented
226
228
typedef
double
PRatioType
;
229
typedef
Array2D< PRatioType >
PRatioArrayType
;
230
mutable
PRatioArrayType
m_PRatioArray
;
231
233
bool
m_UseJacobianPreconditioning
;
234
236
void
UpdateDerivativeLowMemory
(
237
const
RealType
& fixedImageValue,
238
const
RealType
& movingImageValue,
239
const
DerivativeType
& imageJacobian,
240
const
NonZeroJacobianIndicesType
& nzji,
241
DerivativeType
& derivative )
const
;
242
244
void
ComputeValueAndPRatioArray
(
double
& MI )
const
;
245
246
};
// end class ParzenWindowMutualInformationImageToImageMetric
247
248
}
// end namespace itk
249
250
#ifndef ITK_MANUAL_INSTANTIATION
251
#include "itkParzenWindowMutualInformationImageToImageMetric.hxx"
252
#endif
253
254
#endif // end #ifndef __itkParzenWindowMutualInformationImageToImageMetric_H__
255
Generated on 21-03-2014 for elastix by
1.8.1.2