Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkExponentialDeformationFieldImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkExponentialDeformationFieldImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-23 03:43:41 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __itkExponentialDeformationFieldImageFilter_h
00019 #define __itkExponentialDeformationFieldImageFilter_h
00020 
00021 #include "itkImageToImageFilter.h"
00022 #include "itkDivideByConstantImageFilter.h"
00023 #include "itkCastImageFilter.h"
00024 #include "itkWarpVectorImageFilter.h"
00025 #include "itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunction.h"
00026 #include "itkAddImageFilter.h"
00027 
00028 
00029 namespace itk
00030 {
00031 
00064 template <class TInputImage, class TOutputImage>
00065 class ITK_EXPORT ExponentialDeformationFieldImageFilter:
00066       public ImageToImageFilter<TInputImage, TOutputImage>
00067 {
00068 public:
00070   typedef ExponentialDeformationFieldImageFilter         Self;
00071   typedef ImageToImageFilter<TInputImage,TOutputImage>   Superclass;
00072   typedef SmartPointer<Self>                             Pointer;
00073   typedef SmartPointer<const Self>                       ConstPointer;
00074 
00076   itkNewMacro(Self);
00077 
00079   itkTypeMacro(ExponentialDeformationFieldImageFilter, ImageToImageFilter);
00080 
00082   typedef TInputImage                                  InputImageType;
00083   typedef typename InputImageType::Pointer             InputImagePointer;
00084   typedef typename InputImageType::ConstPointer        InputImageConstPointer;
00085   typedef typename InputImageType::PixelType           InputPixelType;
00086   typedef typename InputPixelType::RealValueType       InputPixelRealValueType;
00087 
00088   typedef TOutputImage                                 OutputImageType;
00089   typedef typename OutputImageType::Pointer            OutputImagePointer;
00090   typedef typename OutputImageType::PixelType          OutputPixelType;
00091 
00093   itkSetMacro(MaximumNumberOfIterations, unsigned int);
00094   itkGetConstMacro(MaximumNumberOfIterations, unsigned int);
00096 
00101   itkSetMacro( AutomaticNumberOfIterations, bool );
00102   itkGetConstMacro( AutomaticNumberOfIterations, bool );
00103   itkBooleanMacro(AutomaticNumberOfIterations);
00105 
00111   itkSetMacro( ComputeInverse, bool );
00112   itkGetConstMacro( ComputeInverse, bool );
00113   itkBooleanMacro(ComputeInverse);
00115 
00117   itkStaticConstMacro(ImageDimension, unsigned int,
00118                       TInputImage::ImageDimension);
00119   itkStaticConstMacro(OutputImageDimension, unsigned int,
00120                       TInputImage::ImageDimension );
00121   itkStaticConstMacro(PixelDimension, unsigned int,
00122                       InputPixelType::Dimension );
00123   itkStaticConstMacro(OutputPixelDimension, unsigned int,
00124                       OutputPixelType::Dimension );
00126 
00127 
00128 #ifdef ITK_USE_CONCEPT_CHECKING
00129 
00130    itkConceptMacro(OutputHasNumericTraitsCheck,
00131                    (Concept::HasNumericTraits<typename OutputPixelType::ValueType>));
00132    itkConceptMacro(SameDimensionCheck1,
00133                    (Concept::SameDimension<ImageDimension,OutputImageDimension>));
00134    itkConceptMacro(SameDimensionCheck2,
00135                    (Concept::SameDimension<ImageDimension,PixelDimension>));
00136    itkConceptMacro(SameDimensionCheck3,
00137                    (Concept::SameDimension<ImageDimension,OutputPixelDimension>));
00138 
00140 #endif
00141 
00142 protected:
00143   ExponentialDeformationFieldImageFilter();
00144   virtual ~ExponentialDeformationFieldImageFilter() {};
00145 
00146   void PrintSelf(std::ostream& os, Indent indent) const;
00147 
00151   void GenerateData();
00152 
00153   typedef typename InputImageType::RegionType          RegionType;
00154 
00155   typedef DivideByConstantImageFilter<
00156     InputImageType,
00157     InputPixelRealValueType, OutputImageType >         DivideByConstantType;
00158 
00159   typedef CastImageFilter<
00160     InputImageType, OutputImageType>                   CasterType;
00161 
00162   typedef WarpVectorImageFilter<
00163     OutputImageType,
00164     OutputImageType, OutputImageType>                  VectorWarperType;
00165 
00166   typedef VectorLinearInterpolateNearestNeighborExtrapolateImageFunction<
00167     OutputImageType,double>                            FieldInterpolatorType;
00168 
00169   typedef AddImageFilter<
00170     OutputImageType, OutputImageType, OutputImageType> AdderType;
00171 
00172   typedef typename DivideByConstantType::Pointer       DivideByConstantPointer;
00173   typedef typename CasterType::Pointer                 CasterPointer;
00174   typedef typename VectorWarperType::Pointer           VectorWarperPointer;
00175   typedef typename FieldInterpolatorType::Pointer      FieldInterpolatorPointer;
00176   typedef typename FieldInterpolatorType::OutputType   FieldInterpolatorOutputType;
00177   typedef typename AdderType::Pointer                  AdderPointer;
00178 
00179 
00180 private:
00181   ExponentialDeformationFieldImageFilter(const Self&); //purposely not implemented
00182   void operator=(const Self&); //purposely not implemented
00183 
00184   bool                       m_AutomaticNumberOfIterations;
00185   unsigned int               m_MaximumNumberOfIterations;
00186 
00187   bool                       m_ComputeInverse;
00188 
00189   DivideByConstantPointer    m_Divider;
00190   CasterPointer              m_Caster;
00191   VectorWarperPointer        m_Warper;
00192   AdderPointer               m_Adder;
00193 };
00194 
00195 
00196 } // end namespace itk
00197 
00198 #ifndef ITK_MANUAL_INSTANTIATION
00199 #include "itkExponentialDeformationFieldImageFilter.txx"
00200 #endif
00201 
00202 #endif
00203 

Generated at Mon Jul 12 2010 18:17:29 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000