diff --git a/src/main/java/net/haesleinhuepf/clijx/incubator/AbstractIncubatorPlugin.java b/src/main/java/net/haesleinhuepf/clijx/incubator/AbstractIncubatorPlugin.java index ce08db3..532c5b5 100644 --- a/src/main/java/net/haesleinhuepf/clijx/incubator/AbstractIncubatorPlugin.java +++ b/src/main/java/net/haesleinhuepf/clijx/incubator/AbstractIncubatorPlugin.java @@ -330,13 +330,6 @@ public void mouseReleased(MouseEvent e) { IJ.run(my_target, "Enhance Contrast", "saturated=0.35"); - - if (this.getClass().getSimpleName().toLowerCase().contains("label")) { - IncubatorUtilities.glasbey(my_target); - } else { - //my_target.setLut(my_source.getProcessor().getLut()); - } - } else { ImagePlus output = result; double min = my_target.getDisplayRangeMin(); @@ -346,8 +339,17 @@ public void mouseReleased(MouseEvent e) { //my_target.setLut(lut[0]); my_target.setDisplayRange(min, max); } - paused = false; IncubatorUtilities.transferCalibration(my_source, my_target); + String name_to_consider = (my_source.getTitle() + " " + my_target.getTitle()).toLowerCase(); + + if (name_to_consider.contains("map") || name_to_consider.contains("mesh") ) { + IncubatorUtilities.fire(my_target); + } else if (name_to_consider.contains("label")) { + IncubatorUtilities.glasbey(my_target); + } else { + //my_target.setLut(my_source.getProcessor().getLut()); + } + paused = false; } protected void handlePopupMenu(MouseEvent e) { diff --git a/src/main/java/net/haesleinhuepf/clijx/incubator/utilities/IncubatorUtilities.java b/src/main/java/net/haesleinhuepf/clijx/incubator/utilities/IncubatorUtilities.java index e27bde9..4e05e1b 100644 --- a/src/main/java/net/haesleinhuepf/clijx/incubator/utilities/IncubatorUtilities.java +++ b/src/main/java/net/haesleinhuepf/clijx/incubator/utilities/IncubatorUtilities.java @@ -114,6 +114,24 @@ public void run() { } } + public static void fire(ImagePlus imp) { + //System.out.println(); + String dir = IJ.getDirectory("imagej"); + if (!dir.contains("null")) { + + new java.util.Timer().schedule( + new java.util.TimerTask() { + @Override + public void run() { + IJ.run(imp, "Green Fire Blue", ""); + imp.resetDisplayRange(); + } + }, + 300 + ); + + } + } public static boolean ignoreEvent = false;