Skip to content
Snippets Groups Projects
Commit 803307c7 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

Merge branch 'train_image_classifier_listview' into 'release-7.1'

Fix listview parameter in TrainImagesClassifier

See merge request orfeotoolbox/otb!699
parents af8db839 7e7cb3e2
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
......@@ -148,7 +148,6 @@ void TrainImagesBase::ShareClassificationParams()
void TrainImagesBase::ConnectClassificationParams()
{
Connect("training.cfield", "polystat.field");
Connect("select.rand", "training.rand");
}
......@@ -264,6 +263,12 @@ void TrainImagesBase::TrainModel(FloatVectorImageListType* imageList, const std:
selectedNames.push_back("value_" + oss.str());
}
GetInternalApplication("training")->SetParameterStringList("feat", selectedNames);
// cfield is not directly connected to sample.vfn (ListView parameter) because the associated vector
// data is not the same (the fields are not the same).
GetInternalApplication("training")->SetParameterStringList("cfield",
{GetChoiceNames("sample.vfn")[GetSelectedItems("sample.vfn").front()]});
ExecuteInternal("training");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment