extract the time course

Submitted by banyu on

Dear developers and users,

I would like to extract each subject's time course for each voxel in a predefined mask,  but I have no idea how to do it.

Any suggestion?

I would be grateful for a feedback on this approach.

Best regards,

Feng

 

YAN Chao-Gan

Fri, 10/18/2013 - 13:30

Hi Feng,
You can do the following:

[AllVolume,VoxelSize,theImgFileList, Header] =rest_to4d(DataFile);
[nDim1 nDim2 nDim3 nDimTimePoints]=size(AllVolume);
[MaskData,MaskVox,MaskHead]=rest_readfile(MaskFile);

% Convert into 2D
AllVolume=reshape(AllVolume,[],nDimTimePoints)';
MaskDataOneDim=reshape(MaskData,1,[]);

TCYouWanted=AllVolume(:,find(MaskDataOneDim));


TCYouWanted is a 2D matrix you want. You can see similar codes in: https://github.com/Chaogan-Yan/DPARSF/blob/master/Subfunctions/y_DegreeCentrality.m

Best,

Chao-Gan



On Fri, Oct 18, 2013 at 3:08 AM, The R-fMRI Network <rfmri.org@gmail.com> wrote:
[To post a comment, please reply to rfmri.org@gmail.com ABOVE this line]

By 周峰 (banyu)

Dear developers and users,

I would like to extract each subject's time course for each voxel in a predefined mask,  but I have no idea how to do it.

Any suggestion?

I would be grateful for a feedback on this approach.

Best regards,

Feng

 


Online version of this post: http://rfmri.org/content/extract-time-course