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: 2006/03/29 14:53:40 $
00007   Version:   $Revision: 1.3 $
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);
00132 
00134   itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00135 
00137   itkSetMacro(OutputOrigin, OriginPointType);
00138   virtual void SetOutputOrigin( const double* values);
00140 
00142   itkGetConstReferenceMacro( OutputOrigin, OriginPointType );
00143 
00149   itkSetMacro( SubsamplingFactor, unsigned int );
00150   itkGetMacro( SubsamplingFactor, unsigned int );
00152 
00158   virtual void GenerateOutputInformation();
00159 
00165   virtual void GenerateInputRequestedRegion();
00166 
00168   unsigned long GetMTime( void ) const;
00169 
00170 #ifdef ITK_USE_CONCEPT_CHECKING
00171 
00172   itkConceptMacro(OutputHasNumericTraitsCheck,
00173     (Concept::HasNumericTraits<OutputPixelComponentType>));
00174 
00176 #endif
00177 
00178 protected:
00179   InverseDeformationFieldImageFilter();
00180   ~InverseDeformationFieldImageFilter() {};
00181   void PrintSelf(std::ostream& os, Indent indent) const;
00182 
00187   void GenerateData();
00188 
00192   void PrepareKernelBaseSpline();
00193 
00194 private:
00195   InverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00196   void operator=(const Self&); //purposely not implemented
00197 
00198   SizeType                      m_Size;              // Size of the output image
00199   KernelTransformPointerType    m_KernelTransform;   // Coordinate transform to use
00200   SpacingType                   m_OutputSpacing;     // output image spacing
00201   OriginPointType               m_OutputOrigin;      // output image origin
00202 
00203   unsigned int                  m_SubsamplingFactor; // factor to subsample the input field.
00204 };
00205 
00206   
00207 } // end namespace itk
00208   
00209 #ifndef ITK_MANUAL_INSTANTIATION
00210 #include "itkInverseDeformationFieldImageFilter.txx"
00211 #endif
00212   
00213 #endif
00214 

Generated at Sun Sep 23 13:16:34 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000