use of sc.fiji.labkit.ui.models.SegmentationResultsModel in project labkit-ui by juglab.
the class PredictionLayer method classifierChanged.
private void classifierChanged() {
SegmentationResultsModel results = model.get();
registerListener(results);
boolean hasResult = results != null && results.hasResults();
if (hasResult)
showable.set(BdvShowable.wrap(coloredVolatileView(results), transformation));
else
showable.set(null);
listeners.notifyListeners(null);
}
use of sc.fiji.labkit.ui.models.SegmentationResultsModel in project labkit-ui by juglab.
the class SegmentationAsLabelAction method addSegmentationAsLabel.
private void addSegmentationAsLabel(SegmentationItem segmentationItem) {
SegmentationResultsModel selectedResults = segmentationItem.results(labelingModel);
List<String> labels = selectedResults.labels();
String selected = (String) JOptionPane.showInputDialog(null, "Select label to be added", "Add Segmentation as Labels ...", JOptionPane.PLAIN_MESSAGE, null, labels.toArray(), labels.get(labels.size() - 1));
int index = labels.indexOf(selected);
if (index < 0)
return;
addLabel(selected, index, selectedResults.segmentation());
}
Aggregations