it is in the 'vol' field
On 03/12/2014 08:54 PM, Xuelong Zhao wrote:
> Hmm, it seems I may have misinterpreted the fields in the matlab 
> structure after using MRIRead
>
> rsn20_surf = MRIread('rsn20_surf.nii')
>
> I thought perhaps the data would be in the 'volsize' field?
>
> rsn20_surf =
>
>        srcbext: ''
>     analyzehdr: []
>           bhdr: []
>            vol: [4-D double]
>       niftihdr: [1x1 struct]
>          fspec: 'rsn20_surf.nii'
>            pwd: '~/rsn_smith09'
>     flip_angle: 0
>             tr: 1000
>             te: 0
>             ti: 0
>       vox2ras0: [4x4 double]
>        volsize: [1 139732 1]
>         height: 1
>          width: 139732
>          depth: 1
>        nframes: 20
>        vox2ras: [4x4 double]
>        nvoxels: 139732
>          xsize: 1
>          ysize: 1
>          zsize: 1
>            x_r: -1
>            x_a: 0
>            x_s: 0
>            y_r: 0
>            y_a: 1
>            y_s: 0
>            z_r: 0
>            z_a: 0
>            z_s: 1
>            c_r: -1
>            c_a: -17
>            c_s: 19
>       vox2ras1: [4x4 double]
>            Mdc: [3x3 double]
>         volres: [1 1 1]
>     tkrvox2ras: [4x4 double]
>
> ------------------------------------------------------------------------
> Date: Wed, 12 Mar 2014 10:55:23 -0400
> From: gr...@nmr.mgh.harvard.edu
> To: andrewz...@live.com.au
> CC: freesurfer@nmr.mgh.harvard.edu
> Subject: Re: [Freesurfer] Resting State Networks on Cortical Surface
>
>
> You would apply it to the column, row, and slice of a voxel. Note that 
> the volume structure is volume(row,col,slice). But I'm not sure why 
> you need to do this. If you read in the ICA maps after running 
> mri_vol2surf, there will be a value for each vertex, no need to do any 
> mapping
>
> doug
>
>
>
> On 3/11/14 7:00 PM, Xuelong Zhao wrote:
>
>     Okay, I think I'm getting close to what I want in the matlab
>     object. I've successfully imported both the pial surface (using
>     read_surf.m) and the ICA components on the surface in mgh format
>     using MRIread.m
>
>     I've had a look at the MRIread.m script and it says I can use
>     vox2ras1 to convert column, row, and slice to XYZ coordinates.
>     Which field of the matlab structure should I apply this to? I"m
>     guessing its voxels but wanted to make sure, and also I'd have to
>     do this for each individual frame? Thanks.
>
>     ------------------------------------------------------------------------
>     Date: Mon, 10 Mar 2014 23:54:18 -0400
>     From: gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>     To: andrewz...@live.com.au <mailto:andrewz...@live.com.au>
>     CC: freesurfer@nmr.mgh.harvard.edu
>     <mailto:freesurfer@nmr.mgh.harvard.edu>
>     Subject: Re: [Freesurfer] Resting State Networks on Cortical Surface
>
>
>     I don't know of anything that will do this (or what a single
>     object would mean in this case). If you have the overlay in a
>     volume format (eg, mgz), you can use MRIread.m. This gives you a
>     value for each vertex, not face, so you'd have to write something
>     to assign the value to a face.
>
>     doug
>
>
>
>     On 3/10/14 11:27 PM, Xuelong Zhao wrote:
>
>         Should also add that I can import the cortical surface into
>         matlab without any issues using read_surf.m what I would like
>         to have is the ICA overlay also imported into matlab as
>         corresponding colors for each face on the cortical mesh. Thanks.
>
>
>
>         
> ------------------------------------------------------------------------
>         From: andrewz...@live.com.au <mailto:andrewz...@live.com.au>
>         To: gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>         Date: Tue, 11 Mar 2014 11:54:10 +1100
>         CC: freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         Subject: Re: [Freesurfer] Resting State Networks on Cortical
>         Surface
>
>         Regarding matlab:
>
>         Currently, I have in freesurfer the surface extracted via
>         recon-all. I also have the overlay from running mri_vol2surf
>         on the ICA components.
>
>         I would like to export the pial surface + overlay into matlab
>         together as a single object. Is there a matlab script for
>         this, or do I need to do some further processing? Thanks.
>
>
>         > Date: Mon, 10 Mar 2014 11:25:23 -0400
>         > From: gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > To: andrewz...@live.com.au <mailto:andrewz...@live.com.au>
>         > CC: freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > Subject: Re: [Freesurfer] Resting State Networks on Cortical
>         Surface
>         >
>         >
>         > On 03/09/2014 09:12 AM, Xuelong Zhao wrote:
>         > > Hi Doug,
>         > >
>         > > To clarify my previous question:
>         > >
>         > > There is definitely some fuzziness when comparing with the
>         mov,
>         > > whereas the target comparison looks very pristine. I was just
>         > > wondering if this is expected. The mov, as I scroll
>         through the layers
>         > > seem to be also slightly offset in certain regions, I
>         guess this again
>         > > may be due to the fuzziness of the mov fmri data.
>         > Yes this is somewhat expected. The target is the data the
>         surface was
>         > generated from, so it should look perfect.
>         > >
>         > > Regarding my second q:
>         > >
>         > > I've got this working now- the segfault was due to me
>         naively loading
>         > > the surface image as a surface, instead of using it as an
>         overlay, I
>         > > can now successfully scroll through the various frames.
>         However, I
>         > > noticed that in the documentation to load into matlab, say
>         the left
>         > > pial surface (with the ICA components on it), I have to
>         save it as a
>         > > mgz file and then use MRI_read. However, freeview doesn't
>         seem to
>         > > offer this option once I load the pial surface and the the
>         ICA components?
>         >
>         > Sorry, what has to be mgz? What matlab command? What
>         instructions?
>         > doug
>         >
>         > >
>         > >
>         > >
>         
> ------------------------------------------------------------------------
>         > > Date: Thu, 6 Mar 2014 10:19:25 -0500
>         > > From: gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > To: andrewz...@live.com.au <mailto:andrewz...@live.com.au>
>         > > CC: freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > Subject: Re: [Freesurfer] Resting State Networks on
>         Cortical Surface
>         > >
>         > >
>         > > On 3/6/14 6:39 AM, Xuelong Zhao wrote:
>         > >
>         > > Hi Doug,
>         > >
>         > > A follow-up. I've gone back and re-done the registration using
>         > > nifti file with the ICA20 maps. I noticed in tkregister2
>         that when
>         > > I press on the TARGET tab there is extremely good
>         alignment ( i
>         > > think it is to 'orig.mgz' in the mri folder of my subject
>         which I
>         > > had processed using recon-all. While, when I switch to the
>         > > 'moveable' tab the green line seems to be slightly offset,
>         but the
>         > > underlying image is very fuzzy too. Is this an issue?
>         > >
>         > > I don't know without seeing it. The mov is often lower
>         resolution, so
>         > > some fuzziness is expected.
>         > >
>         > >
>         > > Also, when I load the surface image in freeview produced by
>         > > mri_vol2surf nothing seems to show up, even when I use the
>         > > registration file. In fact, if I have other volumes loaded it
>         > > causes freeview to segfault. When I do manage to load it
>         > > successfully with the anatomical template in talairach
>         space, it
>         > > doesn't really show up and it seems that the anatomical
>         template
>         > > is really small and I have to zoom in a lot. Maybe I didn't
>         > > process/register?
>         > >
>         > > Can you be more specific? What are your vol2surf and fv
>         command lines?
>         > > Have you tried it in tksurfer?
>         > >
>         > >
>         > > Thanks again.
>         > >
>         > >
>         
> ------------------------------------------------------------------------
>         > > Date: Tue, 4 Mar 2014 22:52:38 -0500
>         > > From: gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > To: andrewz...@live.com.au <mailto:andrewz...@live.com.au>
>         <mailto:andrewz...@live.com.au> <mailto:andrewz...@live.com.au>
>         > > CC: freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:freesurfer@nmr.mgh.harvard.edu>
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > Subject: Re: [Freesurfer] Resting State Networks on
>         Cortical Surface
>         > >
>         > >
>         > > On 3/4/14 7:18 PM, Xuelong Zhao wrote:
>         > >
>         > > Dear Doug,
>         > >
>         > > I've managed to get functional information onto the cortical
>         > > surface following your instructions.
>         > > But, there's a few issues that are still not resolved:
>         > >
>         > > 1/ wrt to registration I believe the supplied anatomical
>         > > template (in tailarach coords) is already aligned with the ica
>         > > maps (which come from one individual). However, when I run
>         > > mri_vol2surf I need a registration.dat file so in such a
>         > > situation is the registration data from the anatomical
>         > > template sufficient?
>         > >
>         > > If the ica maps are in voxel-for-voxel alignment with the
>         template
>         > > then yes (i,e they must have the same dimension and voxel
>         size)
>         > >
>         > >
>         > > 2/ the nifti file for functional data actually contains 20 ICA
>         > > components. After I ran mri_vol2surf how do I view each
>         > > component independently? Currently it seems to only show one
>         > > particular ICA component in freeview.
>         > >
>         > > Bring up the overlay configuration window. You can control the
>         > > frame/time point from there.
>         > >
>         > >
>         > > 3/ using mri_vol2surf if I want .nii output do I specify thus:
>         > > '--out_type nii' ? (i did this and it seemed to have worked,
>         > > but just wanted to double check).
>         > >
>         > > You can just specify the output file with a .nii extension
>         > > doug
>         > >
>         > >
>         > >
>         > > Thanks!
>         > >
>         > > > Date: Tue, 4 Mar 2014 10:37:19 -0500
>         > > > From: gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > > To: andrewz...@live.com.au
>         <mailto:andrewz...@live.com.au>
>         <mailto:andrewz...@live.com.au> <mailto:andrewz...@live.com.au>;
>         > > freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:freesurfer@nmr.mgh.harvard.edu>
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > > Subject: Re: [Freesurfer] Resting State Networks on Cortical
>         > > Surface
>         > > >
>         > > >
>         > > > On 03/03/2014 11:25 PM, Xuelong Zhao wrote:
>         > > > > Hi Doug, thanks for the quick reply. I've been playing
>         > > around with the
>         > > > > commands you suggested and managed to get what seemed like
>         > > a good
>         > > > > registration by inspecting the green lines in tkregister.
>         > > > >
>         > > > > However, I wasn't actually sure if I put the correct
>         input:
>         > > > >
>         > > > > bbregister --s colin --mov colin_tlrc_1x1x1.nii --reg
>         > > > >
>         > > ~/Documents/Analysis/eigenmodes/rsn_smith09/colin_register.dat
>         > > --t1
>         > > > > --init-header
>         > > > >
>         > > > > after the '--mov' option should i be using the anatomical
>         > > template or
>         > > > > the .nii file containing the 20 ICA components (4D)? I
>         > > tried both
>         > > > > (changing the between the --t1 and --bold options) and the
>         > > anatomical
>         > > > > template came out much better, but I thought the movable
>         > > (--mov) is
>         > > > > meant to be the functional image?
>         > > > It should be a functional image. If the ica maps come
>         from an
>         > > > individual, then use the mean functional for that subject or
>         > > whatever
>         > > > you used for fMRI motion correction (which should be aligned
>         > > with the
>         > > > ica maps). If it is in a group space, then use the
>         > > registration target
>         > > > (that is exactly the same size as your maps).
>         > > > >
>         > > > > Also, wrt to mri_vol2surf, what should the --src_type,
>         > > --projfrac
>         > > > > options be set to in my case?
>         > > > > Also for --out_type, if I want an easy format to port to
>         > > matlab?
>         > > > For projfrac we usually use .5. You can ignore src_type. For
>         > > output
>         > > > type, you can use nii (nifti) and then use MRIread.m
>         > > > doug
>         > > > >
>         > > > > Thanks!
>         > > > >
>         > > > > > Date: Mon, 3 Mar 2014 14:20:55 -0500
>         > > > > > From: gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > > > > To: freesurfer@nmr.mgh.harvard.edu
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:freesurfer@nmr.mgh.harvard.edu>
>         <mailto:freesurfer@nmr.mgh.harvard.edu>
>         > > > > > Subject: Re: [Freesurfer] Resting State Networks on
>         > > Cortical Surface
>         > > > > >
>         > > > > >
>         > > > > > you will need to create a registration between your
>         > > volume (maps) and
>         > > > > > the anatomical. You can do this with bbregister. Then
>         > > use mri_vol2surf
>         > > > > > to map your ICs to the surface
>         > > > > > doug
>         > > > > >
>         > > > > >
>         > > > > > On 03/02/2014 04:21 AM, Xuelong Zhao wrote:
>         > > > > > >
>         > > > > > > Hi,
>         > > > > > >
>         > > > > > > I am trying to display the 20 ICA components in this
>         > > nifti file
>         > > > > > >
>         > > > > > > http://brainmap.org/icns/maps.zip
>         > > > > > >
>         > > > > > > onto anatomical template they've provided here
>         > > > > > >
>         > > > > > > http://brainmap.org/icns/colin_tlrc_1x1x1.nii
>         > > > > > >
>         > > > > > > My question is:
>         > > > > > >
>         > > > > > > How do I extract only the cortical surface from the
>         > > anatomical
>         > > > > > > template and overlay
>         > > > > > > it with only parts of each ICA component that
>         > > intersects with the
>         > > > > surface?
>         > > > > > >
>         > > > > > >
>         > > > > > > Thanks!
>         > > > > > >
>         > > > > > >
>         > > > > > >
>         > > > > > > _______________________________________________
>         > > > > > > Freesurfer mailing list
>         > > > > > > Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > > > > >
>         > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         > > > > >
>         > > > > > --
>         > > > > > Douglas N. Greve, Ph.D.
>         > > > > > MGH-NMR Center
>         > > > > > gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > > > > Phone Number: 617-724-2358
>         > > > > > Fax: 617-726-7422
>         > > > > >
>         > > > > > Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>         > > > > > FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>         > > > > > www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         > >
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         > > > > > Outgoing:
>         > > ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>         > > > > >
>         > > > > > _______________________________________________
>         > > > > > Freesurfer mailing list
>         > > > > > Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > > > >
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         > > > > >
>         > > > > >
>         > > > > > The information in this e-mail is intended only for the
>         > > person to
>         > > > > whom it is
>         > > > > > addressed. If you believe this e-mail was sent to you in
>         > > error and
>         > > > > the e-mail
>         > > > > > contains patient information, please contact the
>         > > Partners Compliance
>         > > > > HelpLine at
>         > > > > > http://www.partners.org/complianceline . If the e-mail
>         > > was sent to
>         > > > > you in error
>         > > > > > but does not contain patient information, please contact
>         > > the sender
>         > > > > and properly
>         > > > > > dispose of the e-mail.
>         > > > > >
>         > > >
>         > > > --
>         > > > Douglas N. Greve, Ph.D.
>         > > > MGH-NMR Center
>         > > > gr...@nmr.mgh.harvard.edu
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         <mailto:gr...@nmr.mgh.harvard.edu>
>         > > > Phone Number: 617-724-2358
>         > > > Fax: 617-726-7422
>         > > >
>         > > > Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>         > > > FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>         > > > www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         > >
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         > > > Outgoing:
>         > > ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>         > > >
>         > > > _______________________________________________
>         > > > Freesurfer mailing list
>         > > > Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         > >
>         > >
>         > >
>         > > _______________________________________________ Freesurfer
>         mailing
>         > > list Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > > <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         > >
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The
>         > > information in this e-mail is intended only for the person
>         to whom
>         > > it is addressed. If you believe this e-mail was sent to you in
>         > > error and the e-mail contains patient information, please
>         contact
>         > > the Partners Compliance HelpLine at
>         > > http://www.partners.org/complianceline . If the e-mail was
>         sent to
>         > > you in error but does not contain patient information, please
>         > > contact the sender and properly dispose of the e-mail.
>         > >
>         > >
>         >
>         > --
>         > Douglas N. Greve, Ph.D.
>         > MGH-NMR Center
>         > gr...@nmr.mgh.harvard.edu <mailto:gr...@nmr.mgh.harvard.edu>
>         > Phone Number: 617-724-2358
>         > Fax: 617-726-7422
>         >
>         > Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
>         > FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
>         > www.nmr.mgh.harvard.edu/facility/filedrop/index.html
>         <http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html>
>         > Outgoing:
>         ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/
>         >
>
>         _______________________________________________ Freesurfer
>         mailing list Freesurfer@nmr.mgh.harvard.edu
>         <mailto:Freesurfer@nmr.mgh.harvard.edu>
>         https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>         The information in this e-mail is intended only for the person
>         to whom it is addressed. If you believe this e-mail was sent
>         to you in error and the e-mail contains patient information,
>         please contact the Partners Compliance HelpLine at
>         http://www.partners.org/complianceline . If the e-mail was
>         sent to you in error but does not contain patient information,
>         please contact the sender and properly dispose of the e-mail.
>
>
>
>     _______________________________________________ Freesurfer mailing
>     list Freesurfer@nmr.mgh.harvard.edu
>     <mailto:Freesurfer@nmr.mgh.harvard.edu>
>     https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer The
>     information in this e-mail is intended only for the person to whom
>     it is addressed. If you believe this e-mail was sent to you in
>     error and the e-mail contains patient information, please contact
>     the Partners Compliance HelpLine at
>     http://www.partners.org/complianceline . If the e-mail was sent to
>     you in error but does not contain patient information, please
>     contact the sender and properly dispose of the e-mail.
>
>

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

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

Reply via email to