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 
16 #ifndef __itkVarianceOverLastDimensionImageMetric_h
17 #define __itkVarianceOverLastDimensionImageMetric_h
18 
19 #include "itkSmoothingRecursiveGaussianImageFilter.h"
21 #include "itkNearestNeighborInterpolateImageFunction.h"
23 
24 namespace itk
25 {
26 
48 template < class TFixedImage, class TMovingImage >
50  public AdvancedImageToImageMetric< TFixedImage, TMovingImage>
51 {
52 public:
53 
57  TFixedImage, TMovingImage > Superclass;
58  typedef SmartPointer<Self> Pointer;
59  typedef SmartPointer<const Self> ConstPointer;
60 
62  typedef typename FixedImageRegionType::SizeType FixedImageSizeType;
63 
65  itkNewMacro( Self );
66 
69 
71  itkSetMacro( SampleLastDimensionRandomly, bool );
72  itkSetMacro( NumSamplesLastDimension, unsigned int );
73  itkSetMacro( NumAdditionalSamplesFixed, unsigned int );
74  itkSetMacro( ReducedDimensionIndex, unsigned int );
75  itkSetMacro( SubtractMean, bool );
76  itkSetMacro( GridSize, FixedImageSizeType );
77  itkSetMacro( TransformIsStackTransform, bool );
78 
80  itkGetConstMacro(SampleLastDimensionRandomly, bool);
81  itkGetConstMacro(NumSamplesLastDimension, int);
82 
84  typedef typename
99  typedef typename Superclass::RealType RealType;
117  typedef typename
121  typedef typename
123  typedef typename
125  typedef typename
127 
129  itkStaticConstMacro( FixedImageDimension, unsigned int,
130  FixedImageType::ImageDimension );
131 
133  itkStaticConstMacro( MovingImageDimension, unsigned int,
134  MovingImageType::ImageDimension );
135 
137  virtual MeasureType GetValue( const TransformParametersType & parameters ) const;
138 
140  virtual void GetDerivative( const TransformParametersType & parameters,
141  DerivativeType & derivative ) const;
142 
144  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
145  MeasureType& Value, DerivativeType& Derivative ) const;
146 
150  virtual void Initialize(void) throw ( ExceptionObject );
151 
152 protected:
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  VarianceOverLastDimensionImageMetric(const Self&); //purposely not implemented
183  void operator=(const Self&); //purposely not implemented
184 
186  void SampleRandom (const int n, const int m, std::vector<int> & numbers) const;
187 
193 
196 
199 
202 
205 
206 }; // end class VarianceOverLastDimensionImageMetric
207 
208 } // end namespace itk
209 
210 #ifndef ITK_MANUAL_INSTANTIATION
211 #include "itkVarianceOverLastDimensionImageMetric.hxx"
212 #endif
213 
214 #endif // end #ifndef __itkVarianceOverLastDimensionImageMetric_h
void PrintSelf(std::ostream &os, Indent indent) const
Superclass::MovingImageLimiterOutputType MovingImageLimiterOutputType
Superclass::GradientImageFilterPointer GradientImageFilterPointer
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...
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Superclass::GradientPixelType GradientPixelType
FixedImageLimiterType::OutputType FixedImageLimiterOutputType
Superclass::FixedImageRegionType FixedImageRegionType
ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
MovingImageType::IndexType MovingImageIndexType
InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Superclass::FixedImageLimiterOutputType FixedImageLimiterOutputType
TransformType::InputPointType FixedImagePointType
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
FixedArray< double, itkGetStaticConstMacro(MovingImageDimension) > MovingImageDerivativeScalesType
Superclass::MovingImageContinuousIndexType MovingImageContinuousIndexType
FixedImageIndexType::IndexValueType FixedImageIndexValueType
TransformType::OutputPointType MovingImagePointType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Superclass::MovingImageMaskType MovingImageMaskType
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
GradientImageFilter< MovingImageType, RealType, RealType > CentralDifferenceGradientFilterType
Superclass::CoordinateRepresentationType CoordinateRepresentationType
virtual void GetDerivative(const TransformParametersType &parameters, DerivativeType &derivative) const
Superclass::MovingImagePixelType MovingImagePixelType
Superclass::ImageSampleContainerPointer ImageSampleContainerPointer
Superclass::MovingImageMaskPointer MovingImageMaskPointer
MovingImageLimiterType::OutputType MovingImageLimiterOutputType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
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 04-01-2014 for elastix by doxygen 1.8.5 elastix logo