go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkVarianceOverLastDimensionImageMetric.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 __itkVarianceOverLastDimensionImageMetric_h
16 #define __itkVarianceOverLastDimensionImageMetric_h
17 
18 #include "itkSmoothingRecursiveGaussianImageFilter.h"
20 #include "itkNearestNeighborInterpolateImageFunction.h"
22 
23 namespace itk
24 {
25 
47 template< class TFixedImage, class TMovingImage >
49  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
50 {
51 public:
52 
56  TFixedImage, TMovingImage > Superclass;
57  typedef SmartPointer< Self > Pointer;
58  typedef SmartPointer< const Self > ConstPointer;
59 
61  typedef typename FixedImageRegionType::SizeType FixedImageSizeType;
62 
64  itkNewMacro( Self );
65 
68 
70  itkSetMacro( SampleLastDimensionRandomly, bool );
71  itkSetMacro( NumSamplesLastDimension, unsigned int );
72  itkSetMacro( NumAdditionalSamplesFixed, unsigned int );
73  itkSetMacro( ReducedDimensionIndex, unsigned int );
74  itkSetMacro( SubtractMean, bool );
75  itkSetMacro( GridSize, FixedImageSizeType );
76  itkSetMacro( TransformIsStackTransform, bool );
77 
79  itkGetConstMacro( SampleLastDimensionRandomly, bool );
80  itkGetConstMacro( NumSamplesLastDimension, int );
81 
83  typedef typename
98  typedef typename Superclass::RealType RealType;
116  typedef typename
120  typedef typename
122  typedef typename
124  typedef typename
126 
128  itkStaticConstMacro( FixedImageDimension, unsigned int,
129  FixedImageType::ImageDimension );
130 
132  itkStaticConstMacro( MovingImageDimension, unsigned int,
133  MovingImageType::ImageDimension );
134 
136  virtual MeasureType GetValue( const TransformParametersType & parameters ) const;
137 
139  virtual void GetDerivative( const TransformParametersType & parameters,
140  DerivativeType & derivative ) const;
141 
143  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
144  MeasureType & Value, DerivativeType & Derivative ) const;
145 
149  virtual void Initialize( void ) throw ( ExceptionObject );
150 
151 protected:
152 
154  virtual ~VarianceOverLastDimensionImageMetric() {}
155  void PrintSelf( std::ostream & os, Indent indent ) const;
156 
164  typedef typename itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension >
172 
177  const TransformJacobianType & jacobian,
178  const MovingImageDerivativeType & movingImageDerivative,
179  DerivativeType & imageJacobian ) const;
180 
181 private:
182 
183  VarianceOverLastDimensionImageMetric( const Self & ); // purposely not implemented
184  void operator=( const Self & ); // purposely not implemented
185 
187  void SampleRandom( const int n, const int m, std::vector< int > & numbers ) const;
188 
194 
197 
200 
203 
206 
207 };
208 
209 } // end namespace itk
210 
211 #ifndef ITK_MANUAL_INSTANTIATION
212 #include "itkVarianceOverLastDimensionImageMetric.hxx"
213 #endif
214 
215 #endif // end #ifndef __itkVarianceOverLastDimensionImageMetric_h
void PrintSelf(std::ostream &os, Indent indent) const
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Superclass::TransformParametersType TransformParametersType
Superclass::MovingImageType MovingImageType
Superclass::FixedImageMaskPointer FixedImageMaskPointer
An extension of the ITK ImageToImageMetric. It is the intended base class for all elastix metrics...
Superclass::GradientPixelType GradientPixelType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
Superclass::FixedImageRegionType FixedImageRegionType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
MovingImageType::IndexType MovingImageIndexType
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
TransformType::InputPointType FixedImagePointType
FixedArray< double, Self::MovingImageDimension > MovingImageDerivativeScalesType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
ImageSamplerBase< FixedImageType > ImageSamplerType
Superclass::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
AdvancedTransformType::NonZeroJacobianIndicesType NonZeroJacobianIndicesType
void SampleRandom(const int n, const int m, std::vector< int > &numbers) const
Superclass::InterpolatorPointer InterpolatorPointer
virtual void GetValueAndDerivative(const TransformParametersType &parameters, MeasureType &Value, DerivativeType &Derivative) const
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
TransformType::OutputPointType MovingImagePointType
Superclass::MovingImageMaskType MovingImageMaskType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Superclass::GradientImageType GradientImageType
Superclass::TransformPointer TransformPointer
Superclass::GradientImageFilterType GradientImageFilterType
MovingImageType::RegionType MovingImageRegionType
Superclass::InterpolatorType InterpolatorType
Superclass::TransformJacobianType TransformJacobianType
void EvaluateTransformJacobianInnerProduct(const TransformJacobianType &jacobian, const MovingImageDerivativeType &movingImageDerivative, DerivativeType &imageJacobian) const
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
Superclass::CoordinateRepresentationType CoordinateRepresentationType
virtual void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const
Superclass::MovingImagePixelType MovingImagePixelType
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Superclass::MovingImageDerivativeScalesType MovingImageDerivativeScalesType
Superclass::FixedImageMaskType FixedImageMaskType
Compute the sum of variances over the slowest varying dimension in the moving image.
BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
Superclass::FixedImageConstPointer FixedImageConstPointer
Superclass::MovingImageConstPointer MovingImageConstPointer
Superclass::CentralDifferenceGradientFilterType CentralDifferenceGradientFilterType
virtual MeasureType GetValue(const TransformParametersType &parameters) const
itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension > FixedImageContinuousIndexType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
Superclass::GradientImagePointer GradientImagePointer


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo