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

itkIterativeInverseDeformationFieldImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkIterativeInverseDeformationFieldImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2010-01-20 21:08:48 $
00007   Version:   $Revision: 1.9 $
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 __itkIterativeInverseDeformationFieldImageFilter_h
00019 #define __itkIterativeInverseDeformationFieldImageFilter_h
00020 
00021 
00022 #include "itkImageToImageFilter.h"
00023 
00024 #include "itkWarpVectorImageFilter.h"
00025 #include "itkVectorLinearInterpolateImageFunction.h"
00026 #include "itkImageRegionIterator.h"
00027 #include "itkTimeProbe.h"
00028 
00029 namespace itk
00030 {
00031  
00054 template < class TInputImage, class TOutputImage >
00055 class ITK_EXPORT IterativeInverseDeformationFieldImageFilter :
00056     public ImageToImageFilter<TInputImage,TOutputImage> 
00057 {
00058 public:
00060   typedef IterativeInverseDeformationFieldImageFilter   Self;
00061   typedef ImageToImageFilter<TInputImage,TOutputImage>  Superclass;
00062   typedef SmartPointer<Self>                            Pointer;
00063   typedef SmartPointer<const Self>                      ConstPointer;
00064 
00066   itkNewMacro(Self);
00067 
00069   itkTypeMacro(IterativeInverseDeformationFieldImageFilter, ImageToImageFilter);
00070 
00072   typedef TInputImage                              InputImageType;
00073   typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00074   typedef typename InputImageType::Pointer         InputImagePointer;
00075   typedef typename InputImageType::PointType       InputImagePointType; 
00076   typedef typename InputImageType::RegionType      InputImageRegionType; 
00077   typedef typename InputImageType::SpacingType     InputImageSpacingType; 
00078   typedef TOutputImage                             OutputImageType;
00079   typedef typename OutputImageType::Pointer        OutputImagePointer;
00080   typedef typename OutputImageType::PixelType      OutputImagePixelType;
00081   typedef typename OutputImageType::PointType      OutputImagePointType;
00082   typedef typename OutputImageType::IndexType      OutputImageIndexType;
00083   typedef typename OutputImagePixelType::ValueType OutputImageValueType;
00084 
00085   typedef TimeProbe TimeType;
00086   
00087   typedef ImageRegionConstIterator<InputImageType> InputConstIterator;
00088   typedef ImageRegionIterator<InputImageType>      InputIterator;
00089   typedef ImageRegionIterator<OutputImageType>     OutputIterator;
00090 
00091   typedef WarpVectorImageFilter<TOutputImage,TInputImage,TOutputImage> VectorWarperType;
00092 
00093   typedef VectorLinearInterpolateImageFunction<TInputImage,double> FieldInterpolatorType;
00094   typedef typename FieldInterpolatorType::Pointer                  FieldInterpolatorPointer;
00095   typedef typename FieldInterpolatorType::OutputType               FieldInterpolatorOutputType;
00096 
00097   itkSetMacro(NumberOfIterations, unsigned int);
00098   itkGetConstMacro(NumberOfIterations, unsigned int);
00099   
00100   // If the error (in mm) between forward and backward mapping is smaller than the StopValue,
00101   // the algorithm stops.
00102   // This value can be used to speed up the calculation.
00103   itkSetMacro(StopValue, double);
00104   itkGetConstMacro(StopValue, double);
00105 
00106 #ifdef ITK_USE_CONCEPT_CHECKING
00107 
00108   itkConceptMacro(OutputHasNumericTraitsCheck,
00109                   (Concept::HasNumericTraits<OutputImageValueType>));
00110 
00112 #endif
00113 
00114 protected:
00115   IterativeInverseDeformationFieldImageFilter();
00116   ~IterativeInverseDeformationFieldImageFilter() {}
00117 
00118   void PrintSelf(std::ostream& os, Indent indent) const;
00119 
00120   void GenerateData( );
00121 
00122   unsigned int m_NumberOfIterations;
00123   double       m_StopValue;
00124   double       m_Time;
00125 
00126 private:
00127   IterativeInverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00128   void operator=(const Self&); //purposely not implemented
00129 };
00130 
00131 } // end namespace itk
00132 
00133 #include "itkIterativeInverseDeformationFieldImageFilter.txx"
00134 
00135 #endif
00136 

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