Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Modules/ImageProcessor/GT2005ImageProcessor/GT2005Clusterliste.h

Go to the documentation of this file.

    00001 #ifndef GT2005CLUSTER_H
    00002 #define GT2005CLUSTER_H
    00003
    00004 #include <list>
    00005 #include "GT2005Cluster.h"
    00006
    00007 class GT2005Clusterliste
    00008 {
    00009 private:
    00010   //a list that contains the cluster
    00011   std::list<GT2005Cluster> clist;
    00012
    00013   //two list that contains navigation-information,
    00014   //vNavi is a pointer-list that returns the cluster sort by xmin (left border of the bounding-box of the cluster)
    00015   //hNavi is a pointer-list that returns the cluster sort by ymin (top border of the bounding-box of the cluster)
    00016   std::list<std::list<GT2005Cluster>::iterator> vNavi;
    00017   std::list<std::list<GT2005Cluster>::iterator> hNavi;
    00018
    00019   //list of mid-points.
    00020   std::list<Vector2<double> > midlist;
    00021
    00022   //iterator to run through the clusterlist clist
    00023   std::list<GT2005Cluster>::iterator cIter;
    00024
    00025
    00026   //iterators to run through the navigation-information list vNavi, hNavi
    00027   std::list<std::list<GT2005Cluster>::iterator>::iterator vhIter;
    00028     //std::list<std::list<Cluster>::iterator>::iterator vhIter2;
    00029
    00030   //iterator to run through midlist
    00031   std::list<Vector2<double> >::iterator mIter;
    00032
    00033   //variable used to find the position for new elements in vNavi and hNavi
    00034   bool posGefunden;
    00035
    00036
    00037
    00038 public:
    00039   GT2005Clusterliste();
    00040
    00041   /*a method that add a cluster to the clusterlist and updates the navigation information in vNavi/hNavi.
    00042   * if v equals to true, the direction of scanning is vertical and the iterator i gives the position of the new cluster
    00043   * in vNavi.
    00044   * if v equals to false, the direction of scanning is horizontal and the iterator i gives the position of the new
    00045   * cluster in hNavi.
    00046   */
    00047   void addCluster(GT2005Cluster c, std::list<std::list<GT2005Cluster>::iterator>::iterator i, bool v);
    00048
    00049   //a method that delete all clusters and navigation information
    00050   void deleteAll();
    00051
    00052   //this method is used in clustering. rc is a iterator that points on the element of clist that contains the cluster
    00053   //which should be removed
    00054   void removeCluster(std::list<GT2005Cluster>::iterator rc);
    00055
    00056   //return of a list,which stores the midpoints of the cluster
    00057   std::list<Vector2<double> > getMidpoints();
    00058
    00059   //return of the iterator that points at the first element of clist
    00060   std::list<GT2005Cluster>::iterator getCListBegin();
    00061
    00062   //return of the iterator that points at the after last element of clist
    00063   std::list<GT2005Cluster>::iterator getCListEnd();
    00064
    00065   //return of the iterator that points at the first element of vNavi
    00066   std::list<std::list<GT2005Cluster>::iterator>::iterator getVNaviBegin();
    00067
    00068   //return of the iterator that points at the after last element of vNavi
    00069   std::list<std::list<GT2005Cluster>::iterator>::iterator getVNaviEnd();
    00070
    00071   //return of the iterator that points at the first element of hNavi
    00072   std::list<std::list<GT2005Cluster>::iterator>::iterator getHNaviBegin();
    00073
    00074   //return of the iterator that points at the after last element of hNavi
    00075   std::list<std::list<GT2005Cluster>::iterator>::iterator getHNaviEnd();
    00076
    00077   //returns true, if clist is empty
    00078   bool getEmpty();
    00079
    00080 };
    00081
    00082
    00083 #endif
    00084