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: 2008-10-16 16:45:11 $
00007   Version:   $Revision: 1.7 $
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   itkGetMacro(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   itkGetMacro(StopValue, double);
00105 
00106   char* GetReport() {return this->m_Report;}
00107 
00108 #ifdef ITK_USE_CONCEPT_CHECKING
00109 
00110   itkConceptMacro(OutputHasNumericTraitsCheck,
00111                   (Concept::HasNumericTraits<OutputImageValueType>));
00112 
00114 #endif
00115 
00116 protected:
00117   IterativeInverseDeformationFieldImageFilter();
00118   ~IterativeInverseDeformationFieldImageFilter() {}
00119 
00120   void PrintSelf(std::ostream& os, Indent indent) const;
00121   void MakeReport();
00122 
00123   void GenerateData( );
00124 
00125   unsigned int m_NumberOfIterations;
00126   double       m_StopValue;
00127   double       m_Time;
00128 
00129 private:
00130   IterativeInverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00131   void operator=(const Self&); //purposely not implemented
00132 };
00133 
00134 } // end namespace itk
00135 
00136 #include "itkIterativeInverseDeformationFieldImageFilter.txx"
00137 
00138 #endif
00139 

Generated at Wed Nov 5 22:32:13 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000