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

itkInverseDeformationFieldImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkInverseDeformationFieldImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-25 12:27:27 $
00007   Version:   $Revision: 1.5 $
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 #ifndef __itkInverseDeformationFieldImageFilter_h
00018 #define __itkInverseDeformationFieldImageFilter_h
00019 
00020 #include "itkImageToImageFilter.h"
00021 #include "itkKernelTransform.h"
00022 #include "itkImageRegionConstIteratorWithIndex.h"
00023 
00024 namespace itk
00025 {
00026 
00063 template <class TInputImage, class TOutputImage>
00064 class ITK_EXPORT InverseDeformationFieldImageFilter:
00065     public ImageToImageFilter<TInputImage, TOutputImage>
00066 {
00067 public:
00069   typedef InverseDeformationFieldImageFilter            Self;
00070   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00071   typedef SmartPointer<Self>                            Pointer;
00072   typedef SmartPointer<const Self>                      ConstPointer;
00073 
00074   typedef TInputImage                           InputImageType;
00075   typedef typename InputImageType::Pointer      InputImagePointer;
00076   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00077   typedef typename InputImageType::RegionType   InputImageRegionType;
00078   typedef TOutputImage                          OutputImageType;
00079   typedef typename OutputImageType::Pointer     OutputImagePointer;
00080 
00082   itkNewMacro(Self);  
00083 
00085   itkTypeMacro(InverseDeformationFieldImageFilter, ImageToImageFilter);
00086 
00088   itkStaticConstMacro(ImageDimension, unsigned int,
00089                       TOutputImage::ImageDimension);
00090 
00095   typedef KernelTransform<
00096     double, itkGetStaticConstMacro(ImageDimension)> KernelTransformType;
00097   typedef typename KernelTransformType::Pointer     KernelTransformPointerType;
00098 
00100   typedef typename OutputImageType::SizeType SizeType;
00101 
00103   typedef typename OutputImageType::IndexType IndexType;
00104 
00106   typedef typename TOutputImage::PixelType     OutputPixelType;
00107   typedef typename OutputPixelType::ValueType  OutputPixelComponentType;
00108 
00110   typedef typename TOutputImage::RegionType OutputImageRegionType;
00111 
00113   typedef typename TOutputImage::SpacingType SpacingType;
00114   typedef typename TOutputImage::PointType   OriginPointType;
00115 
00119   itkSetObjectMacro( KernelTransform, KernelTransformType ); 
00120 
00122   itkGetObjectMacro( KernelTransform, KernelTransformType );
00123 
00125   itkSetMacro( Size, SizeType );
00126 
00128   itkGetConstReferenceMacro( Size, SizeType );
00129 
00131   itkSetMacro(OutputSpacing, SpacingType);
00132   virtual void SetOutputSpacing(const double* values);
00134 
00136   itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00137 
00139   itkSetMacro(OutputOrigin, OriginPointType);
00140   virtual void SetOutputOrigin( const double* values);
00142 
00144   itkGetConstReferenceMacro( OutputOrigin, OriginPointType );
00145 
00151   itkSetMacro( SubsamplingFactor, unsigned int );
00152   itkGetConstMacro( SubsamplingFactor, unsigned int );
00154 
00160   virtual void GenerateOutputInformation();
00161 
00167   virtual void GenerateInputRequestedRegion();
00168 
00170   unsigned long GetMTime( void ) const;
00171 
00172 #ifdef ITK_USE_CONCEPT_CHECKING
00173 
00174   itkConceptMacro(OutputHasNumericTraitsCheck,
00175     (Concept::HasNumericTraits<OutputPixelComponentType>));
00176 
00178 #endif
00179 
00180 protected:
00181   InverseDeformationFieldImageFilter();
00182   ~InverseDeformationFieldImageFilter() {};
00183   void PrintSelf(std::ostream& os, Indent indent) const;
00184 
00189   void GenerateData();
00190 
00194   void PrepareKernelBaseSpline();
00195 
00196 private:
00197   InverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00198   void operator=(const Self&); //purposely not implemented
00199 
00200   SizeType                      m_Size;              // Size of the output image
00201   KernelTransformPointerType    m_KernelTransform;   // Coordinate transform to use
00202   SpacingType                   m_OutputSpacing;     // output image spacing
00203   OriginPointType               m_OutputOrigin;      // output image origin
00204 
00205   unsigned int                  m_SubsamplingFactor; // factor to subsample the input field.
00206 };
00207 
00208   
00209 } // end namespace itk
00210   
00211 #ifndef ITK_MANUAL_INSTANTIATION
00212 #include "itkInverseDeformationFieldImageFilter.txx"
00213 #endif
00214   
00215 #endif
00216 

Generated at Fri Apr 16 18:47:16 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000