[FieldTrip] plotting freesurfer mesh on the mri_aligned.
parham hashemzadeh
ph442 at cam.ac.uk
Wed Oct 5 10:08:53 CEST 2016
Hi Jan and A.Donda
Thank you both very much for your input. I will try what you suggested.
Many thanks
best regards parham
On 2016-10-05 02:15, Schoffelen, J.M. (Jan Mathijs) wrote:
> Hi Parham,
>
> Sorry for sounding cryptic earlier, I was just reciprocating the
> crypticity of the question.
> I think that the suggestion made in the previous e-mail is an
> excellent one.
> With the addition that, rather than using ft_determine_coordsys, you
> could use ft_plot_ortho to visualize an arbitrary cross-cut through
> your volumetric image.
> Note however, that the MR and the sourcespace should be in the same
> coordinate system for this to work.
>
> Best,
> Jan-Mathijs
>
>> On 05 Oct 2016, at 00:47, A. Donda <a.donda at hotmail.com> wrote:
>>
>> Hi Parham,
>>
>> if you wanna plot it in FieldTrip, these commands worked well for
>> me, but in my case (MEG data) I had to make sure first that these
>> data were on the same coordinate system (co-registration of MRI and
>> MEG sensor-data). If you do not have this issue, then you can simply
>> plot an MRI and a mesh obtained from freesurfer the following way
>> (make sure that both MRI and the mesh are in the same units, e.g. cm
>> or mm):
>>
>> ft_determine_coordsys(mricor_cm, 'interactive', 'no')
>>
>> hold on
>>
>> ft_plot_mesh(sourcespace);
>>
>> Alternatively, if you want to plot the vertices of the mesh as dots,
>> you can use
>>
>> ft_plot_mesh(sourcespace.pnt,'vertexcolor','b');
>>
>> sourcespace has the following structure (in case this is helpful for
>> you):
>>
>> pnt: [8196x3 double]
>> tri: [16384x3 double]
>> area: [16384x1 double]
>> orig: [1x1 struct]
>> unit: 'm'
>>
>> I obtained sourcespace by loading the boundary element model (bem)
>> surface, created with the watershed algorthim of Freesurfer:
>>
>> sourcespace =
>> ft_read_headshape([subjectname/bem/subjectname-oct-6-src.fif'],
>> 'format', 'mne_source'); %in meters
>>
>> Note that I had to transform the sourcespace dataset to the right
>> coordinate system and units.
>>
>> Finally I plotted the mri and mesh in cm
>>
>> To convert units in Fieldtrip, as you know, use X_cm =
>> ft_convert_units(X,'cm');
>>
>> I hope this is helpful.
>>
>> Best
>>
>> A.Donda
>>
>> -------------------------
>>
>> FROM: fieldtrip-bounces at science.ru.nl
>> <fieldtrip-bounces at science.ru.nl> on behalf of parham hashemzadeh
>> <ph442 at cam.ac.uk>
>> SENT: Tuesday, October 4, 2016 6:08 PM
>> TO: FieldTrip discussion list
>> SUBJECT: Re: [FieldTrip] plotting freesurfer mesh on the
>> mri_aligned.
>>
>> Dear Darren
>> Thank you very much, and I will try to give it a go.
>> In the event that I can not. You are a life saver if you can help
>> me
>> out. Everything is in place except this incredibly important item.
>> I
>> have noticed that you are in Cambridge, maybe we can meet at some
>> point.
>> I am close by at the mathematics department.
>> Many many thanks
>> best regards parham
>>
>> On 2016-10-04 17:45, Darren Price wrote:
>>> Hi Parham
>>>
>>> For a non-linear interpolation onto a regular grid,
>> spm_mesh_to_grid
>>> might be ideal (from the spm package of course). I don't have a
>>> working example to hand, but I may be able to dig one out if you
>> can't
>>> get it working.
>>>
>>> Darren
>>>
>>>
>>> -------------------------------------------------------
>>> Dr. Darren Price
>>> Investigator Scientist and Cam-CAN Data Manager
>>> MRC Cognition & Brain Sciences Unit
>>> 15 Chaucer Road
>>> Cambridge, CB2 7EF
>>> England
>>> EMAIL: darren.price at mrc-cbu.cam.ac.uk
>>> URL: http://www.mrc-cbu.cam.ac.uk/people/darren.price [1]
>>> TEL +44 (0)1223 355 294 x202
>>> FAX +44 (0)1223 359 062
>>> MOB +44 (0)7717822431
>>> -------------------------------------------------------
>>>
>>>
>>> -----Original Message-----
>>> From: fieldtrip-bounces at science.ru.nl
>>> [mailto:fieldtrip-bounces at science.ru.nl] On Behalf Of parham
>>> hashemzadeh
>>> Sent: 04 October 2016 16:59
>>> To: FieldTrip discussion list <fieldtrip at science.ru.nl>
>>> Subject: Re: [FieldTrip] plotting freesurfer mesh on the
>> mri_aligned.
>>>
>>> Hi Jan
>>> Thank you, my functional data are the function values of some
>>> function (irrotational component of the current). From my limited
>>> experience of Fieldtrip, your explanation feels (to myself) a bit
>>> cryptic at the moment.
>>>
>>> You see if my inversion strategy was one of the classical ones
>>> such as the ones provided by "ft_sourceanalysis" lcmv,sam,...,
>> eloreta
>>> then the available fieldtrip tutorials are great in showing
>>> how to plot functional values on the top of anatomical values.
>>> But, since, I work on inversion methods, then I need a hacking
>>> strategy to be able to plot functional values of "some
>>> function"(estimated) on top of anatomical data MRI.
>>>
>>> I would appreciate if you would kindly let me know, if there is
>> hack
>>> to it such that
>>> ft_sourceplot can accept the input.
>>> best regards parham
>>>
>>>
>>>
>>>
>>>
>>> On 2016-10-04 16:29, Schoffelen, J.M. (Jan Mathijs) wrote:
>>>> Hi Parham,
>>>>
>>>> It is possible, but certainly not pain free, nor
>> straightforward.
>>>> I think this is not really a fieldtrip question, but more a
>> general
>>>> matlab related issue.
>>>>
>>>> It should be possible to plot a slice through an MRI volume as a
>>>> MATLAB patch, where the coordinates of the voxels are expressed
>> in
>>>> some coordinate system. Then, it is possible to generate and
>>>> intersection of the freesurfer mesh through the plane of
>>>> visualization.
>>>>
>>>> Best,
>>>> Jan-Mathijs
>>>>
>>>>
>>>>
>>>>> On 04 Oct 2016, at 16:41, parham hashemzadeh <ph442 at cam.ac.uk>
>> wrote:
>>>>>
>>>>> Dear Fieldtrippers
>>>>> Is there a straightforward pain free method ( I appreciate if
>> you can
>>>>> give me the command)
>>>>> to plot arbitrary points such as the vertices of the freesurfer
>>
>>>>> output
>>>>> (mesh) onto the MRI image?
>>>>> The reason that I ask is that I would like to plot my solution
>> on the
>>>>> MRI image.
>>>>> Unfortunately I do not use dipoles. In EEG, I model the
>> irrotational
>>>>> component of the current as a scalar function and therefore I
>> am
>>>>> doing
>>>>> function estimation.
>>>>> IF you use dipoles, it is straightforward because you follow
>> one of
>>>>> the tutorials.
>>>>> But if you do not use dipoles and model the current as the
>> gradient
>>>>> of the irrotational component of the current in EEG then one
>> can get
>>>>> lost.
>>>>> Any help would be appreciated.
>>>>> Many thanks
>>>>>
>>>>> --
>>>>> best regards
>>>>> Parham Hashemzadeh
>>>>> Research Associate
>>>>> Department of Applied Mathematics and Theoretical Physics
>>>>> University of Cambridge, UK.
>>>>> email: hashemzadeh at damtp.cam.ac.uk
>>>>> _______________________________________________
>>>>> fieldtrip mailing list
>>>>> fieldtrip at donders.ru.nl
>>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>>>>
>>>>
>>>> _______________________________________________
>>>> fieldtrip mailing list
>>>> fieldtrip at donders.ru.nl
>>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>>>
>>> --
>>> best regards
>>> Parham Hashemzadeh
>>> Research Associate
>>> Department of Applied Mathematics and Theoretical Physics
>>> University of Cambridge, UK.
>>> email: hashemzadeh at damtp.cam.ac.uk
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>>
>> --
>> best regards
>> Parham Hashemzadeh
>> Research Associate
>> Department of Applied Mathematics and Theoretical Physics
>> University of Cambridge, UK.
>> email: hashemzadeh at damtp.cam.ac.uk
>>
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>> _______________________________________________
>> fieldtrip mailing list
>> fieldtrip at donders.ru.nl
>> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip [2]
>
>
>
> Links:
> ------
> [1] http://www.mrc-cbu.cam.ac.uk/people/darren.price
> [2] https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
best regards
Parham Hashemzadeh
Research Associate
Department of Applied Mathematics and Theoretical Physics
University of Cambridge, UK.
email: hashemzadeh at damtp.cam.ac.uk
More information about the fieldtrip
mailing list