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: 2004/12/21 22:47:30 $
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 
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 
00030 
00031 namespace itk
00032 {
00033  
00056   template < class TInputImage, class TOutputImage >
00057   class ITK_EXPORT IterativeInverseDeformationFieldImageFilter :
00058   public ImageToImageFilter<TInputImage,TOutputImage> 
00059   {
00060   public:
00062     typedef IterativeInverseDeformationFieldImageFilter  Self;
00063     typedef ImageToImageFilter<TInputImage,TOutputImage>   Superclass;
00064     typedef SmartPointer<Self>        Pointer;
00065     typedef SmartPointer<const Self>  ConstPointer;
00066 
00068     itkNewMacro(Self);
00069 
00071     itkTypeMacro(IterativeInverseDeformationFieldImageFilter, ImageToImageFilter);
00072 
00074     typedef TInputImage InputImageType;
00075     typedef typename InputImageType::ConstPointer    InputImageConstPointer;
00076     typedef typename InputImageType::Pointer         InputImagePointer;
00077     typedef typename InputImageType::PointType       InputImagePointType; 
00078     typedef typename InputImageType::RegionType      InputImageRegionType; 
00079     typedef typename InputImageType::SpacingType     InputImageSpacingType; 
00080     typedef TOutputImage OutputImageType;
00081     typedef typename OutputImageType::Pointer        OutputImagePointer;
00082     typedef typename OutputImageType::PixelType      OutputImagePixelType;
00083     typedef typename OutputImageType::PointType      OutputImagePointType;
00084     typedef typename OutputImageType::IndexType      OutputImageIndexType;
00085     typedef typename OutputImagePixelType::ValueType OutputImageValueType;
00086 
00087     typedef TimeProbe TimeType;
00088 
00089     typedef ImageRegionConstIterator<InputImageType> InputConstIterator;
00090     typedef ImageRegionIterator<InputImageType> InputIterator;
00091     typedef ImageRegionIterator<OutputImageType> OutputIterator;
00092 
00093     typedef WarpVectorImageFilter<TOutputImage,TInputImage,TOutputImage> VectorWarperType;
00094 
00095     typedef VectorLinearInterpolateImageFunction<TInputImage,double> FieldInterpolatorType;
00096     typedef typename FieldInterpolatorType::Pointer     FieldInterpolatorPointer;
00097     typedef typename FieldInterpolatorType::OutputType  FieldInterpolatorOutputType;
00098 
00099     itkSetMacro(NumberOfIterations, unsigned int);
00100     itkGetMacro(NumberOfIterations, unsigned int);
00101 
00102     // If the error (in mm) between forward and backward mapping is smaller than the StopValue,
00103     // the algorithm stops.
00104     // This value can be used to speed up the calculation.
00105     itkSetMacro(StopValue, double);
00106     itkGetMacro(StopValue, double);
00107 
00108     char* GetReport() {return this->m_Report;}
00109 
00110   protected:
00111     IterativeInverseDeformationFieldImageFilter();
00112     ~IterativeInverseDeformationFieldImageFilter() {}
00113 
00114     void PrintSelf(std::ostream& os, Indent indent) const;
00115     void MakeReport();
00116 
00117     void GenerateData( );
00118 
00119     unsigned int m_NumberOfIterations;
00120     double m_StopValue;
00121     double m_Time;
00122 
00123   private:
00124     IterativeInverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00125     void operator=(const Self&); //purposely not implemented
00126   };
00127 
00128 } // end namespace itk
00129 
00130 #include "itkIterativeInverseDeformationFieldImageFilter.txx"
00131 
00132 #endif
00133 

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