Inbal S.L. Wrote:
-------------------------------------------------------
> Hello.
> I wanted to create a time series data for a
> selected set of voxels.
> I have the PRI coordinates for a list of the
> voxels I am interested at, and a time series data
> vector for each one of those voxels.
You can use AFNI_XYZcontinuous2Index and it's inverse, AFNI_Index2XYZcontinuous, to go between coordinates and voxel indices. Make sure you specify the proper coordinate system for these functions.
> How can I create a BRIK file to be loaded as an
> overlay in AFNI, that will contain the time series
> data of the voxels I have in my list?
If you're just interested in the time series, you can load these from the BRIK directly.
Assuming you got N linear indices in a vector idxs (i.e. use IndexDim=1 in AFNI_XYZcontinuous2Index), you can use Brikload with
opt.Format='vector'
opt.Voxels=idxs
and the result should be N x T, if there are T subbriks.
(this requires a somewhat recent version of the matlab toolbox).
hope this helps.
Nick