Go to the documentation of this file.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
00074 typedef TInputImage InputImageType;
00075 typedef typename InputImageType::Pointer InputImagePointer;
00076 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00077 typedef typename InputImageType::RegionType InputImageRegionType;
00078 typedef TOutputImage OutputImageType;
00079 typedef typename OutputImageType::Pointer OutputImagePointer;
00080
00082 itkNewMacro(Self);
00083
00085 itkTypeMacro(InverseDeformationFieldImageFilter, ImageToImageFilter);
00086
00088 itkStaticConstMacro(ImageDimension, unsigned int,
00089 TOutputImage::ImageDimension);
00090
00095 typedef KernelTransform<
00096 double, itkGetStaticConstMacro(ImageDimension)> KernelTransformType;
00097 typedef typename KernelTransformType::Pointer KernelTransformPointerType;
00098
00100 typedef typename OutputImageType::SizeType SizeType;
00101
00103 typedef typename OutputImageType::IndexType IndexType;
00104
00106 typedef typename TOutputImage::PixelType OutputPixelType;
00107 typedef typename OutputPixelType::ValueType OutputPixelComponentType;
00108
00110 typedef typename TOutputImage::RegionType OutputImageRegionType;
00111
00113 typedef typename TOutputImage::SpacingType SpacingType;
00114 typedef typename TOutputImage::PointType OriginPointType;
00115
00119 itkSetObjectMacro( KernelTransform, KernelTransformType );
00120
00122 itkGetObjectMacro( KernelTransform, KernelTransformType );
00123
00125 itkSetMacro( Size, SizeType );
00126
00128 itkGetConstReferenceMacro( Size, SizeType );
00129
00131 itkSetMacro(OutputSpacing, SpacingType);
00132 virtual void SetOutputSpacing(const double* values);
00134
00136 itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00137
00139 itkSetMacro(OutputOrigin, OriginPointType);
00140 virtual void SetOutputOrigin( const double* values);
00142
00144 itkGetConstReferenceMacro( OutputOrigin, OriginPointType );
00145
00151 itkSetMacro( SubsamplingFactor, unsigned int );
00152 itkGetConstMacro( SubsamplingFactor, unsigned int );
00154
00160 virtual void GenerateOutputInformation();
00161
00167 virtual void GenerateInputRequestedRegion();
00168
00170 unsigned long GetMTime( void ) const;
00171
00172 #ifdef ITK_USE_CONCEPT_CHECKING
00173
00174 itkConceptMacro(OutputHasNumericTraitsCheck,
00175 (Concept::HasNumericTraits<OutputPixelComponentType>));
00176
00178 #endif
00179
00180 protected:
00181 InverseDeformationFieldImageFilter();
00182 ~InverseDeformationFieldImageFilter() {};
00183 void PrintSelf(std::ostream& os, Indent indent) const;
00184
00189 void GenerateData();
00190
00194 void PrepareKernelBaseSpline();
00195
00196 private:
00197 InverseDeformationFieldImageFilter(const Self&);
00198 void operator=(const Self&);
00199
00200 SizeType m_Size;
00201 KernelTransformPointerType m_KernelTransform;
00202 SpacingType m_OutputSpacing;
00203 OriginPointType m_OutputOrigin;
00204
00205 unsigned int m_SubsamplingFactor;
00206 };
00207
00208
00209 }
00210
00211 #ifndef ITK_MANUAL_INSTANTIATION
00212 #include "itkInverseDeformationFieldImageFilter.txx"
00213 #endif
00214
00215 #endif
00216