-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SVN r6623
- Loading branch information
Showing
20 changed files
with
1,025 additions
and
1,023 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.