realpts method - returns 3xN XYZ matrix in mm $Id$
0001 function [pts, vals] = realpts(o,sp) 0002 % realpts method - returns 3xN XYZ matrix in mm 0003 % 0004 % $Id$ 0005 0006 if nargin < 2 0007 error('Need space definition to find voxels'); 0008 end 0009 [pts vals] = voxpts(o, sp); 0010 0011 if ~isempty(pts) 0012 pts = sp.mat * [pts; ones(1, size(pts,2))]; 0013 pts = pts(1:3,:); 0014 end