00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkAdaptiveHistogramEqualizationImageFilter_h
00018 #define __itkAdaptiveHistogramEqualizationImageFilter_h
00019
00020
00021 #include <itkImageToImageFilter.h>
00022 #include <itkImage.h>
00023
00024 namespace itk
00025 {
00059 template <class TImageType>
00060 class ITK_EXPORT AdaptiveHistogramEqualizationImageFilter :
00061 public ImageToImageFilter< TImageType, TImageType >
00062 {
00063 public:
00064
00066 typedef AdaptiveHistogramEqualizationImageFilter Self;
00067 typedef ImageToImageFilter< TImageType, TImageType > Superclass;
00068 typedef SmartPointer<Self> Pointer;
00069 typedef SmartPointer<const Self> constPointer;
00070
00071 itkStaticConstMacro(ImageDimension, unsigned int,
00072 TImageType::ImageDimension );
00073
00075 itkNewMacro(Self);
00076
00078 itkTypeMacro(AdaptiveHistogramEqualizationImageFilter, ImageToImageFilter);
00079
00081 typedef TImageType ImageType;
00082 typedef typename ImageType::SizeType ImageSizeType;
00083
00087 itkSetMacro(Alpha, float);
00088 itkGetMacro(Alpha, float);
00090
00095 itkSetMacro(Beta, float);
00096 itkGetMacro(Beta, float);
00098
00102 itkSetMacro(Radius, ImageSizeType);
00103 itkGetConstReferenceMacro(Radius, ImageSizeType);
00105
00108 itkSetMacro(UseLookupTable, bool);
00109 itkGetMacro(UseLookupTable, bool);
00110 itkBooleanMacro(UseLookupTable);
00112
00113 protected:
00114 AdaptiveHistogramEqualizationImageFilter()
00115 {
00116 m_Alpha = .3;
00117 m_Beta = .3;
00118 m_Radius.Fill( 5 );
00119 m_UseLookupTable = false;
00120 }
00121 virtual ~AdaptiveHistogramEqualizationImageFilter(){}
00122 void PrintSelf(std::ostream& os, Indent indent) const;
00123
00125 void GenerateData();
00126
00131 void GenerateInputRequestedRegion();
00132
00133 private:
00134 AdaptiveHistogramEqualizationImageFilter(const Self&);
00135 void operator=(const Self&);
00136
00138 float m_Alpha;
00139
00141 float m_Beta;
00142
00145 ImageSizeType m_Radius;
00146
00149 bool m_UseLookupTable;
00150
00152 float CumulativeFunction(float u, float v);
00153
00154 };
00155
00156 }
00157
00158 #ifndef ITK_MANUAL_INSTANTIATION
00159 #include "itkAdaptiveHistogramEqualizationImageFilter.txx"
00160 #endif
00161
00162 #endif
00163