use of sc.fiji.labkit.ui.models.SegmenterListModel in project labkit-ui by juglab.
the class ProjectSegmentationModel method initSegmenterListModel.
private SegmenterListModel initSegmenterListModel(List<String> segmenters) {
SegmenterListModel segmenterListModel = new SegmenterListModel(context, new ExtensionPoints());
segmenterListModel.trainingData().set(new TrainingData());
for (String filename : segmenters) {
SegmentationItem segmentationItem = segmenterListModel.addSegmenter(PixelClassificationPlugin.create());
segmentationItem.openModel(filename);
}
return segmenterListModel;
}
use of sc.fiji.labkit.ui.models.SegmenterListModel in project labkit-ui by juglab.
the class SegmenterPanelDemo method main.
public static void main(String... args) {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
frame.setSize(400, 400);
SegmenterListModel model = new DefaultSegmentationModel(new Context(), new DatasetInputImage(ArrayImgs.unsignedBytes(10, 10))).segmenterList();
final SegmenterPanel segmenterPanel = new SegmenterPanel(model, item -> newMenu(item, model));
frame.add(segmenterPanel);
frame.setVisible(true);
}
use of sc.fiji.labkit.ui.models.SegmenterListModel in project labkit-ui by juglab.
the class AddSegmenterPanel method main.
public static void main(String... args) {
JFrame frame = new JFrame("Select Segmentation Algorithm");
Context context = SingletonContext.getInstance();
SegmenterListModel slm = new SegmenterListModel(context, new ExtensionPoints());
frame.add(new AddSegmenterPanel(slm));
frame.setSize(300, 300);
frame.setVisible(true);
}
Aggregations