ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
00001 /*========================================================================= 00002 * 00003 * Copyright Insight Software Consortium 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0.txt 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 * 00017 *=========================================================================*/ 00018 #ifndef __itkAdaptiveHistogramEqualizationImageFilter_h 00019 #define __itkAdaptiveHistogramEqualizationImageFilter_h 00020 00021 #include "itkBoxImageFilter.h" 00022 #include "itkImage.h" 00023 00024 namespace itk 00025 { 00065 template< class TImageType > 00066 class ITK_EXPORT AdaptiveHistogramEqualizationImageFilter: 00067 public BoxImageFilter< TImageType, TImageType > 00068 { 00069 public: 00070 00074 typedef AdaptiveHistogramEqualizationImageFilter Self; 00075 typedef ImageToImageFilter< TImageType, TImageType > Superclass; 00076 typedef SmartPointer< Self > Pointer; 00077 typedef SmartPointer< const Self > ConstPointer; 00078 00079 itkStaticConstMacro(ImageDimension, unsigned int, 00080 TImageType::ImageDimension); 00081 00083 itkNewMacro(Self); 00084 00086 itkTypeMacro(AdaptiveHistogramEqualizationImageFilter, ImageToImageFilter); 00087 00089 typedef TImageType ImageType; 00090 typedef typename ImageType::SizeType ImageSizeType; 00091 00095 itkSetMacro(Alpha, float); 00096 itkGetConstMacro(Alpha, float); 00098 00103 itkSetMacro(Beta, float); 00104 itkGetConstMacro(Beta, float); 00106 00109 itkSetMacro(UseLookupTable, bool); 00110 itkGetConstMacro(UseLookupTable, bool); 00111 itkBooleanMacro(UseLookupTable); 00112 protected: 00113 AdaptiveHistogramEqualizationImageFilter() 00114 { 00115 m_Alpha = .3; 00116 m_Beta = .3; 00117 this->SetRadius(5); 00118 m_UseLookupTable = false; 00119 } 00121 00122 virtual ~AdaptiveHistogramEqualizationImageFilter(){} 00123 void PrintSelf(std::ostream & os, Indent indent) const; 00124 00128 void GenerateData(); 00129 00130 private: 00131 AdaptiveHistogramEqualizationImageFilter(const Self &); //purposely not 00132 // implemented 00133 void operator=(const Self &); //purposely not 00134 00135 // implemented 00136 00138 float m_Alpha; 00139 00141 float m_Beta; 00142 00145 bool m_UseLookupTable; 00146 00148 float CumulativeFunction(float u, float v); 00149 }; 00150 } // end namespace itk 00152 00153 #ifndef ITK_MANUAL_INSTANTIATION 00154 #include "itkAdaptiveHistogramEqualizationImageFilter.hxx" 00155 #endif 00156 00157 #endif 00158