From f9252a33ec5f8ad6483417480788ac9948e26291 Mon Sep 17 00:00:00 2001 From: Jon Clayden Date: Fri, 2 Mar 2018 13:10:50 +0000 Subject: [PATCH] Rescaling threshold regardless of sign --- mrDiffusion/GUI/dtiFiberUI.m | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mrDiffusion/GUI/dtiFiberUI.m b/mrDiffusion/GUI/dtiFiberUI.m index 1c4b5fc3..328b4c05 100755 --- a/mrDiffusion/GUI/dtiFiberUI.m +++ b/mrDiffusion/GUI/dtiFiberUI.m @@ -2054,10 +2054,8 @@ function menuRois_buildFromCurImage_Callback(hObject, eventdata, handles) colors = 'gcbmry'; flags = {'fillHoles'}; if(removeSatellites), flags{end+1} = 'removeSatellites'; end -if(any(thresh<0)) - thresh = (abs(thresh)-valRange(1))./diff(valRange); - fprintf('actual thresh: %0.3f (valRange = [%0.2f,%0.2f])', thresh(1), valRange(1), valRange(2)); -end +thresh = (thresh-valRange(1))./diff(valRange); +fprintf('actual thresh: %0.3f (valRange = [%0.2f,%0.2f])', thresh(1), valRange(1), valRange(2)); for(ii=2:length(thresh)) if(length(thresh)>2) newRoi = dtiNewRoi([baseName '_' num2str(round(thresh(ii-1)*100),'%03d')], colors(mod(ii-2,length(colors))+1));