Yes, that should work. Make sure to specify --noreshape and to use mgh format as the output. Then in matlab you can run

f = MRIread('yourfile.mgh');

The pixel data will be in f.vol

doug

Bruce Fischl wrote:

Hi Maryam,

not sure if Doug is still reading email, but he would be the one to ask. I think you should be able to use mri_vol2surf to sample a volume timeseries into an NxT (nvertices x timepoints) "volume" in .mgz format. You could then read the surfaces into matlab, and the indices into the surface would give you x,y,z and the indices into the NxT "volume" would give you the fMRI values.

cheers,
Bruce


On Tue, 20 Nov 2007, Maryam Vaziri wrote:

Hi Cameron,

I want to run a classification analysis on my functional data from all of the cortex using matlab. It is not something complicated but the very fist step is to run a PCA on all the data from all the voxels in the cortex. I am trying to reduce my data set as much as I can as the computation will b every extensive if I have huge files and Hardware-wise impossible to do. So vertex based data the way it is in the surfaces is very big for my purpose. I need volume data. I read my functional volumes to matlab using MRIread and reading the bhdr files in my BOLD directory (I can also read it using fmri_ldbvolume). But the problem with these files is that It is still too big. For reducing it I have to get rid of everything but the cortex. The problem is that I want the whole cortex data, and thus I cannot read just a label. I also need volume data so I cannot read a surface. Moreover I need to reduce my data set so I cannot read the whole brain volume. I also need all the time points so I cannot read the w files from a contrast analysis. What I finaly want is a N*T*4 matrix, containing x,y,z coordinates and values of all (N) voxels in the cortex, in all(T) time points.

I figured that if I can somehow relate the voxels in the ribbon.mgz to the functional volumes I will be all set. But is this impossible? What does the contents of register.dat mean? Is there anyway that I can relate the two files using register.dat?
Or maybe somebody has a totally different suggestion?

Bests,
Maryam.

On Nov 20, 2007, at 10:32 AM, Cameron Ellis wrote:

Hi Maryam,
What type of analysis are you trying to do? It sounds like you are trying
to do something unique and not simply follow the fs-fast surface based
analysis. Were you able to read the entire functional volume into matlab? It will be hard to limit this matrix to "active" voxels (not 0) because it
is unlikely that any voxel in your functional will have a value of 0. I
think you should be able to restrict the functional volume to the cortex
but I am not sure how to do this. The register.dat file contains the
matrix used to relate the anatomic volume to the functional volume but I
am also unsure if how to apply this to the ribbon.mgz or the raw
functional data and I am not sure that this is the best way to obtain the information you want. I wish I could be more help. I am just not sure of
how that data is organized when it is read into matlab (according to
scanner coordinates/tal coordinates etc.) Are you sure there is not a way
to do what you would like to do without reading the data into matlab?
Cameron

Hi again,

I found a file named ?h.ribbon.mgz among the structural files which
contains the cortical part of the volume that I want. But I do not
know how to relate this structural volume to my functional volumes to
get only cortical voxels from my functional volumes. I think that I
should use the file register.dat, but I do not know what does the
information inside the register.dat mean. What I basically want to do
is to read voxels in my functional data, which their corresponding
voxel in the ribbon.mgz is not zero and get rid of the voxels that
their corresponding voxels in ribbon,mgz is zero.

Bests,
Maryam.

On Nov 16, 2007, at 12:28 AM, Cameron Ellis wrote:

Hi Maryam,
do you know about the matlab toolbox for freesurfer? it is located at:
$FREESURFER_HOME/matlab. all of these scripts are intended to read
fmri
data into matlab. I think the script you are looking for is
MRIread.m or
maybe load_analyze.m, load_cor.m or load_dicom.m I think you may be
able
to load a surface volume using cortical_labeling_tabel.m I actually
haven't used these so i could be completely off the mark that these
would
be useful. Hope this helps.
Cameron

Hi,

I am a newbie in using freesurfer so sorry if this is a very trivial
question. I want to load my fMRI data into matlab. I want to make a
matrix containing coordinates and values of all the voxels in the
brain at all timepoints. I also only want the voxels that are in the
gray matter and not the voxels that are in the white matter or
outside the brain. Where can I get this data and how can I load it to
matlab? I have already managed to import all the voxels using MRI-
ldbvolume, but this includes white matter and skull. How can I get
rid of the rest of the brain and just get the surface?

Bests,
Maryam.

_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer






_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer



--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 Fax: 617-726-7422

In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to