46 double clustering_sigma_min,
47 double clustering_sigma_ratio,
48 int32_t clustering_number_max,
49 double clustering_size_min,
50 double clustering_threshold,
51 int32_t clustering_new_policy );
56 template <
typename T> int32_t
58 const std::string & inputGraph,
59 const std::string & fileOutMeasure,
60 std::vector<carto::Object > & classDesc,
61 std::vector<std::vector<std::vector<double> > > & classVectors );
66 std::vector<carto::Object > & classDesc,
67 std::vector<std::vector<std::vector<double> > > & classVectors );
70 virtual void saveModel( std::string & fileOutData );
77 double det(carto::VolumeRef<double > M, carto::VolumeRef<double > & I);
79 double distance( std::vector<double> aa, std::vector<double> bb );
81 int32_t HistogramCandidateCentroid(
const std::vector<std::vector<double> > & mv,
82 const std::vector<std::pair<double, int> > & vcandidates,
83 const int32_t bins = 256 );
89 std::vector<std::vector<double> >
90 Clustering (
const std::vector<std::vector<double> > &mv,
91 double threshold,
double sigmamin,
92 double sigmaratio,
int nbclustermax,
93 int newclusterpolicy,
double clustersizemin,
94 carto::VolumeRef< int > &C );
102 int32_t _nbclustermax;
103 double _clustersizemin;
105 int32_t _newclusterpolicy;
107 carto::Object _learningmodel;
125 template <
typename T>
126 int32_t
classify( carto::VolumeRef<T> &image,
127 const std::vector<int32_t> &labels,
128 const std::vector<std::string> &classesorder,
129 const std::string &maskFile =
"",
130 const bool keepClasses =
true,
131 const bool keepProba =
false,
132 const bool keepDensity =
false);
137 int32_t
writeResults(
const std::string &outputFile =
"",
138 const std::string &outputProbaFile =
"",
139 const std::string &outputDensityFile =
"");
142 template <
typename T>
143 int32_t
classify(
const Point3dl &t, carto::VolumeRef<T> &image );
152 void InitializeClasses(
const std::vector<carto::Object > &c );
154 double Density(
const int32_t ic,
const std::vector<double> &w );
156 int32_t Classifier(
const std::vector<double> &w,
158 const bool storeproba =
false,
159 const bool storedensity =
false,
160 const bool display =
false );
163 std::string _pixelmeasure;
164 int32_t _measuresize;
168 std::vector<double> _prior;
171 carto::VolumeRef<double> _v;
172 std::vector<std::vector<carto::VolumeRef<double> > > _modelcov;
173 carto::rc_ptr<std::vector<double> > _mu;
174 carto::VolumeRef<double> _Dimage;
175 carto::VolumeRef<double> _Pimage;
176 carto::VolumeRef<int16_t> _Cimage;
178 carto::Object _learningmodel;
179 std::vector<carto::Object > _classdesc;
180 std::vector<std::vector<carto::Object> > _density;