go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
elxVarianceOverLastDimensionMetric.h
Go to the documentation of this file.
00001 /*======================================================================
00002 
00003   This file is part of the elastix software.
00004 
00005   Copyright (c) University Medical Center Utrecht. All rights reserved.
00006   See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007   details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE. See the above copyright notices for more information.
00012 
00013 ======================================================================*/
00014 
00015 #ifndef __elxVarianceOverLastDimensionMetric_H__
00016 #define __elxVarianceOverLastDimensionMetric_H__
00017 
00018 #include "elxIncludes.h"
00019 #include "itkVarianceOverLastDimensionImageMetric.h"
00020 #include "itkAdvancedBSplineDeformableTransform.h"
00021 #include "../Transforms/StackTransform/itkStackTransform.h"
00022 
00023 #include "elxTimer.h"
00024 
00025 namespace elastix
00026 {
00027 using namespace itk;
00028 
00066   template <class TElastix >
00067     class VarianceOverLastDimensionMetric:
00068     public
00069       VarianceOverLastDimensionImageMetric<
00070         ITK_TYPENAME MetricBase<TElastix>::FixedImageType,
00071         ITK_TYPENAME MetricBase<TElastix>::MovingImageType >,
00072     public MetricBase<TElastix>
00073   {
00074   public:
00075 
00077     typedef VarianceOverLastDimensionMetric               Self;
00078     typedef VarianceOverLastDimensionImageMetric<
00079       typename MetricBase<TElastix>::FixedImageType,
00080       typename MetricBase<TElastix>::MovingImageType >    Superclass1;
00081     typedef MetricBase<TElastix>                          Superclass2;
00082     typedef SmartPointer<Self>                            Pointer;
00083     typedef SmartPointer<const Self>                      ConstPointer;
00084 
00086     itkNewMacro( Self );
00087 
00089     itkTypeMacro( VarianceOverLastDimensionMetric, VarianceOverLastDimensionImageMetric );
00090 
00095     elxClassNameMacro( "VarianceOverLastDimensionMetric" );
00096 
00098     typedef typename
00099       Superclass1::CoordinateRepresentationType              CoordinateRepresentationType;
00100     typedef typename Superclass1::ScalarType                 ScalarType;
00101     typedef typename Superclass1::MovingImageType            MovingImageType;
00102     typedef typename Superclass1::MovingImagePixelType       MovingImagePixelType;
00103     typedef typename Superclass1::MovingImageConstPointer    MovingImageConstPointer;
00104     typedef typename Superclass1::FixedImageType             FixedImageType;
00105     typedef typename Superclass1::FixedImageConstPointer     FixedImageConstPointer;
00106     typedef typename Superclass1::FixedImageRegionType       FixedImageRegionType;
00107     typedef typename Superclass1::FixedImageSizeType         FixedImageSizeType;
00108     typedef typename Superclass1::TransformType              TransformType;
00109     typedef typename Superclass1::TransformPointer           TransformPointer;
00110     typedef typename Superclass1::InputPointType             InputPointType;
00111     typedef typename Superclass1::OutputPointType            OutputPointType;
00112     typedef typename Superclass1::TransformParametersType    TransformParametersType;
00113     typedef typename Superclass1::TransformJacobianType      TransformJacobianType;
00114     typedef typename Superclass1::InterpolatorType           InterpolatorType;
00115     typedef typename Superclass1::InterpolatorPointer        InterpolatorPointer;
00116     typedef typename Superclass1::RealType                   RealType;
00117     typedef typename Superclass1::GradientPixelType          GradientPixelType;
00118     typedef typename Superclass1::GradientImageType          GradientImageType;
00119     typedef typename Superclass1::GradientImagePointer       GradientImagePointer;
00120     typedef typename Superclass1::GradientImageFilterType    GradientImageFilterType;
00121     typedef typename Superclass1::GradientImageFilterPointer GradientImageFilterPointer;
00122     typedef typename Superclass1::FixedImageMaskType         FixedImageMaskType;
00123     typedef typename Superclass1::FixedImageMaskPointer      FixedImageMaskPointer;
00124     typedef typename Superclass1::MovingImageMaskType        MovingImageMaskType;
00125     typedef typename Superclass1::MovingImageMaskPointer     MovingImageMaskPointer;
00126     typedef typename Superclass1::MeasureType                MeasureType;
00127     typedef typename Superclass1::DerivativeType             DerivativeType;
00128     typedef typename Superclass1::ParametersType             ParametersType;
00129     typedef typename Superclass1::FixedImagePixelType        FixedImagePixelType;
00130     typedef typename Superclass1::MovingImageRegionType      MovingImageRegionType;
00131     typedef typename Superclass1::ImageSamplerType           ImageSamplerType;
00132     typedef typename Superclass1::ImageSamplerPointer        ImageSamplerPointer;
00133     typedef typename Superclass1::ImageSampleContainerType   ImageSampleContainerType;
00134     typedef typename
00135       Superclass1::ImageSampleContainerPointer               ImageSampleContainerPointer;
00136     typedef typename Superclass1::FixedImageLimiterType      FixedImageLimiterType;
00137     typedef typename Superclass1::MovingImageLimiterType     MovingImageLimiterType;
00138     typedef typename
00139       Superclass1::FixedImageLimiterOutputType               FixedImageLimiterOutputType;
00140     typedef typename
00141       Superclass1::MovingImageLimiterOutputType              MovingImageLimiterOutputType;
00142     typedef typename
00143       Superclass1::MovingImageDerivativeScalesType           MovingImageDerivativeScalesType;
00144 
00146     itkStaticConstMacro( FixedImageDimension, unsigned int,
00147       FixedImageType::ImageDimension );
00148 
00150     itkStaticConstMacro( MovingImageDimension, unsigned int,
00151       MovingImageType::ImageDimension );
00152 
00154     typedef typename Superclass2::ElastixType               ElastixType;
00155     typedef typename Superclass2::ElastixPointer            ElastixPointer;
00156     typedef typename Superclass2::ConfigurationType         ConfigurationType;
00157     typedef typename Superclass2::ConfigurationPointer      ConfigurationPointer;
00158     typedef typename Superclass2::RegistrationType          RegistrationType;
00159     typedef typename Superclass2::RegistrationPointer       RegistrationPointer;
00160     typedef typename Superclass2::ITKBaseType               ITKBaseType;
00161 
00163     typedef AdvancedBSplineDeformableTransformBase<
00164       ScalarType, FixedImageDimension >             BSplineTransformBaseType;
00165     typedef AdvancedCombinationTransform<
00166       ScalarType, FixedImageDimension >             CombinationTransformType;
00167     typedef StackTransform<
00168       ScalarType, FixedImageDimension, MovingImageDimension > StackTransformType;
00169     typedef AdvancedBSplineDeformableTransformBase<
00170       ScalarType, FixedImageDimension - 1 >         ReducedDimensionBSplineTransformBaseType;
00171 
00173     typedef tmr::Timer          TimerType;
00175     typedef TimerType::Pointer  TimerPointer;
00176 
00180     virtual void Initialize(void) throw (ExceptionObject);
00181 
00187     virtual void BeforeEachResolution(void);
00188 
00189   protected:
00190 
00192     VarianceOverLastDimensionMetric(){};
00194     virtual ~VarianceOverLastDimensionMetric() {}
00195 
00196   private:
00197 
00199     VarianceOverLastDimensionMetric( const Self& ); // purposely not implemented
00201     void operator=( const Self& );              // purposely not implemented
00202 
00203   }; // end class VarianceOverLastDimensionMetric
00204 
00205 
00206 } // end namespace elastix
00207 
00208 
00209 #ifndef ITK_MANUAL_INSTANTIATION
00210 #include "elxVarianceOverLastDimensionMetric.hxx"
00211 #endif
00212 
00213 #endif // end #ifndef __elxVarianceOverLastDimensionMetric_H__
00214 


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo