00001 #ifndef Impala_Core_Feature_Clusteror_h 00002 #define Impala_Core_Feature_Clusteror_h 00003 00004 #include "Core/Feature/FeatureTable.h" 00005 00006 namespace Impala 00007 { 00008 namespace Core 00009 { 00010 namespace Feature 00011 { 00012 00013 00021 class Clusteror 00022 { 00023 public: 00024 00025 Clusteror(int pixelFeatureSet, int regionFeatureSet, int nrWantedClusters, 00026 int minElemsInCluster) 00027 { 00028 mPixelFeatureSet = pixelFeatureSet; 00029 mRegionFeatureSet = regionFeatureSet; 00030 mNrWantedClusters = nrWantedClusters; 00031 mMinElemsInCluster = minElemsInCluster; 00032 } 00033 00034 int 00035 GetPixelFeatureSet() const 00036 { 00037 return mPixelFeatureSet; 00038 } 00039 00040 int 00041 GetRegionFeatureSet() const 00042 { 00043 return mRegionFeatureSet; 00044 } 00045 00046 // interface to derived classes 00047 00049 virtual String 00050 GetClusterType() const = 0; 00051 00053 virtual String 00054 GetClusterVal() const = 0; 00055 00057 virtual void 00058 InitClusterVec(FeatureTable* clusters, String mode, int val) = 0; 00059 00061 virtual void 00062 Cluster(FeatureTable* tab) = 0; 00063 00065 virtual bool 00066 HadEnough() = 0; 00067 00071 virtual void 00072 FinishBuffer() = 0; 00073 00075 virtual void 00076 Clusters2FeatureTable(FeatureTable* table) = 0; 00077 00079 virtual void 00080 PrintStatus() = 0; 00081 00082 protected: 00083 00084 int mPixelFeatureSet; // index of pixel feature that is being clustered 00085 int mRegionFeatureSet; // index of region feature that is being clustered 00086 int mNrWantedClusters; // nr. of clusters to be delivered 00087 int mMinElemsInCluster; // minimal nr. of points required in a cluster 00088 00089 }; 00090 00091 } // namespace Feature 00092 } // namespace Core 00093 } // namespace Impala 00094 00095 #endif