



returns voxel values from a memory mapped image - a compiled routine
FORMAT X = spm_sample_vol(V,x,y,z,hold);
V - is a memory mapped image volume
x - matrix of x coordinates {pixels}
y - matrix of y coordinates {pixels}
z - matrix of z coordinates {pixels}
hold - sets the interpolation method for the resampling.
0 Zero-order hold (nearest neighbour).
1 First-order hold (trilinear interpolation).
2->127 Higher order Lagrange (polynomial) interpolation using
different holds (second-order upwards).
-127 - -1 Different orders of sinic_ interpolation.
X - output image
OR [X,dX,dY,dZ] = spm_sample_vol(V,x,y,z,hold);
Similar to above, except that the derivatives in the three orthogonal
directions are also returned.
_______________________________________________________________________
spm_sample_vol will return the voxel values from a memory mapped
volume indicated by V at coordinates x,y,z. Values from coordinates
outside the image are set to zero. x, y and z must be matrices of the
same dimensions
see also spm_slice_vol.m
_______________________________________________________________________
Copyright (C) 2005 Wellcome Department of Imaging Neuroscienic_e


0001 function varargout = nic_spm_sample_vol(varargin) 0002 % returns voxel values from a memory mapped image - a compiled routine 0003 % FORMAT X = spm_sample_vol(V,x,y,z,hold); 0004 % V - is a memory mapped image volume 0005 % x - matrix of x coordinates {pixels} 0006 % y - matrix of y coordinates {pixels} 0007 % z - matrix of z coordinates {pixels} 0008 % hold - sets the interpolation method for the resampling. 0009 % 0 Zero-order hold (nearest neighbour). 0010 % 1 First-order hold (trilinear interpolation). 0011 % 2->127 Higher order Lagrange (polynomial) interpolation using 0012 % different holds (second-order upwards). 0013 % -127 - -1 Different orders of sinic_ interpolation. 0014 % X - output image 0015 % 0016 % OR [X,dX,dY,dZ] = spm_sample_vol(V,x,y,z,hold); 0017 % Similar to above, except that the derivatives in the three orthogonal 0018 % directions are also returned. 0019 %_______________________________________________________________________ 0020 % 0021 % spm_sample_vol will return the voxel values from a memory mapped 0022 % volume indicated by V at coordinates x,y,z. Values from coordinates 0023 % outside the image are set to zero. x, y and z must be matrices of the 0024 % same dimensions 0025 % 0026 % see also spm_slice_vol.m 0027 % 0028 %_______________________________________________________________________ 0029 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscienic_e 0030 0031 % John Ashburner 0032 % $Id: spm_sample_vol.m 112 2005-05-04 18:20:52Z john $ 0033 0034 0035 %-This is merely the help file for the compiled routine 0036 error('spm_sample_vol.c not compiled - see Makefile')