From fc38088437bb9d18e91319788e29119d8cbf87b9 Mon Sep 17 00:00:00 2001 From: Jan Brocher Date: Sun, 20 Feb 2022 17:51:00 +0100 Subject: [PATCH] bugfix for not displaying output image when used in macros --- .../gui/BV_VoronoiThresholdLabelingGUI.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/BioVoxxel_3D_Box/src/main/java/de/biovoxxel/bv3dbox/gui/BV_VoronoiThresholdLabelingGUI.java b/BioVoxxel_3D_Box/src/main/java/de/biovoxxel/bv3dbox/gui/BV_VoronoiThresholdLabelingGUI.java index 76c812f..15936eb 100644 --- a/BioVoxxel_3D_Box/src/main/java/de/biovoxxel/bv3dbox/gui/BV_VoronoiThresholdLabelingGUI.java +++ b/BioVoxxel_3D_Box/src/main/java/de/biovoxxel/bv3dbox/gui/BV_VoronoiThresholdLabelingGUI.java @@ -107,18 +107,23 @@ public class BV_VoronoiThresholdLabelingGUI extends DynamicCommand { public void run() { - + if (inputImagePlus.getRoi() != null && applyOnCompleteImage) { + bvvtl.getOutputImage().close(); inputImagePlus.killRoi(); setupImage(); processImage(); - bvvtl.getInputImageAsClearClBuffer().close(); - bvvtl.getCurrentCLIJ2Instance().close(); + } else { - bvvtl.getInputImageAsClearClBuffer().close(); - bvvtl.getCurrentCLIJ2Instance().close(); + + setupImage(); + processImage(); + } + + bvvtl.getInputImageAsClearClBuffer().close(); + bvvtl.getCurrentCLIJ2Instance().close(); }