Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void Impala::Core::Feature::ClusterorFactory::Construct ( std::vector< Clusteror * > &  clusList,
int  imageFeatureSet,
int  regionFeatureSet,
int  nrWantedClusters,
int  nrSamplesAtime,
int  minElemsInCluster,
String  clusteror,
CmdOptions options 
) [inline]

Definition at line 33 of file ClusterorFactory.h.

References Impala::atof(), and ILOG_ERROR.

00036     {
00037         StringList sList(clusteror, ';');
00038         StringListCI it = sList.begin();
00039         String clusType = *it++;
00040         if (clusType == "radius")
00041         {
00042             if (it == sList.end())
00043             {
00044                 ILOG_ERROR("need similarity functor");
00045                 return;
00046             }
00047             String simFtor = *it++;
00048             if (it == sList.end())
00049             {
00050                 ILOG_ERROR("need radius");
00051                 return;
00052             }
00053             double radiusStart = atof(*it++);
00054             double radiusEnd = radiusStart;
00055             if (it != sList.end())
00056                 radiusEnd = atof(*it++);
00057             double radiusStep = 1.0;
00058             if (it != sList.end())
00059                 radiusStep = atof(*it++);
00060             double r = radiusStart;
00061             do
00062             {
00063                 if (simFtor == "histint")
00064                 {
00065                     typedef Core::Vector::HistogramIntersectionFtor<Real64> SimFtorT;
00066                     clusList.push_back
00067                         (new RadiusClusteror<SimFtorT>(imageFeatureSet, 
00068                                                        regionFeatureSet, r,
00069                                                        nrSamplesAtime,
00070                                                        nrWantedClusters,
00071                                                        minElemsInCluster,
00072                                                        SimFtorT()));
00073                 }
00074                 if (simFtor == "weisim")
00075                 {
00076                     typedef Core::Vector::WeibullSimFtor<Real64> SimFtorT;
00077                     clusList.push_back
00078                         (new RadiusClusteror<SimFtorT>(imageFeatureSet, 
00079                                                        regionFeatureSet, r,
00080                                                        nrSamplesAtime,
00081                                                        nrWantedClusters,
00082                                                        minElemsInCluster,
00083                                                        SimFtorT()));
00084                 }
00085                 r += radiusStep;
00086             }
00087             while (r <= radiusEnd);
00088             return;
00089         }
00090         ILOG_ERROR("Unknown clusteror type " << clusType << "!");
00091     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:19:06 2011 for ImpalaSrc by  doxygen 1.5.1