00001 00017 #ifndef INC_RVC_HYPERHISTOGRAM_H 00018 #define INC_RVC_HYPERHISTOGRAM_H 00019 00020 #ifndef INC_RVC_OBJECT_H 00021 #include <rvc/object.h> 00022 #endif 00023 00024 #ifndef INC_MI32_RANGE_H 00025 #include <mi32/range.h> 00026 #endif 00027 00028 00029 #ifndef GENERATING_DOXYGEN_OUTPUT 00030 // Forward Declarations 00031 class STAT_UNIVARIATE; 00032 namespace RVC { 00033 struct HYPERHISTBANDINFO; 00034 class HYPERSPECTRAL; 00035 } 00036 #endif 00037 00038 00039 namespace RVC { 00040 00047 class HYPERHISTOGRAM : public RVC::OBJECT { 00048 public: 00049 00050 HYPERHISTOGRAM (); 00051 00052 HYPERHISTOGRAM ( 00053 const RVC::HYPERHISTOGRAM& rhs 00054 ); 00055 00056 virtual ~HYPERHISTOGRAM (); 00057 00058 HYPERHISTOGRAM& operator= ( 00059 const HYPERHISTOGRAM& rhs 00060 ); 00061 00064 int GetBinIndexFromValue ( 00065 double CellValue 00066 ) const; 00067 00070 double GetBinInterval ( 00071 ) const; 00072 00076 double GetBinMaxValue ( 00077 ) const; 00078 00082 double GetBinMinValue ( 00083 ) const; 00084 00086 const DOUBLE_RANGE& GetBinRange ( 00087 ) const { return (m_BinRange); } 00088 00091 UINT32 GetCellCount ( 00092 double CellValue 00093 ) const; 00094 00097 const SIMPLE_ARRAY<UINT32>& GetCellCounts ( 00098 ) const; 00099 00102 double GetCellMaxValue ( 00103 ) const { return (m_CellRange.GetMaximum()); } 00104 00106 double GetCellMinValue ( 00107 ) const { return (m_CellRange.GetMinimum()); } 00108 00110 void GetCellRange ( 00111 DOUBLE_RANGE& CellRange 00112 ) const { CellRange = m_CellRange; } 00113 00116 UINT16 GetColumnSampleInterval ( 00117 ) const; 00118 00121 INT32 GetBand ( 00122 ) const; 00123 00126 UINT32 GetGreaterThanCount ( 00127 ) const; 00128 00131 UINT32 GetLessThanCount ( 00132 ) const; 00133 00136 UINT16 GetLineSampleInterval ( 00137 ) const; 00138 00141 double GetMean ( 00142 ) const; 00143 00146 UINT32 GetNullCellCount ( 00147 ) const; 00148 00150 ERRVALUE GetStatistics ( 00151 STAT_UNIVARIATE& stats 00152 ) const; 00153 00156 double GetStdDev ( 00157 ) const; 00158 00160 ERRVALUE Make ( 00161 const HYPERSPECTRAL& parent, 00162 INT32 BandNum, 00163 #ifdef RVC_CREDENTIALS_MANDATORY 00164 const CREDENTIALS* Credentials 00165 #else 00166 const CREDENTIALS* Credentials = 0 00167 #endif 00168 ); 00169 00174 ERRVALUE Read ( 00175 const HYPERSPECTRAL& parent, 00176 INT32 BandNum, 00177 #ifdef RVC_CREDENTIALS_MANDATORY 00178 const CREDENTIALS* Credentials 00179 #else 00180 const CREDENTIALS* Credentials = 0 00181 #endif 00182 ); 00183 00185 void SetBinRange ( 00186 const DOUBLE_RANGE& range 00187 ); 00188 00189 private: 00190 #ifndef GENERATING_DOXYGEN_OUTPUT 00191 00192 SIMPLE_ARRAY<UINT32> m_CellCount; // Array of cell counts 00193 DOUBLE_RANGE m_BinRange; // Overall bin range 00194 double m_BinInterval; // Bin interval 00195 double m_Mean; // Mean value within selected bin range 00196 double m_MeanFull; 00197 double m_StdDev; // Standard Deviation within selected bin range 00198 double m_Sum; 00199 double m_Sum2; 00200 UINT32 m_CountLtMin; // Number of cells with values less minimum bin 00201 UINT32 m_CountGtMax; // Number of cells with values greater maximum bin 00202 UINT32 m_CountNull; // Number of NULL cells in the raster 00203 DOUBLE_RANGE m_CellRange; // Overall cell range 00204 INT32 m_BandNum; 00205 00206 void SetInfo (const HYPERHISTBANDINFO& histinfo); 00207 00208 // Implementation of RVC::OBJECT virtual methods 00209 virtual OBJTYPE v_GetDftObjectType () const; 00210 00211 #endif // GENERATING_DOXYGEN_OUTPUT 00212 00213 }; 00214 00215 } // End of RVC namespace 00216 00217 #endif // INC_RVC_HYPERHISTOGRAM_H
1.6.1