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  * 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 
19 #ifndef __itkVarianceOverLastDimensionImageMetric_h
20 #define __itkVarianceOverLastDimensionImageMetric_h
21 
22 #include "itkSmoothingRecursiveGaussianImageFilter.h"
24 #include "itkNearestNeighborInterpolateImageFunction.h"
26 
27 namespace itk
28 {
29 
51 template< class TFixedImage, class TMovingImage >
53  public AdvancedImageToImageMetric< TFixedImage, TMovingImage >
54 {
55 public:
56 
60  TFixedImage, TMovingImage > Superclass;
62  typedef SmartPointer< const Self > ConstPointer;
63 
65  typedef typename FixedImageRegionType::SizeType FixedImageSizeType;
66 
68  itkNewMacro( Self );
69 
72 
74  itkSetMacro( SampleLastDimensionRandomly, bool );
75  itkSetMacro( NumSamplesLastDimension, unsigned int );
76  itkSetMacro( NumAdditionalSamplesFixed, unsigned int );
77  itkSetMacro( ReducedDimensionIndex, unsigned int );
78  itkSetMacro( SubtractMean, bool );
79  itkSetMacro( GridSize, FixedImageSizeType );
80  itkSetMacro( TransformIsStackTransform, bool );
81 
83  itkGetConstMacro( SampleLastDimensionRandomly, bool );
84  itkGetConstMacro( NumSamplesLastDimension, int );
85 
87  typedef typename
102  typedef typename Superclass::RealType RealType;
120  typedef typename
124  typedef typename
126  typedef typename
128  typedef typename
130 
132  itkStaticConstMacro( FixedImageDimension, unsigned int,
133  FixedImageType::ImageDimension );
134 
136  itkStaticConstMacro( MovingImageDimension, unsigned int,
137  MovingImageType::ImageDimension );
138 
140  virtual MeasureType GetValue( const TransformParametersType & parameters ) const;
141 
143  virtual void GetDerivative( const TransformParametersType & parameters,
144  DerivativeType & derivative ) const;
145 
147  virtual void GetValueAndDerivative( const TransformParametersType & parameters,
148  MeasureType & Value, DerivativeType & Derivative ) const;
149 
153  virtual void Initialize( void ) throw ( ExceptionObject );
154 
155 protected:
156 
158  virtual ~VarianceOverLastDimensionImageMetric() {}
159  void PrintSelf( std::ostream & os, Indent indent ) const;
160 
168  typedef typename itk::ContinuousIndex< CoordinateRepresentationType, FixedImageDimension >
176 
181  const TransformJacobianType & jacobian,
182  const MovingImageDerivativeType & movingImageDerivative,
183  DerivativeType & imageJacobian ) const;
184 
185 private:
186 
187  VarianceOverLastDimensionImageMetric( const Self & ); // purposely not implemented
188  void operator=( const Self & ); // purposely not implemented
189 
191  void SampleRandom( const int n, const int m, std::vector< int > & numbers ) const;
192 
198 
201 
204 
206  FixedImageSizeType m_GridSize;
207 
210 
211 };
212 
213 } // end namespace itk
214 
215 #ifndef ITK_MANUAL_INSTANTIATION
216 #include "itkVarianceOverLastDimensionImageMetric.hxx"
217 #endif
218 
219 #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::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 04-09-2015 for elastix by doxygen 1.8.9.1 elastix logo