Search in sources :

Example 1 with SegmentationResultsModel

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);
}
Also used : SegmentationResultsModel(sc.fiji.labkit.ui.models.SegmentationResultsModel)

Example 2 with SegmentationResultsModel

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());
}
Also used : SegmentationResultsModel(sc.fiji.labkit.ui.models.SegmentationResultsModel)

Aggregations

SegmentationResultsModel (sc.fiji.labkit.ui.models.SegmentationResultsModel)2