Home > phiwave > @slover > add_spm.m

add_spm

PURPOSE ^

Adds SPM blobs as new img to object, split effect, 'hot' colormap

SYNOPSIS ^

function obj = add_spm(obj)

DESCRIPTION ^

 Adds 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 $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function obj = add_spm(obj)
0002 % Adds SPM blobs as new img to object, split effect, 'hot' colormap
0003 % FORMAT obj = add_spm(obj)
0004 %
0005 % SPM results are fetched from the workspace
0006 %
0007 % $Id: add_spm.m,v 1.1 2005/04/20 15:05:36 matthewbrett Exp $
0008   
0009 [XYZ Z M] = pr_get_spm_results;
0010 if isempty(XYZ)
0011   warning('No SPM results to add');
0012   return
0013 end
0014 
0015 newimg = length(obj.img)+1;
0016 obj.img(newimg).vol = pr_blobs2vol(XYZ, Z, M);
0017 obj.img(newimg).type = 'split';
0018 obj.img(newimg).prop = 1;
0019 obj.img(newimg).cmap = hot;
0020 obj.img(newimg).range = [0 max(Z)];
0021 obj.cbar = [obj.cbar newimg];

Generated on Wed 06-Jul-2005 18:07:21 by m2html © 2003