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: 2006/03/29 14:53:40 $
00007   Version:   $Revision: 1.6 $
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 #ifdef ITK_USE_CONCEPT_CHECKING
00111 
00112     itkConceptMacro(OutputHasNumericTraitsCheck,
00113                     (Concept::HasNumericTraits<OutputImageValueType>));
00114 
00116 #endif
00117 
00118   protected:
00119     IterativeInverseDeformationFieldImageFilter();
00120     ~IterativeInverseDeformationFieldImageFilter() {}
00121 
00122     void PrintSelf(std::ostream& os, Indent indent) const;
00123     void MakeReport();
00124 
00125     void GenerateData( );
00126 
00127     unsigned int m_NumberOfIterations;
00128     double m_StopValue;
00129     double m_Time;
00130 
00131   private:
00132     IterativeInverseDeformationFieldImageFilter(const Self&); //purposely not implemented
00133     void operator=(const Self&); //purposely not implemented
00134   };
00135 
00136 } // end namespace itk
00137 
00138 #include "itkIterativeInverseDeformationFieldImageFilter.txx"
00139 
00140 #endif
00141 
00142 

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