Search in sources :

Example 1 with SegmenterListModel

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

Example 2 with 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);
}
Also used : Context(org.scijava.Context) DefaultSegmentationModel(sc.fiji.labkit.ui.models.DefaultSegmentationModel) DatasetInputImage(sc.fiji.labkit.ui.inputimage.DatasetInputImage) SegmenterListModel(sc.fiji.labkit.ui.models.SegmenterListModel)

Example 3 with SegmenterListModel

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);
}
Also used : SingletonContext(sc.fiji.labkit.pixel_classification.utils.SingletonContext) Context(org.scijava.Context) ExtensionPoints(sc.fiji.labkit.ui.models.ExtensionPoints) SegmenterListModel(sc.fiji.labkit.ui.models.SegmenterListModel)

Aggregations

SegmenterListModel (sc.fiji.labkit.ui.models.SegmenterListModel)3 Context (org.scijava.Context)2 ExtensionPoints (sc.fiji.labkit.ui.models.ExtensionPoints)2 SingletonContext (sc.fiji.labkit.pixel_classification.utils.SingletonContext)1 DatasetInputImage (sc.fiji.labkit.ui.inputimage.DatasetInputImage)1 DefaultSegmentationModel (sc.fiji.labkit.ui.models.DefaultSegmentationModel)1 SegmentationItem (sc.fiji.labkit.ui.models.SegmentationItem)1