Skip to content

Commit

Permalink
KillBordersPlugin now keeps display settings
Browse files Browse the repository at this point in the history
  • Loading branch information
dlegland committed Jul 22, 2024
1 parent a31ddfd commit 9e0800e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/inra/ijpb/plugins/KillBordersPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 9e0800e

Please # to comment.