Dear Maaly,
First, my apologies, three of your recent emails have been classified as
spam and I'm only reading them now.
spm_read_vols, spm_get_data, spm_summarise should all let you access the
residual time series. I guess that what is wrong in what you've tried so
far is the content of the XYZ variable: what does it contain and where
does it come from?
V = cellstr(spm_select('FPList',pwd,'^Res\_[0-9]+\.nii$'))';
Y = spm_summarise(V,'mask.nii');
Y is a number of time points x number of voxels within mask matrix.
Best regards,
Guillaume.
On 12/04/17 15:32, Maaly Nassar wrote:
> Dear Guillaume
>
> I got NO zero residuals (Y) with
>
> [Y,xY] = spm_summarise(V,XYZ);
>
> where,
>
> V = cellstr(spm_select('FPList',pwd,'^Res\_[0-9]+\.nii$'))';
> XYZ = [3 x m] double for my ROIs
>
> -------------------------------------------------------------------------------------
>
> I don't know though why spm_get_data() retrieve zero residuals. According to the documentation
>
> [Y] = spm_get_data(V,XYZ,check);
> % V - [1 x n] struct array of file handles (or filename matrix)
> % XYZ - [3 x m] or [4 x m] location matrix (voxel)
> % check - check validity of input parameters [default: true]
> % Y - (n x m) double values
>
> so, I thought that if I did
>
> V = cellstr(spm_select('FPList',pwd,'^Res\_[0-9]+\.nii$'))';
> XYZ = my m ROIs as [3 x m] double
> [Y] = spm_get_data(V,XYZ);
>
> I should get the residuals (Y), but instead, I got zeros.
>
> -------------------------------------------------------------------------------------
>
> Thanks,
>
> Maaly
>
>
>
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|