use of sc.fiji.labkit.ui.models.DefaultSegmentationModel in project labkit-ui by juglab.
the class LabkitFrame method showForImage.
public static LabkitFrame showForImage(Context context, final InputImage inputImage) {
if (context == null)
context = SingletonContext.getInstance();
final SegmentationModel model = new DefaultSegmentationModel(context, inputImage);
model.imageLabelingModel().labeling().set(InitialLabeling.initialLabeling(context, inputImage));
return show(model, inputImage.imageForSegmentation().getName());
}
use of sc.fiji.labkit.ui.models.DefaultSegmentationModel in project labkit-ui by juglab.
the class CustomizedSegmentationComponentDemo method main.
public static void main(String... args) {
JFrame frame = new JFrame("Labkit UI Customization Demo");
ImgPlus<?> image = VirtualStackAdapter.wrap(new ImagePlus("https://imagej.nih.gov/ij/images/t1-head.zip"));
DefaultSegmentationModel segmentationModel = new DefaultSegmentationModel(new Context(), new DatasetInputImage(image));
CustomizedSegmentationComponentDemo component = new CustomizedSegmentationComponentDemo(frame, segmentationModel);
component.autoContrast();
frame.setJMenuBar(component.getMenuBar());
frame.add(component);
frame.setSize(800, 500);
frame.setVisible(true);
}
Aggregations