From fcbe28ce6c16b2aa71e424d5e7911a76890e6703 Mon Sep 17 00:00:00 2001
From: William Stonewall Monroe <wsmonroe@login001.cm.cluster>
Date: Wed, 19 Sep 2018 10:48:29 -0500
Subject: [PATCH] Removed visual progress bar and increased number of threads
 used by parpool

the visual progress bar causes the code to crash when run from the command line
---
 NODDI_toolbox_v1.01/fitting/batch_fitting.m | 18 +++++++++---------
 PPMI_NODDI.m                                |  3 ++-
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/NODDI_toolbox_v1.01/fitting/batch_fitting.m b/NODDI_toolbox_v1.01/fitting/batch_fitting.m
index 5806ea9..bc67523 100644
--- a/NODDI_toolbox_v1.01/fitting/batch_fitting.m
+++ b/NODDI_toolbox_v1.01/fitting/batch_fitting.m
@@ -66,12 +66,12 @@ if current_split_start == 1
 end
 
 % set up the PARFOR Progress Monitor
-[mypath myname myext] = fileparts(mfilename('fullpath'));
-mypath = [mypath '/../ParforProgMonv2/java'];
-pctRunOnAll(['javaaddpath '  mypath]);
+%[mypath myname myext] = fileparts(mfilename('fullpath'));
+%mypath = [mypath '/../ParforProgMonv2/java'];
+%pctRunOnAll(['javaaddpath '  mypath]);
 progressStepSize = 100;
-ppm = ParforProgMon(['Fitting ' roifile, ' : '], numOfVoxels-current_split_start+1,...
-                    progressStepSize, 400, 80);
+%ppm = ParforProgMon(['Fitting ' roifile, ' : '], numOfVoxels-current_split_start+1,...
+%                    progressStepSize, 400, 80);
 
 tic
 
@@ -99,9 +99,9 @@ for split_start=current_split_start:progressStepSize:numOfVoxels
         end
         
         % report to the progress monitor
-        if mod(i, progressStepSize)==0
-            ppm.increment();
-        end
+%         if mod(i, progressStepSize)==0
+%             ppm.increment();
+%         end
         
     end
     
@@ -116,7 +116,7 @@ end
 
 toc
 
-ppm.delete();
+% ppm.delete();
 
 % save the fitted parameters
 if model.noOfStages == 2
diff --git a/PPMI_NODDI.m b/PPMI_NODDI.m
index fce12c1..1a8544d 100644
--- a/PPMI_NODDI.m
+++ b/PPMI_NODDI.m
@@ -45,7 +45,8 @@ CreateROI(strcat('/data/project/dti/For_William/rotateDWIv2/finalrotatedDWIv2/',
 %CreateROI('/data/project/dti/For_William/rotateDWIv2/finalrotatedDWIv2/3111.DWI.rotat.med.nii','/data/project/dti/For_William/rotateDWIv2/brainMasks/3111.brainmask.nii','NODDIroi1.mat')
 protocol = FSL2Protocol(strcat('/data/project/dti/For_William/rotateDWIv2/BMTXT/',int2str(PatientNumber(i)),'.rotatetwo.bval'),strcat('/data/project/dti/For_William/rotateDWIv2/BMTXT/',int2str(PatientNumber(i)),'.rotatetwo.bvec'))
 noddi = MakeModel('WatsonSHStickTortIsoV_B0');
-batch_fitting(strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.NODDIroi.mat'),protocol,noddi,strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.FittedParams.mat'),8);
+batch_fitting(strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.NODDIroi.mat'),protocol,noddi,strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.FittedParams.mat'),24);
 SaveParamsAsNIfTI(strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.FittedParams.mat'),strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.NODDIroi.mat'),strcat('/data/project/dti/For_William/rotateDWIv2/brainMasks/',int2str(PatientNumber(i)),'.brainmask.nii'),strcat('/data/project/dti/For_William/rotateDWIv2/FreeWaterResults_WB/',int2str(PatientNumber(i)),'.noddi'))
 
+exit;
 end
-- 
GitLab