Dear Maaly,
If you really want all the raw data (they just had a scaling applied to
them), you can do this:
load SPM.mat
D = spm_read_vols(SPM.xY.VY);
or
load SPM.mat
D = spm_summarise(SPM.xY.VY,'all');
If you only wanted to read the data at a given location (or within a
sphere around that location), you can still use spm_summarise like this:
XYZmm = [57 -22 11]';
D = spm_summarise(SPM.xY.VY,XYZmm);
If you only want times series from voxels within the analysis mask, use
this:
D = spm_summarise(SPM.xY.VY,'mask.nii');
Depending on what you want to do with the time series, you might still
want to high-pass filter the data and regress out confounds, have a look
at spm_regions.m to see how this is performed (this is the underlying
function for the VOI time-series extraction from the interface).
Best regards,
Guillaume.
On 09/12/16 23:07, Maaly Nassar wrote:
> Dear All!
>
> How can I extract the RAW time series of some ROIs from task-based spm.mat? Here I don't want to extract the time series from a specific contrast. I want to extract the original time series before being adjusted by contrasts. So should I treat my task-based spm.mat as the resting state spm.mat? and follow the steps described in spm manual in the dynamic causal modelling of resting state
>
> also I'd like to know how ROIs time series are adjusted by the contrasts. For instance, in spm's manual auditory data example, if I extracted the time series from [57 -22 11] in listening>rest contrast, will it be the same as in listening>0? No, they are different so how was the time series in [57 -22 11] estimated?
>
> one more question, did any one manage to extract the time series of all brain voxels? and is there a template for all brain ROIs?
>
>
> Thanks,
>
> maaly
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|