Submitted by banyu on Fri, 10/18/2013 - 07:08 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 http://rfmri.org/node/1142 http://rfmri.org/node/1142 也许这个是答案? Log in or register to post comments Re: [RFMRI] extract the time 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 2DAllVolume=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-GanOn 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 Mail comment ID: http://rfmri.org/mailcomment/redirect/%3C31.1694.0.1382080136.13ded7193632ce80bf3faf9bd21da0dd%40www.rfmri.org%3E Log in or register to post comments Hi Chao-Gan, Hi Chao-Gan,Thanks for your reply, and that really helps.All the bests!Feng Log in or register to post comments Forums DPABI/DPABISurf/DPARSF Log in or register to post comments
Re: [RFMRI] extract the time 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 2DAllVolume=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-GanOn 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 Mail comment ID: http://rfmri.org/mailcomment/redirect/%3C31.1694.0.1382080136.13ded7193632ce80bf3faf9bd21da0dd%40www.rfmri.org%3E Log in or register to post comments Hi Chao-Gan, Hi Chao-Gan,Thanks for your reply, and that really helps.All the bests!Feng Log in or register to post comments Forums DPABI/DPABISurf/DPARSF Log in or register to post comments
Hi Chao-Gan, Hi Chao-Gan,Thanks for your reply, and that really helps.All the bests!Feng Log in or register to post comments
http://rfmri.org/node/1142
http://rfmri.org/node/1142 也许这个是答案?
Re: [RFMRI] extract the time
AllVolume=reshape(AllVolume,[],nDimTimePoints)';
MaskDataOneDim=reshape(MaskData,1,[]);
TCYouWanted=AllVolume(:,find(MaskDataOneDim));