itkInterpolateImagePointsFilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __itkInterpolateImagePointsFilter_h
00022 #define __itkInterpolateImagePointsFilter_h
00023
00024 #include "itkBSplineInterpolateImageFunction.h"
00025 #include "itkImageToImageFilter.h"
00026 #include "itkImageToImageFilterDetail.h"
00027 #include "itkImageRegionIterator.h"
00028 #include "itkImageRegionConstIterator.h"
00029
00030 namespace itk
00031 {
00070 template <class TInputImage,
00071 class TOutputImage,
00072 class TCoordType = ITK_TYPENAME TInputImage::PixelType,
00073 class InterpolatorType = BSplineInterpolateImageFunction<TInputImage, TCoordType> >
00074 class ITK_EXPORT InterpolateImagePointsFilter :
00075 public ImageToImageFilter<TInputImage, TOutputImage>
00076 {
00077 public:
00079 typedef InterpolateImagePointsFilter Self;
00080 typedef ImageToImageFilter<TInputImage, TOutputImage> Superclass;
00081 typedef SmartPointer<Self> Pointer;
00082 typedef SmartPointer<const Self> ConstPointer;
00083
00085 itkTypeMacro(InterpolateImagePointsFilter, ImageToImageFilter);
00086
00087
00089 itkNewMacro( Self );
00090
00092 itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension );
00093
00095 typedef typename Superclass::InputImageType InputImageType;
00096 typedef typename Superclass::OutputImageType OutputImageType;
00097 typedef typename Superclass::InputImagePointer InputImagePointer;
00098
00100 typedef typename TOutputImage::Pointer OutputImagePointer;
00101 typedef ImageRegionIterator<InputImageType> OutputImageIterator;
00102 typedef typename OutputImageType::RegionType OutputImageRegionType;
00103
00105 typedef typename TOutputImage::PixelType PixelType;
00106
00108 typedef typename InterpolatorType::Pointer InterpolatorPointer;
00109 typedef typename InterpolatorType::ContinuousIndexType ContinuousIndexType;
00110
00112 typedef Image< TCoordType, itkGetStaticConstMacro(ImageDimension) > CoordImageType;
00113
00115 typedef ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(ImageDimension),itkGetStaticConstMacro(ImageDimension)> RegionCopierType;
00116
00121 void SetInputImage (const TInputImage * inputImage);
00122
00125 void SetInterpolationCoordinate (const CoordImageType * coordinate, unsigned int setDimension);
00126
00128 itkSetMacro(DefaultPixelValue,PixelType);
00129
00131 itkGetConstMacro(DefaultPixelValue,PixelType);
00132
00134 InterpolatorPointer GetInterpolator()
00135 { return m_Interpolator; }
00136
00139 void GenerateOutputInformation();
00140
00142 void GenerateInputRequestedRegion();
00143
00144 #ifdef ITK_USE_CONCEPT_CHECKING
00145
00146 itkConceptMacro(InputHasNumericTraitsCheck,
00147 (Concept::HasNumericTraits<typename TInputImage::PixelType>));
00148
00150 #endif
00151
00152 protected:
00158 void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
00159 int threadId );
00160 void BeforeThreadedGenerateData();
00162
00163 InterpolateImagePointsFilter();
00164 ~InterpolateImagePointsFilter(){};
00165 void PrintSelf(std::ostream& os, Indent indent) const;
00166
00167 private:
00168
00170 typedef typename CoordImageType::Pointer CoordImageTypePointer;
00171 typedef ImageRegionConstIterator<CoordImageType> CoordImageIterator;
00172 typedef typename CoordImageType::RegionType CoordImageRegionType;
00173
00174 InterpolateImagePointsFilter( const Self& );
00175 void operator=( const Self& );
00176
00177 InterpolatorPointer m_Interpolator;
00178 PixelType m_DefaultPixelValue;
00179
00180 };
00181
00182 }
00183
00184 #ifndef ITK_MANUAL_INSTANTIATION
00185 #include "itkInterpolateImagePointsFilter.txx"
00186 #endif
00187
00188 #endif
00189