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: 2005/07/27 15:21:10 $
00007   Version:   $Revision: 1.2 $
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   typedef TInputImage InputImageType;
00074   typedef TOutputImage OutputImageType;
00075   typedef typename InputImageType::Pointer      InputImagePointer;
00076   typedef typename InputImageType::ConstPointer InputImageConstPointer;
00077   typedef typename InputImageType::RegionType   InputImageRegionType;
00078   typedef typename OutputImageType::Pointer     OutputImagePointer;
00079 
00081   itkNewMacro(Self);  
00082 
00084   itkTypeMacro(InverseDeformationFieldImageFilter, ImageToImageFilter);
00085 
00087   itkStaticConstMacro(ImageDimension, unsigned int,
00088                       TOutputImage::ImageDimension);
00089 
00094   typedef KernelTransform<double, itkGetStaticConstMacro(ImageDimension)> KernelTransformType;
00095   typedef typename KernelTransformType::Pointer KernelTransformPointerType;
00096 
00098   typedef typename OutputImageType::SizeType SizeType;
00099 
00101   typedef typename OutputImageType::IndexType IndexType;
00102 
00104   typedef typename TOutputImage::PixelType     OutputPixelType;
00105   typedef typename OutputPixelType::ValueType  OutputPixelComponentType;
00106 
00108   typedef typename TOutputImage::RegionType OutputImageRegionType;
00109 
00111   typedef typename TOutputImage::SpacingType SpacingType;
00112   typedef typename TOutputImage::PointType   OriginPointType;
00113   
00117   itkSetObjectMacro( KernelTransform, KernelTransformType ); 
00118 
00120   itkGetObjectMacro( KernelTransform, KernelTransformType );
00121 
00123   itkSetMacro( Size, SizeType );
00124 
00126   itkGetConstReferenceMacro( Size, SizeType );
00127      
00129   itkSetMacro(OutputSpacing, SpacingType);
00130   virtual void SetOutputSpacing(const double* values);
00131 
00133   itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00134 
00136   itkSetMacro(OutputOrigin, OriginPointType);
00137   virtual void SetOutputOrigin( const double* values);
00138 
00140   itkGetConstReferenceMacro( OutputOrigin, OriginPointType );
00141 
00147   itkSetMacro( SubsamplingFactor, unsigned int );
00148   itkGetMacro( SubsamplingFactor, unsigned int );
00149 
00155   virtual void GenerateOutputInformation();
00156 
00162   virtual void GenerateInputRequestedRegion();
00163 
00165   unsigned long GetMTime( void ) const;
00166 
00167 protected:
00168   InverseDeformationFieldImageFilter();
00169   ~InverseDeformationFieldImageFilter() {};
00170   void PrintSelf(std::ostream& os, Indent indent) const;
00171 
00176   void GenerateData();
00177 
00181   void PrepareKernelBaseSpline();
00182 
00183 private:
00184   InverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00185   void operator=(const Self&); //purposely not implemented
00186 
00187   SizeType                      m_Size;              // Size of the output image
00188   KernelTransformPointerType    m_KernelTransform;   // Coordinate transform to use
00189   SpacingType                   m_OutputSpacing;     // output image spacing
00190   OriginPointType               m_OutputOrigin;      // output image origin
00191 
00192   unsigned int                  m_SubsamplingFactor; // factor to subsample the input field.
00193 };
00194 
00195   
00196 } // end namespace itk
00197   
00198 #ifndef ITK_MANUAL_INSTANTIATION
00199 #include "itkInverseDeformationFieldImageFilter.txx"
00200 #endif
00201   
00202 #endif

Generated at Wed May 24 23:29:34 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000