00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMultiResolutionPyramidImageFilter_h
00018 #define __itkMultiResolutionPyramidImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkArray2D.h"
00022
00023 namespace itk
00024 {
00025
00107 template <
00108 class TInputImage,
00109 class TOutputImage
00110 >
00111 class ITK_EXPORT MultiResolutionPyramidImageFilter :
00112 public ImageToImageFilter< TInputImage, TOutputImage >
00113 {
00114 public:
00116 typedef MultiResolutionPyramidImageFilter Self;
00117 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00118 typedef SmartPointer<Self> Pointer;
00119 typedef SmartPointer<const Self> ConstPointer;
00120
00122 itkNewMacro(Self);
00123
00125 itkTypeMacro(MultiResolutionPyramidImageFilter, ImageToImageFilter);
00126
00128 typedef Array2D<unsigned int> ScheduleType;
00129
00131 itkStaticConstMacro(ImageDimension, unsigned int,
00132 TInputImage::ImageDimension);
00133 itkStaticConstMacro(OutputImageDimension, unsigned int,
00134 TOutputImage::ImageDimension);
00136
00138 typedef typename Superclass::InputImageType InputImageType;
00139 typedef typename Superclass::OutputImageType OutputImageType;
00140 typedef typename Superclass::InputImagePointer InputImagePointer;
00141 typedef typename Superclass::OutputImagePointer OutputImagePointer;
00142 typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
00143
00150 virtual void SetNumberOfLevels(unsigned int num);
00151
00153 itkGetConstMacro(NumberOfLevels, unsigned int);
00154
00161 virtual void SetSchedule( const ScheduleType& schedule );
00162
00164 itkGetConstReferenceMacro(Schedule, ScheduleType);
00165
00170 virtual void SetStartingShrinkFactors( unsigned int factor );
00171 virtual void SetStartingShrinkFactors( unsigned int* factors );
00173
00175 const unsigned int * GetStartingShrinkFactors() const;
00176
00180 static bool IsScheduleDownwardDivisible( const ScheduleType& schedule );
00181
00188 virtual void GenerateOutputInformation();
00189
00194 virtual void GenerateOutputRequestedRegion(DataObject *output);
00196
00203 virtual void GenerateInputRequestedRegion();
00204
00205 itkSetMacro(MaximumError,double);
00206 itkGetConstReferenceMacro(MaximumError,double);
00207
00208 itkSetMacro(UseShrinkImageFilter,bool);
00209 itkGetConstMacro(UseShrinkImageFilter,bool);
00210 itkBooleanMacro(UseShrinkImageFilter);
00211
00212
00213 #ifdef ITK_USE_CONCEPT_CHECKING
00214
00215 itkConceptMacro(SameDimensionCheck,
00216 (Concept::SameDimension<ImageDimension, OutputImageDimension>));
00217 itkConceptMacro(OutputHasNumericTraitsCheck,
00218 (Concept::HasNumericTraits<typename TOutputImage::PixelType>));
00219
00221 #endif
00222
00223 protected:
00224 MultiResolutionPyramidImageFilter();
00225 ~MultiResolutionPyramidImageFilter() {};
00226 void PrintSelf(std::ostream&os, Indent indent) const;
00227
00229 void GenerateData();
00230
00231 double m_MaximumError;
00232 unsigned int m_NumberOfLevels;
00233 ScheduleType m_Schedule;
00234 bool m_UseShrinkImageFilter;
00235
00236 private:
00237 MultiResolutionPyramidImageFilter(const Self&);
00238 void operator=(const Self&);
00239
00240 };
00241
00242
00243 }
00244
00245 #ifndef ITK_MANUAL_INSTANTIATION
00246 #include "itkMultiResolutionPyramidImageFilter.txx"
00247 #endif
00248
00249 #endif
00250