From 9e0800e5362e161e1c5d9b77785f1c286cb35741 Mon Sep 17 00:00:00 2001 From: dlegland Date: Mon, 22 Jul 2024 19:04:38 +0200 Subject: [PATCH] KillBordersPlugin now keeps display settings --- src/main/java/inra/ijpb/plugins/KillBordersPlugin.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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());