00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkInverseDeformationFieldImageFilter_h
00018 #define __itkInverseDeformationFieldImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkKernelTransform.h"
00022 #include "itkImageRegionConstIteratorWithIndex.h"
00023
00024 namespace itk
00025 {
00026
00063 template <class TInputImage, class TOutputImage>
00064 class ITK_EXPORT InverseDeformationFieldImageFilter:
00065 public ImageToImageFilter<TInputImage, TOutputImage>
00066 {
00067 public:
00069 typedef InverseDeformationFieldImageFilter Self;
00070 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073 typedef TInputImage InputImageType;
00074 typedef TOutputImage OutputImageType;
00075 typedef typename InputImageType::Pointer InputImagePointer;
00076 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00077 typedef typename InputImageType::RegionType InputImageRegionType;
00078 typedef typename OutputImageType::Pointer OutputImagePointer;
00079
00081 itkNewMacro(Self);
00082
00084 itkTypeMacro(InverseDeformationFieldImageFilter, ImageToImageFilter);
00085
00087 itkStaticConstMacro(ImageDimension, unsigned int,
00088 TOutputImage::ImageDimension);
00089
00094 typedef KernelTransform<double, itkGetStaticConstMacro(ImageDimension)> KernelTransformType;
00095 typedef typename KernelTransformType::Pointer KernelTransformPointerType;
00096
00098 typedef typename OutputImageType::SizeType SizeType;
00099
00101 typedef typename OutputImageType::IndexType IndexType;
00102
00104 typedef typename TOutputImage::PixelType OutputPixelType;
00105 typedef typename OutputPixelType::ValueType OutputPixelComponentType;
00106
00108 typedef typename TOutputImage::RegionType OutputImageRegionType;
00109
00111 typedef typename TOutputImage::SpacingType SpacingType;
00112 typedef typename TOutputImage::PointType OriginPointType;
00113
00117 itkSetObjectMacro( KernelTransform, KernelTransformType );
00118
00120 itkGetObjectMacro( KernelTransform, KernelTransformType );
00121
00123 itkSetMacro( Size, SizeType );
00124
00126 itkGetConstReferenceMacro( Size, SizeType );
00127
00129 itkSetMacro(OutputSpacing, SpacingType);
00130 virtual void SetOutputSpacing(const double* values);
00132
00134 itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00135
00137 itkSetMacro(OutputOrigin, OriginPointType);
00138 virtual void SetOutputOrigin( const double* values);
00140
00142 itkGetConstReferenceMacro( OutputOrigin, OriginPointType );
00143
00149 itkSetMacro( SubsamplingFactor, unsigned int );
00150 itkGetMacro( SubsamplingFactor, unsigned int );
00152
00158 virtual void GenerateOutputInformation();
00159
00165 virtual void GenerateInputRequestedRegion();
00166
00168 unsigned long GetMTime( void ) const;
00169
00170 #ifdef ITK_USE_CONCEPT_CHECKING
00171
00172 itkConceptMacro(OutputHasNumericTraitsCheck,
00173 (Concept::HasNumericTraits<OutputPixelComponentType>));
00174
00176 #endif
00177
00178 protected:
00179 InverseDeformationFieldImageFilter();
00180 ~InverseDeformationFieldImageFilter() {};
00181 void PrintSelf(std::ostream& os, Indent indent) const;
00182
00187 void GenerateData();
00188
00192 void PrepareKernelBaseSpline();
00193
00194 private:
00195 InverseDeformationFieldImageFilter(const Self&);
00196 void operator=(const Self&);
00197
00198 SizeType m_Size;
00199 KernelTransformPointerType m_KernelTransform;
00200 SpacingType m_OutputSpacing;
00201 OriginPointType m_OutputOrigin;
00202
00203 unsigned int m_SubsamplingFactor;
00204 };
00205
00206
00207 }
00208
00209 #ifndef ITK_MANUAL_INSTANTIATION
00210 #include "itkInverseDeformationFieldImageFilter.txx"
00211 #endif
00212
00213 #endif
00214