Skip to content

Commit

Permalink
Doc: reformat @slover.
Browse files Browse the repository at this point in the history
SVN r6623
  • Loading branch information
gllmflndn committed Dec 3, 2015
1 parent 81dd069 commit 7757e3d
Show file tree
Hide file tree
Showing 20 changed files with 1,025 additions and 1,023 deletions.
29 changes: 15 additions & 14 deletions @slover/add_blobs.m
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
function obj = add_blobs(obj, xyz, vals, mat, imgno)
% adds SPM blobs to img no 'imgno', as specified in
% Add SPM blobs to img no 'imgno', as specified in
% FORMAT obj = add_blobs(obj, xyz, vals, mat, imgno)
%
% Inputs
% XYZ - 3xN voxel coordinates of N blob values
% vals - N blob intensity values
% mat - 4x4 matrix specifying voxels -> mm
%
% Inputs
% XYZ - 3xN voxel coordinates of N blob values
% vals - N blob intensity values
% mat - 4x4 matrix specifying voxels -> mm
% imgno - slice overlay img number to add to (defaults last in object)
%
% Outputs
% obj - modified object
%
% $Id: add_blobs.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $
% obj - modified object
%__________________________________________________________________________

% Matthew Brett
% $Id: add_blobs.m 6623 2015-12-03 18:38:08Z guillaume $

if nargin < 4
error('Need all of object, xyz, vals, mat');
error('Need all of object, xyz, vals, mat');
end
if nargin < 5
imgno = [];
imgno = [];
end
if isempty(imgno)
imgno = length(obj.img);
imgno = length(obj.img);
end
if ~isempty(xyz)
obj.img(imgno).vol = pr_blobs2vol(xyz,vals,mat);
obj.img(imgno).vol = pr_blobs2vol(xyz,vals,mat);
end

22 changes: 12 additions & 10 deletions @slover/add_matrix.m
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
function obj = add_matrix(obj, mat3d, mat, imgno)
% adds 3d matrix image vol to slice overlay
% FORMAT obj = add_matrix(imgno, mat3d, mat)
% Add 3d matrix image vol to slice overlay
% FORMAT obj = add_matrix(obj, mat3d, mat, imgno)
%
% Inputs
% obj - object
% mat3d - 3D matrix to add as img
% mat - optional 4x4 voxel->world translation
% imgno - optional img no to add to (defaults to last in object)
%
%
% Ouputs
% obj - modified object
%
% $Id: add_matrix.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $
%__________________________________________________________________________

% Matthew Brett
% $Id: add_matrix.m 6623 2015-12-03 18:38:08Z guillaume $

if nargin < 2
return
return
end
if nargin < 3
mat = [];
mat = [];
end
if nargin < 4
imgno = [];
imgno = [];
end
if isempty(imgno)
imgno = length(obj.img);
imgno = length(obj.img);
end
if ~isempty(mat3d)
obj.img(imgno).vol = pr_matrix2vol(mat3d, mat);
obj.img(imgno).vol = pr_matrix2vol(mat3d, mat);
end
16 changes: 9 additions & 7 deletions @slover/add_spm.m
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
function obj = add_spm(obj,xSPM)
% Adds SPM blobs as new img to object, split effect, 'hot' colormap
% Add SPM blobs as new img to object, split effect, 'hot' colormap
% FORMAT obj = add_spm(obj)
%
%
% SPM results are fetched from the workspace
%
% $Id: add_spm.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $

%__________________________________________________________________________

% Matthew Brett
% $Id: add_spm.m 6623 2015-12-03 18:38:08Z guillaume $

if nargin == 2
XYZ = xSPM.XYZ;
Z = xSPM.Z;
Expand All @@ -14,8 +16,8 @@
[XYZ,Z,M] = pr_get_spm_results;
end
if isempty(XYZ)
warning('slover:noSPM', 'No SPM results to add');
return
warning('slover:noSPM', 'No SPM results to add');
return
end

newimg = length(obj.img)+1;
Expand Down
30 changes: 16 additions & 14 deletions @slover/display.m
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
function display(obj)
% display method for slice overlay object
%
% $Id: display.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $

% Display method for slice overlay object
%__________________________________________________________________________

% Matthew Brett
% $Id: display.m 6623 2015-12-03 18:38:08Z guillaume $

X = struct(obj);
src = '[slice overlay object]';
if isequal(get(0,'FormatSpacing'),'compact')
disp([inputname(1) ' =']);
disp(src);
disp(X)
disp([inputname(1) ' =']);
disp(src);
disp(X)
else
disp(' ')
disp([inputname(1) ' =']);
disp(' ');
disp(src);
disp(' ');
disp(X)
end
disp(' ')
disp([inputname(1) ' =']);
disp(' ');
disp(src);
disp(' ');
disp(X)
end
Loading

0 comments on commit 7757e3d

Please sign in to comment.