go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkAdvancedKappaStatisticImageToImageMetric.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 __itkAdvancedKappaStatisticImageToImageMetric_h
19#define __itkAdvancedKappaStatisticImageToImageMetric_h
20
22
23namespace itk
24{
25
55template< class TFixedImage, class TMovingImage >
57 public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
58{
59public:
60
64 TFixedImage, TMovingImage > Superclass;
66 typedef SmartPointer< const Self > ConstPointer;
67
69 itkNewMacro( Self );
70
73
75 typedef typename
111 typedef typename
115 typedef typename
117 typedef typename
119 typedef typename
123
125 itkStaticConstMacro( FixedImageDimension, unsigned int,
126 FixedImageType::ImageDimension );
127
129 itkStaticConstMacro( MovingImageDimension, unsigned int,
130 MovingImageType::ImageDimension );
131
133 MeasureType GetValue( const TransformParametersType & parameters ) const override;
134
136 void GetDerivative( const TransformParametersType & parameters,
137 DerivativeType & derivative ) const override;
138
141 const TransformParametersType & parameters,
142 MeasureType & Value, DerivativeType & Derivative ) const;
143
145 const TransformParametersType & parameters,
146 MeasureType & Value, DerivativeType & Derivative ) const override;
147
149 void ComputeGradient( void ) override;
150
152 itkSetMacro( ForegroundValue, RealType );
153 itkGetConstReferenceMacro( ForegroundValue, RealType );
154
159 itkSetMacro( UseForegroundValue, bool );
160
166 itkSetMacro( Complement, bool );
167 itkGetConstReferenceMacro( Complement, bool );
168 itkBooleanMacro( Complement );
169
171 itkSetMacro( Epsilon, RealType );
172 itkGetConstReferenceMacro( Epsilon, RealType );
173
174protected:
175
178
180 void PrintSelf( std::ostream & os, Indent indent ) const override;
181
195
200 const RealType & fixedImageValue,
201 const RealType & movingImageValue,
202 std::size_t & fixedForegroundArea,
203 std::size_t & movingForegroundArea,
204 std::size_t & intersection,
205 const DerivativeType & imageJacobian,
206 const NonZeroJacobianIndicesType & nzji,
207 DerivativeType & sum1,
208 DerivativeType & sum2 ) const;
209
214 void InitializeThreadingParameters( void ) const override;
215
217 inline void ThreadedGetValueAndDerivative( ThreadIdType threadID ) override;
218
221 MeasureType & value, DerivativeType & derivative ) const override;
222
224 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback( void * arg );
225
226private:
227
228 AdvancedKappaStatisticImageToImageMetric( const Self & ); // purposely not implemented
229 void operator=( const Self & ); // purposely not implemented
230
235
242 {
244
248 };
249
251 {
253 SizeValueType st_AreaSum;
254 SizeValueType st_AreaIntersection;
257 };
259 PaddedKappaGetValueAndDerivativePerThreadStruct );
260 itkAlignedTypedef( ITK_CACHE_LINE_ALIGNMENT, PaddedKappaGetValueAndDerivativePerThreadStruct,
261 AlignedKappaGetValueAndDerivativePerThreadStruct );
262 mutable AlignedKappaGetValueAndDerivativePerThreadStruct * m_KappaGetValueAndDerivativePerThreadVariables;
264
265};
266
267} // end namespace itk
268
269#ifndef ITK_MANUAL_INSTANTIATION
270#include "itkAdvancedKappaStatisticImageToImageMetric.hxx"
271#endif
272
273#endif // end #ifndef __itkAdvancedKappaStatisticImageToImageMetric_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 similarity between two objects to be registered.
void UpdateValueAndDerivativeTerms(const RealType &fixedImageValue, const RealType &movingImageValue, std::vcl_size_t &fixedForegroundArea, std::vcl_size_t &movingForegroundArea, std::vcl_size_t &intersection, const DerivativeType &imageJacobian, const NonZeroJacobianIndicesType &nzji, DerivativeType &sum1, DerivativeType &sum2) const
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, KappaGetValueAndDerivativePerThreadStruct, PaddedKappaGetValueAndDerivativePerThreadStruct)
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
void AfterThreadedGetValueAndDerivative(MeasureType &value, DerivativeType &derivative) const override
void PrintSelf(std::ostream &os, Indent indent) const override
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION AccumulateDerivativesThreaderCallback(void *arg)
void InitializeThreadingParameters(void) const override
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const override
void ThreadedGetValueAndDerivative(ThreadIdType threadID) override
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
AlignedKappaGetValueAndDerivativePerThreadStruct * m_KappaGetValueAndDerivativePerThreadVariables
virtual void GetValueAndDerivativeSingleThreaded(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const override
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedKappaGetValueAndDerivativePerThreadStruct, AlignedKappaGetValueAndDerivativePerThreadStruct)
MeasureType GetValue(const TransformParametersType &parameters) const override


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo