diff --git a/src/main/java/inra/ijpb/plugins/KillBordersPlugin.java b/src/main/java/inra/ijpb/plugins/KillBordersPlugin.java index 575188ef..ea0b08a7 100644 --- a/src/main/java/inra/ijpb/plugins/KillBordersPlugin.java +++ b/src/main/java/inra/ijpb/plugins/KillBordersPlugin.java @@ -66,9 +66,13 @@ public void run(String arg0) } long elapsedTime = System.currentTimeMillis() - t0; + // copy image settings resultPlus.copyScale(imagePlus); + resultPlus.setDisplayRange(imagePlus.getDisplayRangeMin(), imagePlus.getDisplayRangeMax()); + resultPlus.setLut(imagePlus.getProcessor().getLut()); + + // display with same settings resultPlus.show(); - if (imagePlus.getStackSize() > 1) { resultPlus.setSlice(imagePlus.getCurrentSlice());