From b35a3407b22b4cb1f0ad56dfad6e561edc3c41f6 Mon Sep 17 00:00:00 2001 From: Laurent Thomas Date: Thu, 18 Jun 2020 15:18:47 +0200 Subject: [PATCH] Fix not setting the roi slice position --- Fiji.app/macros/toolsets/Roi 1-Click Tools.ijm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Fiji.app/macros/toolsets/Roi 1-Click Tools.ijm b/Fiji.app/macros/toolsets/Roi 1-Click Tools.ijm index 576ed3c..b551d46 100644 --- a/Fiji.app/macros/toolsets/Roi 1-Click Tools.ijm +++ b/Fiji.app/macros/toolsets/Roi 1-Click Tools.ijm @@ -63,7 +63,7 @@ function goNextSlice(){ } function roiActions(){ if (addToManager){ - roiManager("Associate", "true"); // associate ROI with slice + roiManager("Associate", "true"); // associate ROI with slice (this does not set the Roi position though) roiManager("Show All with labels"); } } @@ -113,6 +113,7 @@ function getDefaultOptions(){ /* Default actions, in this order: AddToManager, runMeasure, nextSlice, customAction and select None */ // Issue with stack and extra command crop : if NextSlice then crop, wrong function defaultActions(){ + if (nSlices>1) Roi.setPosition(getSliceNumber()); // important otherwise the roi have position None if (addToManager) roiManager("Add"); if (runMeasure) run("Measure");