00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkHistogram1D_h
00011 #define __mitkHistogram1D_h
00012
00013 #include "mitkObject.h"
00014 #include "mitkRCPtr.h"
00015 #include "mitkVolume.h"
00016
00020 class MITK_COMMON_API mitkHistogram1D:public mitkObject
00021 {
00022 public:
00023 MITK_TYPE(mitkHistogram1D, mitkObject)
00024
00025 mitkHistogram1D();
00026
00036 void SetSourceVolume(mitkVolume *vol, int chIdx=-1,unsigned int *extent=NULL,mitkVolume* mask=NULL);
00044 void SetRange(double min,double max,unsigned int intervalNum);
00051 void GetRange(double &min,double &max,unsigned int &intervalNum) const
00052 {
00053 min=m_min;
00054 max=m_max;
00055 intervalNum=m_intervalNum;
00056 }
00061 double GetMaxPixVal() ;
00067 double GetMinPixVal() ;
00073 double GetMeanPixVal() ;
00079 double GetStandardDeviation() ;
00084 unsigned long GetTotalPixels() ;
00090 unsigned long* GetStatistics();
00091
00097 bool IsModified();
00101 void SetUnmodified();
00106 mitkVolume *GetSourceVolume() { return m_volume; }
00107
00108 protected:
00109 virtual ~mitkHistogram1D();
00110 void _calculateHist();
00111
00112 mitkRCPtr<mitkVolume> m_volume;
00113 mitkRCPtr<mitkVolume> m_mask;
00114 int m_chIdx;
00115 unsigned int m_extent[6];
00116
00117 double m_min;
00118 double m_max;
00119 unsigned int m_intervalNum;
00120
00121 bool m_calculated;
00122 bool m_modified;
00123
00124 unsigned long* m_statistics;
00125
00126 double m_MaxPixVal;
00127 double m_MinPixVal;
00128 double m_MeanPixVal;
00129 double m_StdDev;
00130
00131 unsigned long m_TotalPixels;
00132
00133 };
00134
00135
00136 #endif
00137