From 5c1be9c94b75230e6556098f2555507a934b1ad0 Mon Sep 17 00:00:00 2001 From: Mike Angstadt Date: Mon, 12 Jan 2015 16:41:08 -0500 Subject: [PATCH 1/2] fixed typo in realignment parameters variable when not including motion derivatives --- ConnTool/ConnTool_batch_mc_central.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConnTool/ConnTool_batch_mc_central.m b/ConnTool/ConnTool_batch_mc_central.m index b494f0d3..788e26c4 100644 --- a/ConnTool/ConnTool_batch_mc_central.m +++ b/ConnTool/ConnTool_batch_mc_central.m @@ -193,7 +193,7 @@ if (MotionDeriv) RealignmentParametersQuad = [RealignmentParameters RealignmentParametersDerivR].^2; else - RealignmentParametersQuad = RealignmenParameters.^2; + RealignmentParametersQuad = RealignmentParameters.^2; end parameters.data.run(iRun).MotionParameters = [RealignmentParameters]; From c023aba3d84af4163025da37df92ce4ee4a115ec Mon Sep 17 00:00:00 2001 From: "Robert C. Welsh" Date: Fri, 30 Oct 2015 09:49:38 -0400 Subject: [PATCH 2/2] Fixed small but in Code/SOM_WriteNII.m and merged Joe's fix to the central script --- ConnTool/Code/SOM_WriteNII.m | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ConnTool/Code/SOM_WriteNII.m b/ConnTool/Code/SOM_WriteNII.m index d4d7b547..c03246b8 100644 --- a/ConnTool/Code/SOM_WriteNII.m +++ b/ConnTool/Code/SOM_WriteNII.m @@ -44,7 +44,16 @@ return end -if any(volDIM(1:3)-size(niftiIn.dat(:,:,:,1))) +niiDIM = size(niftiIn.dat(:,:,:,1)); + +% Needed to add this in case the "template" image was also two-dimensional +% Robert Welsh - 2015-10-29 + +if length(niiDIM) < length(volDIM) + niiDIM = [niiDIM 1]; +end + +if any(volDIM(1:3)-niiDIM) SOM_LOG(sprintf('FATAL ERROR : TemplateImage dimension doesn''t match data dimension to be written\n')); return end