go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkPCAMetric2.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 __itkPCAMetric2_H__
19 #define __itkPCAMetric2_H__
20 
22 
23 #include "itkSmoothingRecursiveGaussianImageFilter.h"
25 #include "itkNearestNeighborInterpolateImageFunction.h"
26 #include "itkExtractImageFilter.h"
27 
28 namespace itk
29 {
30 template< class TFixedImage, class TMovingImage >
31 class PCAMetric2 :
32  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
33 {
34 public:
35 
37  typedef PCAMetric2 Self;
39  TFixedImage, TMovingImage > Superclass;
41  typedef SmartPointer< const Self > ConstPointer;
42 
44  typedef typename FixedImageRegionType::SizeType FixedImageSizeType;
45 
47  itkNewMacro( Self );
48 
51 
53  itkSetMacro( NumAdditionalSamplesFixed, unsigned int );
54  itkSetMacro( ReducedDimensionIndex, unsigned int );
55  itkSetMacro( SubtractMean, bool );
56  itkSetMacro( GridSize, FixedImageSizeType );
57  itkSetMacro( TransformIsStackTransform, bool );
58 
60  typedef typename
75  typedef typename Superclass::RealType RealType;
93  typedef typename
97  typedef typename
99  typedef typename
101  typedef typename
103 
105  itkStaticConstMacro( FixedImageDimension, unsigned int,
106  FixedImageType::ImageDimension );
107 
109  itkStaticConstMacro( MovingImageDimension, unsigned int,
110  MovingImageType::ImageDimension );
111 
113  virtual MeasureType GetValue( const TransformParametersType & parameters ) const;
114 
116  virtual void GetDerivative( const TransformParametersType & parameters,
117  DerivativeType & derivative ) const;
118 
120  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
121  MeasureType & Value, DerivativeType & Derivative ) const;
122 
127  virtual void Initialize( void ) throw ( ExceptionObject );
128 
129 protected:
130 
132  virtual ~PCAMetric2() {}
133  void PrintSelf( std::ostream & os, Indent indent ) const;
134 
142  typedef typename itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension >
150 
156  const TransformJacobianType & jacobian,
157  const MovingImageDerivativeType & movingImageDerivative,
158  DerivativeType & imageJacobian ) const;
159 
160 private:
161 
162  PCAMetric2( const Self & ); // purposely not implemented
163  void operator=( const Self & ); // purposely not implemented
164 
166  void SampleRandom( const int n, const int m, std::vector< int > & numbers ) const;
167 
171 
174 
177 
180 
181 };
182 
183 } // end namespace itk
184 
185 #ifndef ITK_MANUAL_INSTANTIATION
186 #include "itkPCAMetric2.hxx"
187 #endif
188 
189 #endif // end #ifndef __itkPCAMetric2_H__
itk::AdvancedImageToImageMetric::TransformParametersType
Superclass::TransformParametersType TransformParametersType
Definition: itkAdvancedImageToImageMetric.h:113
itk::PCAMetric2::NonZeroJacobianIndicesType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkPCAMetric2.h:149
itk::PCAMetric2::ImageSampleContainerType
Superclass::ImageSampleContainerType ImageSampleContainerType
Definition: itkPCAMetric2.h:92
itk::PCAMetric2::FixedImageLimiterOutputType
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
Definition: itkPCAMetric2.h:98
itk::PCAMetric2::m_SubtractMean
bool m_SubtractMean
Definition: itkPCAMetric2.h:173
itk::AdvancedImageToImageMetric::FixedImageRegionType
Superclass::FixedImageRegionType FixedImageRegionType
Definition: itkAdvancedImageToImageMetric.h:108
itk::PCAMetric2::operator=
void operator=(const Self &)
itk::AdvancedImageToImageMetric::ImageSamplerPointer
ImageSamplerType::Pointer ImageSamplerPointer
Definition: itkAdvancedImageToImageMetric.h:139
itk::PCAMetric2::itkStaticConstMacro
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
itk::PCAMetric2::FixedImagePixelType
Superclass::FixedImagePixelType FixedImagePixelType
Definition: itkPCAMetric2.h:88
itk::PCAMetric2::PCAMetric2
PCAMetric2()
itk::PCAMetric2::m_ReducedDimensionIndex
unsigned int m_ReducedDimensionIndex
Definition: itkPCAMetric2.h:170
itk::PCAMetric2::GetDerivative
virtual void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const
itk::PCAMetric2::InterpolatorPointer
Superclass::InterpolatorPointer InterpolatorPointer
Definition: itkPCAMetric2.h:74
itk::AdvancedImageToImageMetric::GradientImageType
Superclass::GradientImageType GradientImageType
Definition: itkAdvancedImageToImageMetric.h:119
itk::PCAMetric2::Superclass
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
Definition: itkPCAMetric2.h:39
itk::PCAMetric2::EvaluateTransformJacobianInnerProduct
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
SmartPointer< Self >
itk::AdvancedImageToImageMetric
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics.
Definition: itkAdvancedImageToImageMetric.h:81
itk::PCAMetric2::TransformParametersType
Superclass::TransformParametersType TransformParametersType
Definition: itkPCAMetric2.h:71
itk::PCAMetric2::ParametersType
Superclass::ParametersType ParametersType
Definition: itkPCAMetric2.h:87
itk::AdvancedImageToImageMetric::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkAdvancedImageToImageMetric.h:128
itkImageRandomCoordinateSampler.h
itk::PCAMetric2::InputPointType
Superclass::InputPointType InputPointType
Definition: itkPCAMetric2.h:69
itk::PCAMetric2::MovingImageRegionType
Superclass::MovingImageRegionType MovingImageRegionType
Definition: itkPCAMetric2.h:89
itk::PCAMetric2::Pointer
SmartPointer< Self > Pointer
Definition: itkPCAMetric2.h:40
itk::PCAMetric2
Definition: itkPCAMetric2.h:33
itk::PCAMetric2::m_NumAdditionalSamplesFixed
unsigned int m_NumAdditionalSamplesFixed
Definition: itkPCAMetric2.h:169
itk::PCAMetric2::BSplineInterpolatorType
Superclass::BSplineInterpolatorType BSplineInterpolatorType
Definition: itkPCAMetric2.h:146
itk::PCAMetric2::FixedImageRegionType
Superclass::FixedImageRegionType FixedImageRegionType
Definition: itkPCAMetric2.h:43
itk::AdvancedImageToImageMetric::CoordinateRepresentationType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Definition: itkAdvancedImageToImageMetric.h:100
itk::PCAMetric2::RealType
Superclass::RealType RealType
Definition: itkPCAMetric2.h:75
itk::PCAMetric2::GradientImageType
Superclass::GradientImageType GradientImageType
Definition: itkPCAMetric2.h:77
itk::AdvancedImageToImageMetric::MovingImageDerivativeScalesType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
Definition: itkAdvancedImageToImageMetric.h:135
itk::AdvancedImageToImageMetric::MovingImageLimiterOutputType
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
Definition: itkAdvancedImageToImageMetric.h:149
itk::AdvancedImageToImageMetric::MovingImageDerivativeType
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Definition: itkAdvancedImageToImageMetric.h:323
itk::AdvancedImageToImageMetric::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkAdvancedImageToImageMetric.h:112
itk::PCAMetric2::FixedImageLimiterType
Superclass::FixedImageLimiterType FixedImageLimiterType
Definition: itkPCAMetric2.h:95
itk::AdvancedImageToImageMetric::ParametersType
Superclass::ParametersType ParametersType
Definition: itkAdvancedImageToImageMetric.h:130
itk::AdvancedImageToImageMetric::MovingImageLimiterType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Definition: itkAdvancedImageToImageMetric.h:147
itk::PCAMetric2::MovingImagePixelType
Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkPCAMetric2.h:63
itk::AdvancedImageToImageMetric::GradientImageFilterType
Superclass::GradientImageFilterType GradientImageFilterType
Definition: itkAdvancedImageToImageMetric.h:121
itk::AdvancedImageToImageMetric::InterpolatorPointer
Superclass::InterpolatorPointer InterpolatorPointer
Definition: itkAdvancedImageToImageMetric.h:116
itk::AdvancedImageToImageMetric::GradientImagePointer
Superclass::GradientImagePointer GradientImagePointer
Definition: itkAdvancedImageToImageMetric.h:120
itk::AdvancedImageToImageMetric::ImageSampleContainerType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Definition: itkAdvancedImageToImageMetric.h:140
itk::AdvancedImageToImageMetric::InterpolatorType
Superclass::InterpolatorType InterpolatorType
Definition: itkAdvancedImageToImageMetric.h:115
itk::PCAMetric2::DerivativeType
Superclass::DerivativeType DerivativeType
Definition: itkPCAMetric2.h:86
itk::AdvancedImageToImageMetric::NonZeroJacobianIndicesType
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
Definition: itkAdvancedImageToImageMetric.h:330
itk::AdvancedImageToImageMetric::TransformJacobianType
Superclass::TransformJacobianType TransformJacobianType
Definition: itkAdvancedImageToImageMetric.h:114
itk::AdvancedImageToImageMetric::FixedImageMaskType
Superclass::FixedImageMaskType FixedImageMaskType
Definition: itkAdvancedImageToImageMetric.h:123
itk::AdvancedImageToImageMetric::FixedImageIndexType
FixedImageType::IndexType FixedImageIndexType
Definition: itkAdvancedImageToImageMetric.h:303
itk::AdvancedImageToImageMetric::MovingImageRegionType
MovingImageType::RegionType MovingImageRegionType
Definition: itkAdvancedImageToImageMetric.h:134
itk::PCAMetric2::MovingImageType
Superclass::MovingImageType MovingImageType
Definition: itkPCAMetric2.h:62
itk::PCAMetric2::GradientImagePointer
Superclass::GradientImagePointer GradientImagePointer
Definition: itkPCAMetric2.h:78
itk::PCAMetric2::MovingImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Definition: itkPCAMetric2.h:64
itk::PCAMetric2::CentralDifferenceGradientFilterType
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
Definition: itkPCAMetric2.h:147
itk::AdvancedImageToImageMetric::MovingImageMaskType
Superclass::MovingImageMaskType MovingImageMaskType
Definition: itkAdvancedImageToImageMetric.h:125
itk::PCAMetric2::ImageSamplerType
Superclass::ImageSamplerType ImageSamplerType
Definition: itkPCAMetric2.h:90
itk::AdvancedImageToImageMetric::GradientImageFilterPointer
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Definition: itkAdvancedImageToImageMetric.h:122
itk::AdvancedImageToImageMetric::FixedImageType
Superclass::FixedImageType FixedImageType
Definition: itkAdvancedImageToImageMetric.h:105
itk::PCAMetric2::ImageSampleContainerPointer
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Definition: itkPCAMetric2.h:94
itk::AdvancedImageToImageMetric::MovingImagePixelType
Superclass::MovingImagePixelType MovingImagePixelType
Definition: itkAdvancedImageToImageMetric.h:102
itk::PCAMetric2::MovingImageLimiterType
Superclass::MovingImageLimiterType MovingImageLimiterType
Definition: itkPCAMetric2.h:96
itk::PCAMetric2::FixedImageContinuousIndexType
itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension > FixedImageContinuousIndexType
Definition: itkPCAMetric2.h:143
itk::PCAMetric2::FixedImageSizeType
FixedImageRegionType::SizeType FixedImageSizeType
Definition: itkPCAMetric2.h:44
itk::AdvancedImageToImageMetric::FixedImagePixelType
FixedImageType::PixelType FixedImagePixelType
Definition: itkAdvancedImageToImageMetric.h:133
itk::AdvancedImageToImageMetric::FixedImagePointType
TransformType::InputPointType FixedImagePointType
Definition: itkAdvancedImageToImageMetric.h:306
itk::AdvancedImageToImageMetric::FixedImageLimiterOutputType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
Definition: itkAdvancedImageToImageMetric.h:146
itk::PCAMetric2::FixedImageIndexType
Superclass::FixedImageIndexType FixedImageIndexType
Definition: itkPCAMetric2.h:138
itk::PCAMetric2::SampleRandom
void SampleRandom(const int n, const int m, std::vector< int > &numbers) const
itk::PCAMetric2::FixedImagePointType
Superclass::FixedImagePointType FixedImagePointType
Definition: itkPCAMetric2.h:141
itk::PCAMetric2::MovingImagePointType
Superclass::MovingImagePointType MovingImagePointType
Definition: itkPCAMetric2.h:144
itk::PCAMetric2::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itk::PCAMetric2::TransformPointer
Superclass::TransformPointer TransformPointer
Definition: itkPCAMetric2.h:68
itk::PCAMetric2::m_TransformIsStackTransform
bool m_TransformIsStackTransform
Definition: itkPCAMetric2.h:179
itk::PCAMetric2::MeasureType
Superclass::MeasureType MeasureType
Definition: itkPCAMetric2.h:85
itk::PCAMetric2::MovingImageDerivativeType
Superclass::MovingImageDerivativeType MovingImageDerivativeType
Definition: itkPCAMetric2.h:148
itk::AdvancedImageToImageMetric::ImageSampleContainerPointer
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Definition: itkAdvancedImageToImageMetric.h:141
itk::AdvancedImageToImageMetric::FixedImageLimiterType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Definition: itkAdvancedImageToImageMetric.h:144
itk::AdvancedImageToImageMetric::RealType
Superclass::RealType RealType
Definition: itkAdvancedImageToImageMetric.h:117
itk::PCAMetric2::MovingImageContinuousIndexType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
Definition: itkPCAMetric2.h:145
itk::PCAMetric2::FixedImageConstPointer
Superclass::FixedImageConstPointer FixedImageConstPointer
Definition: itkPCAMetric2.h:66
itk::PCAMetric2::m_GridSize
FixedImageSizeType m_GridSize
Definition: itkPCAMetric2.h:176
itk::AdvancedImageToImageMetric::MovingImageContinuousIndexType
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Definition: itkAdvancedImageToImageMetric.h:308
itk::PCAMetric2::GradientPixelType
Superclass::GradientPixelType GradientPixelType
Definition: itkPCAMetric2.h:76
itk::AdvancedImageToImageMetric::MeasureType
Superclass::MeasureType MeasureType
Definition: itkAdvancedImageToImageMetric.h:127
itk::PCAMetric2::MovingImageMaskPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
Definition: itkPCAMetric2.h:84
itk
Definition: itkAdvancedImageToImageMetric.h:40
itk::AdvancedImageToImageMetric::FixedImageMaskPointer
Superclass::FixedImageMaskPointer FixedImageMaskPointer
Definition: itkAdvancedImageToImageMetric.h:124
itk::PCAMetric2::CoordinateRepresentationType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Definition: itkPCAMetric2.h:57
itk::PCAMetric2::TransformType
Superclass::TransformType TransformType
Definition: itkPCAMetric2.h:67
itk::AdvancedImageToImageMetric::MovingImagePointType
TransformType::OutputPointType MovingImagePointType
Definition: itkAdvancedImageToImageMetric.h:307
itk::AdvancedImageToImageMetric::MovingImageMaskPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
Definition: itkAdvancedImageToImageMetric.h:126
itk::PCAMetric2::FixedImageType
Superclass::FixedImageType FixedImageType
Definition: itkPCAMetric2.h:65
itk::PCAMetric2::MovingImageMaskType
Superclass::MovingImageMaskType MovingImageMaskType
Definition: itkPCAMetric2.h:83
itk::PCAMetric2::OutputPointType
Superclass::OutputPointType OutputPointType
Definition: itkPCAMetric2.h:70
itk::PCAMetric2::FixedImageIndexValueType
Superclass::FixedImageIndexValueType FixedImageIndexValueType
Definition: itkPCAMetric2.h:139
itk::PCAMetric2::Self
PCAMetric2 Self
Definition: itkPCAMetric2.h:37
itk::PCAMetric2::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkPCAMetric2.h:41
itk::PCAMetric2::FixedImageMaskPointer
Superclass::FixedImageMaskPointer FixedImageMaskPointer
Definition: itkPCAMetric2.h:82
itk::PCAMetric2::ImageSamplerPointer
Superclass::ImageSamplerPointer ImageSamplerPointer
Definition: itkPCAMetric2.h:91
itk::PCAMetric2::TransformJacobianType
Superclass::TransformJacobianType TransformJacobianType
Definition: itkPCAMetric2.h:72
itk::AdvancedImageToImageMetric::MovingImageType
Superclass::MovingImageType MovingImageType
Definition: itkAdvancedImageToImageMetric.h:101
itk::PCAMetric2::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::AdvancedImageToImageMetric::BSplineInterpolatorType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Definition: itkAdvancedImageToImageMetric.h:312
itk::PCAMetric2::GetValue
virtual MeasureType GetValue(const TransformParametersType &parameters) const
itk::PCAMetric2::PCAMetric2
PCAMetric2(const Self &)
itk::AdvancedImageToImageMetric::GradientPixelType
Superclass::GradientPixelType GradientPixelType
Definition: itkAdvancedImageToImageMetric.h:118
itk::PCAMetric2::MovingImageLimiterOutputType
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
Definition: itkPCAMetric2.h:100
itk::PCAMetric2::FixedImageMaskType
Superclass::FixedImageMaskType FixedImageMaskType
Definition: itkPCAMetric2.h:81
itk::PCAMetric2::~PCAMetric2
virtual ~PCAMetric2()
Definition: itkPCAMetric2.h:132
itk::PCAMetric2::Initialize
virtual void Initialize(void)
itk::AdvancedImageToImageMetric::CentralDifferenceGradientFilterType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
Definition: itkAdvancedImageToImageMetric.h:325
itk::AdvancedImageToImageMetric::TransformPointer
Superclass::TransformPointer TransformPointer
Definition: itkAdvancedImageToImageMetric.h:110
itk::PCAMetric2::MovingImageDerivativeScalesType
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Definition: itkPCAMetric2.h:102
itk::AdvancedImageToImageMetric::TransformType
Superclass::TransformType TransformType
Definition: itkAdvancedImageToImageMetric.h:109
itk::AdvancedImageToImageMetric::MovingImageIndexType
MovingImageType::IndexType MovingImageIndexType
Definition: itkAdvancedImageToImageMetric.h:305
itk::PCAMetric2::GradientImageFilterPointer
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Definition: itkPCAMetric2.h:80
itk::PCAMetric2::GradientImageFilterType
Superclass::GradientImageFilterType GradientImageFilterType
Definition: itkPCAMetric2.h:79
itk::AdvancedImageToImageMetric::FixedImageIndexValueType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
Definition: itkAdvancedImageToImageMetric.h:304
itk::PCAMetric2::GetValueAndDerivative
virtual void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
itkAdvancedImageToImageMetric.h
itk::AdvancedImageToImageMetric::FixedImageConstPointer
Superclass::FixedImageConstPointer FixedImageConstPointer
Definition: itkAdvancedImageToImageMetric.h:107
itk::PCAMetric2::MovingImageIndexType
Superclass::MovingImageIndexType MovingImageIndexType
Definition: itkPCAMetric2.h:140
itk::PCAMetric2::InterpolatorType
Superclass::InterpolatorType InterpolatorType
Definition: itkPCAMetric2.h:73
itk::AdvancedImageToImageMetric::MovingImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Definition: itkAdvancedImageToImageMetric.h:104
itk::AdvancedImageToImageMetric::InputPointType
Superclass::InputPointType InputPointType
Definition: itkAdvancedImageToImageMetric.h:111
itk::AdvancedImageToImageMetric::ImageSamplerType
ImageSamplerBase< FixedImageType > ImageSamplerType
Definition: itkAdvancedImageToImageMetric.h:138


Generated on OURCE_DATE_EPOCH for elastix by doxygen 1.8.18 elastix logo