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


Generated on 21-03-2014 for elastix by doxygen 1.8.1.2 elastix logo