use of sc.fiji.labkit.ui.models.Holder in project labkit-ui by juglab.
the class SegmentationAsLabelAction method addLabel.
private void addLabel(String selected, int index, RandomAccessibleInterval<ShortType> segmentation) {
Converter<ShortType, BitType> converter = (in, out) -> out.set(in.get() == index);
RandomAccessibleInterval<BitType> result = Converters.convert(segmentation, converter, new BitType());
Holder<Labeling> labelingHolder = labelingModel.labeling();
addLabel(labelingHolder.get(), "segmented " + selected, result);
labelingHolder.notifier().notifyListeners();
}
Aggregations