00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
00103
00104
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&);
00125 void operator=(const Self&);
00126 };
00127
00128 }
00129
00130 #include "itkIterativeInverseDeformationFieldImageFilter.txx"
00131
00132 #endif
00133