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 __itkHistogramToIntensityImageFilter_h
00018 #define __itkHistogramToIntensityImageFilter_h
00019
00020 #include "itkHistogramToImageFilter.h"
00021
00022 namespace itk
00023 {
00024
00038 namespace Function {
00039 template< class TInput, class TOutput=unsigned long >
00040 class HistogramIntensityFunction
00041 {
00042 public:
00043
00044
00045 typedef TOutput OutputPixelType;
00046
00047 HistogramIntensityFunction():
00048 m_TotalFrequency(1) {}
00049
00050 ~HistogramIntensityFunction() {};
00051
00052 inline OutputPixelType operator()( const TInput & A ) const
00053 {
00054 return static_cast<OutputPixelType>( A );
00055 }
00056
00057 void SetTotalFrequency( unsigned long n )
00058 {
00059 m_TotalFrequency = n;
00060 }
00061
00062 unsigned long GetTotalFrequency( ) const
00063 {
00064 return m_TotalFrequency;
00065 }
00066
00067 private:
00068 unsigned long m_TotalFrequency;
00069 };
00070 }
00071
00072 template <class THistogram, unsigned int NDimension, class TOutputPixel=unsigned long >
00073 class ITK_EXPORT HistogramToIntensityImageFilter :
00074 public HistogramToImageFilter< THistogram, NDimension,
00075 Function::HistogramIntensityFunction< unsigned long, TOutputPixel > >
00076 {
00077 public:
00078
00080 typedef HistogramToIntensityImageFilter Self;
00081
00083 typedef HistogramToImageFilter< THistogram, NDimension,
00084 Function::HistogramIntensityFunction< unsigned long, TOutputPixel > >
00085 Superclass;
00086
00087
00088 typedef SmartPointer<Self> Pointer;
00089 typedef SmartPointer<const Self> ConstPointer;
00090
00092 itkTypeMacro( HistogramToIntensityImageFilter, HistogramToImageFilter );
00093
00095 itkNewMacro(Self);
00096
00097 protected:
00098 HistogramToIntensityImageFilter() {}
00099 virtual ~HistogramToIntensityImageFilter() {}
00100
00101 private:
00102 HistogramToIntensityImageFilter(const Self&);
00103 void operator=(const Self&);
00104
00105 };
00106
00107 }
00108
00109 #endif
00110