Skip to content

Commit

Permalink
Output new-lines when printing stuff to the command window.
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Nov 19, 2013
1 parent f37bdb5 commit 2b7d58a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions fileFilters/nifti/niftiCheckQto.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
% sanity-check ni.dim
sz = size(ni.data);
if(any(ni.dim(1:3)~=sz(1:3)))
fprintf('[%s] NIFTI volume dim wrong- setting it to the actual data size.',mfilename);
fprintf('[%s] NIFTI volume dim wrong- setting it to the actual data size.\n',mfilename);
ni.dim(1:3) = sz(1:3);
end
end

if(ni.qform_code==0 && ni.sform_code~=0)
fprintf('[%s] ni.qform_code is zero and sform_code ~=0. Setting ni.qto_* from ni.sto_*...',mfilename);
fprintf('[%s] ni.qform_code is zero and sform_code ~=0. Setting ni.qto_* from ni.sto_*...\n',mfilename);
ni = niftiSetQto(ni, ni.sto_xyz);
end

Expand Down
11 changes: 6 additions & 5 deletions mrBOLD/GetSet/Nifti/niftiSet.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
dim = niftiGet(ni,'dim');

if(any(dim(1:3)~=sz(1:3)))
warning('[%s] NIFTI volume dim wrong- setting it to the actual data size.',mfilename);
warning('[%s] NIFTI volume dim wrong- setting it to the actual data size.\n',mfilename);
dim(1:3) = sz(1:3);
ni = niftiSet(ni,'dim',dim);
end

if(ni.qform_code==0 && ni.sform_code~=0)
warning('[%s] ni.qform_code is zero and sform_code ~=0. Setting ni.qto_* from ni.sto_*...',mfilename);
warning('[%s] ni.qform_code is zero and sform_code ~=0. Setting ni.qto_* from ni.sto_*...\n',mfilename);
%ni = niftiSetQto(ni, ni.sto_xyz);
ni = niftiSet(ni,'qto',niftiGet(ni,'sto_xyz'));
end
Expand All @@ -34,9 +34,10 @@
if(any(origin<2)||any(origin>dim(1:3)-2))
[~,r,s,k] = affineDecompose(niftiGet(ni, 'qto_ijk'));
t = ni.dim/2;
warning('[%s] Qto matrix defines an origin very far away from the isocenter.\n',mfilename);
warning('[%s] This implies that the Qto matrix may be bad - please check qto_ijk. An automatic fix will be attempted.\n',mfilename);
warning('[%s] Origin to the image center is at [%2.3f,%2.3f,%2.3f] pix.\n',mfilename,t(1),t(2),t(3));
warning_string = [sprintf('[%s] Qto matrix defines an origin very far away from the isocenter.\n',mfilename),...
sprintf('This implies that the Qto matrix may be bad - please check qto_ijk. An automatic fix will be attempted.\n'),...
sprintf('Origin to the image center is at [%2.3f,%2.3f,%2.3f] pix.\n',t(1),t(2),t(3))];
warning(warning_string);
%ni = niftiSetQto(ni, inv(affineBuild(t,r,s,k)));
ni = niftiSet(ni,'qto',inv(affineBuild(t,r,s,k)));

Expand Down
1 change: 0 additions & 1 deletion mrScripts/anatomy/s_alignInplaneToAnatomical.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
% (if you need help with the shortcut keys:)
% doc defineellipse3d
[~,mn,sd] = defineellipse3d(refpre);
close all
%% 4c Automatic alignment (coarse)
useMI = true; % you need MI if the two volumes have different tissue contrast.
% it's much faster to not use MI.
Expand Down

0 comments on commit 2b7d58a

Please sign in to comment.