00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef __mitkHistogram2D_h
00011 #define __mitkHistogram2D_h
00012
00013 #include "mitkObject.h"
00014 #include "mitkRCPtr.h"
00015 #include "mitkVolume.h"
00016
00020 class MITK_COMMON_API mitkHistogram2D:public mitkObject
00021 {
00022 public:
00023 MITK_TYPE(mitkHistogram2D, mitkObject)
00024 mitkHistogram2D();
00034 void SetSourceVolumeX(mitkVolume *vol, int chIdx=1,unsigned int *extent=NULL);
00044 void SetSourceVolumeY(mitkVolume *vol, int chIdx=1,unsigned int *extent=NULL);
00055 void SetRange(double minX,double maxX,unsigned int intervalNumX,
00056 double minY,double maxY,unsigned int intervalNumY);
00066 void GetRange(double &minX,double &maxX,unsigned int &intervalNumX,
00067 double &minY,double &maxY,unsigned int &intervalNumY)
00068 {
00069 minX=m_minX;
00070 maxX=m_maxX;
00071 intervalNumX=m_intervalNumX;
00072 minY=m_minY;
00073 maxY=m_maxY;
00074 intervalNumY=m_intervalNumY;
00075 }
00080 double GetMaxPixValX() ;
00086 double GetMinPixValX() ;
00091 double GetMaxPixValY() ;
00097 double GetMinPixValY() ;
00103 double GetMeanPixValX() ;
00109 double GetMeanPixValY() ;
00115 double GetStandardDeviationX() ;
00121 double GetStandardDeviationY() ;
00126 unsigned long GetTotalPixels() ;
00132 unsigned long* GetStatistics();
00133
00139 bool IsModified();
00143 void SetUnmodified();
00144
00149 mitkVolume *GetSourceVolumeX() { return m_volumeX;}
00154 mitkVolume *GetSourceVolumeY() { return m_volumeY;}
00155
00156 protected:
00157 virtual ~mitkHistogram2D();
00158 void _calculateHist();
00159
00160 mitkRCPtr<mitkVolume> m_volumeX;
00161 mitkRCPtr<mitkVolume> m_volumeY;
00162
00163 int m_chIdxX;
00164 int m_chIdxY;
00165
00166 unsigned int m_extentX[6];
00167 unsigned int m_extentY[6];
00168
00169 double m_minX;
00170 double m_maxX;
00171
00172 double m_minY;
00173 double m_maxY;
00174
00175 unsigned int m_intervalNumX;
00176 unsigned int m_intervalNumY;
00177
00178 bool m_calculated;
00179 bool m_modified;
00180
00181 unsigned long* m_statistics;
00182
00183 double m_MaxPixValX;
00184 double m_MinPixValX;
00185 double m_MeanPixValX;
00186 double m_StdDevX;
00187
00188 double m_MaxPixValY;
00189 double m_MinPixValY;
00190 double m_MeanPixValY;
00191 double m_StdDevY;
00192
00193 unsigned long m_TotalPixels;
00194
00195 };
00196
00197 #endif
00198