use of sc.fiji.labkit.ui.labeling.Labeling in project labkit-ui by juglab.
the class BitmapImportExportAction method importLabel.
private void importLabel(Void ignore, String filename) throws IOException {
RandomAccessibleInterval<RealType<?>> image = datasetIOService.open(filename);
Labeling labeling = model.labeling().get();
if (!Intervals.equals(image, labeling))
JOptionPane.showMessageDialog(extensible.dialogParent(), "The resolution of the image does not fit", "Import Label", JOptionPane.ERROR_MESSAGE);
labeling.addLabel("Label \"" + new File(filename).getName() + "\"", toBoolType(image));
model.labeling().notifier().notifyListeners();
}
Aggregations