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 __itkInterpolateImageFilter_h
00018 #define __itkInterpolateImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkImage.h"
00022 #include "itkInterpolateImageFunction.h"
00023 #include "itkLinearInterpolateImageFunction.h"
00024
00025 namespace itk
00026 {
00027
00044 template < class TInputImage, class TOutputImage >
00045 class ITK_EXPORT InterpolateImageFilter:
00046 public ImageToImageFilter<TInputImage, TOutputImage>
00047 {
00048 public:
00050 typedef InterpolateImageFilter Self;
00051 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkNewMacro(Self);
00057
00059 itkTypeMacro(InterpolateImageFilter, ImageToImageFilter);
00060
00062 typedef typename Superclass::InputImageType InputImageType;
00063 typedef typename Superclass::InputImagePointer InputImagePointer;
00064 typedef typename Superclass::OutputImageType OutputImageType;
00065 typedef typename Superclass::OutputImagePointer OutputImagePointer;
00066 typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
00067
00069 itkStaticConstMacro(ImageDimension, unsigned int,
00070 TOutputImage::ImageDimension);
00071 itkStaticConstMacro(IntermediateImageDimension, unsigned int,
00072 TOutputImage::ImageDimension + 1);
00074
00076 typedef typename TInputImage::PixelType InputPixelType;
00077 typedef Image<InputPixelType,itkGetStaticConstMacro(IntermediateImageDimension)> IntermediateImageType;
00078 typedef InterpolateImageFunction<IntermediateImageType> InterpolatorType;
00079
00081 void SetInput1( const InputImageType * image)
00082 { this->SetInput( image ); }
00083 const InputImageType * GetInput1()
00084 { return this->GetInput(); }
00086
00088 void SetInput2( const InputImageType * image);
00089 const InputImageType * GetInput2();
00091
00094 itkSetClampMacro( Distance, double, 0.0, 1.0 );
00095 itkGetConstMacro( Distance, double );
00097
00099 itkSetObjectMacro( Interpolator, InterpolatorType )
00100
00101
00102 itkGetObjectMacro( Interpolator, InterpolatorType );
00103
00106 void BeforeThreadedGenerateData();
00107
00109 void AfterThreadedGenerateData();
00110
00111 #ifdef ITK_USE_CONCEPT_CHECKING
00112
00113 itkConceptMacro(InputHasNumericTraitsCheck,
00114 (Concept::HasNumericTraits<InputPixelType>));
00115
00117 #endif
00118
00119 protected:
00120 InterpolateImageFilter();
00121 ~InterpolateImageFilter() {};
00122 void PrintSelf(std::ostream& os, Indent indent) const;
00123
00125 void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
00126 int threadId );
00127
00128 private:
00129 InterpolateImageFilter(const Self&);
00130 void operator=(const Self&);
00131
00132 typename InterpolatorType::Pointer m_Interpolator;
00133 typename IntermediateImageType::Pointer m_IntermediateImage;
00134 double m_Distance;
00135
00136 };
00137
00138
00139 }
00140
00141 #ifndef ITK_MANUAL_INSTANTIATION
00142 #include "itkInterpolateImageFilter.txx"
00143 #endif
00144
00145 #endif
00146