From 909f60d3659382f77bd3ae3a3c8758c82d4b991f Mon Sep 17 00:00:00 2001 From: Uwe Schmidt Date: Wed, 8 Apr 2020 00:33:16 +0200 Subject: [PATCH] Add contributor, fix small bug --- pom.xml | 6 ++++++ src/main/java/de/csbdresden/stardist/StarDist2D.java | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b0dfa83..1ba36b0 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,11 @@ https://github.com/romainGuiet developer + + Robert Haase + https://github.com/haesleinhuepf + developer + @@ -144,6 +149,7 @@ csbdeep 0.3.5-SNAPSHOT + com.google.code.gson gson diff --git a/src/main/java/de/csbdresden/stardist/StarDist2D.java b/src/main/java/de/csbdresden/stardist/StarDist2D.java index 8c490d3..233dfac 100644 --- a/src/main/java/de/csbdresden/stardist/StarDist2D.java +++ b/src/main/java/de/csbdresden/stardist/StarDist2D.java @@ -367,6 +367,9 @@ private boolean checkInputs() { if (!( modelChoice.equals(Opt.MODEL_FILE) || modelChoice.equals(Opt.MODEL_URL) || MODELS.containsKey(modelChoice) )) return showError(String.format("Unsupported Model \"%s\".", modelChoice)); + if (!(roiPosition.equals(Opt.ROI_POSITION_AUTO) || roiPosition.equals(Opt.ROI_POSITION_STACK) || roiPosition.equals(Opt.ROI_POSITION_HYPERSTACK))) + return showError(String.format("%s must be one of {\"%s\", \"%s\", \"%s\"}.", Opt.ROI_POSITION, Opt.ROI_POSITION_AUTO, Opt.ROI_POSITION_STACK, Opt.ROI_POSITION_HYPERSTACK)); + return true; } @@ -385,8 +388,9 @@ public static void main(final String... args) throws Exception { final ImageJ ij = new ImageJ(); ij.launch(args); -// Dataset input = ij.scifio().datasetIO().open(StarDist2D.class.getClassLoader().getResource("yeast_timelapse.tif").getFile()); Dataset input = ij.scifio().datasetIO().open(StarDist2D.class.getClassLoader().getResource("yeast_crop.tif").getFile()); +// Dataset input = ij.scifio().datasetIO().open(StarDist2D.class.getClassLoader().getResource("yeast_timelapse.tif").getFile()); +// Dataset input = ij.scifio().datasetIO().open(StarDist2D.class.getClassLoader().getResource("patho_hyperstack.tif").getFile()); ij.ui().show(input); // Recorder recorder = new Recorder();