Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkHistogram1D.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
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;  // range min
00118     double m_max;  // range 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; // min value within extent
00127     double m_MinPixVal; // max value within extent
00128     double m_MeanPixVal; 
00129     double m_StdDev; 
00130     
00131     unsigned long m_TotalPixels;
00132     
00133 };
00134 
00135 
00136 #endif
00137 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3