[Mne_analysis] a junior question on mne_setup_source_space

peng prion.w at gmail.com
Fri Mar 28 09:52:33 EDT 2014
Search archives:

Dear Alex, Martin and other MNE users,

I have my MEG raw data in CTF .ds format and raw MRI image with dicom
format. I wish to use MNE to compute the leadfield (source space based on
surface).
With your help, I wish to summarise a possible pipeline as a following:
1. recon-all --subject test1 #use  in freesurfer to generate the brain
surfaces and other needed files.
2. mne_watershed_bem --subject test1 --overwrite --atlas #generate surfaces
for bem model
3. mne_ctf2fiff --ds test1.ds --fif test1.fif --infoonly #generate MEG
information (sensor locations etc.)
4. #use MNE_analyze with test1.fif and inflated.surf to generate
test1-trans.fif which contains the transformation matrix;
    #or use a previous calculated transformation matrix and convert it to
fif format
5. mne_setup_source_space --subject tmp --ico 5 --morph test1 #tmp is name
of a template, could be fsaverage or icbm152...
#This is to use locations on the surface of the template cortex (white
matter?) as source space.
#These locations was morphed to subject <test1> to generate leadfield for
this subject later
6. mne_do_forward_solution --subject test1 \
   --src test1-fsaverage-ico-5-src.fif \
  --meas test1.fif \
  --trans test1-trans.fif \
  --megonly --overwrite \
  --fwd test1-oct-5-fwd.fif
# I can then find my leadfield (MxNx3 matrix, M=number of locations, N =
number of sensors) by importing test1-oct-5-fwd.fif into matlab.

Did I miss something?
Thanks a lot for the help.



On Fri, Mar 28, 2014 at 2:14 PM, peng <prion.w at gmail.com> wrote:

> Thank you Martin for the help.
> 1. I re-run the command "mne_setup_forward_model" and it seemed working
> this time (maybe I did not set the environment correctly). Sorry for the
> confusion.
> 2. I tried with MNE_analyze GUI and it was not easy for me. But I saved
> results from one subject successfully and it could be load by MNE_analyze.
> However I wanted to read it in matlab to check the real contents (which I
> assume is a structure with the transformation matrix). I failed with "x =
> fiff_read_mri(fname, 0). It complained "Could not find MRI data"... Would
> please let me know the function name to read and write *-src.fif file in
> matlab?
>
>
>
> On Wed, Mar 26, 2014 at 9:28 PM, Martin Luessi <
> mluessi at nmr.mgh.harvard.edu> wrote:
>
>> On 03/26/14 16:00, peng wrote:
>> > Thank you for the answers.
>> > 1. Surprisingly I did not find any files were generated/saved after
>> > running mne_setup_forward_model.
>>
>> I assume there was an error, can you post the program output?
>>
>> > 2. I don't have a -trans.fif file. I tried to do it in GUI of
>> > MNE_analyze, it was quite complicated. If I have a co-registered mri
>> > file (generated by CTF software with .mri extension), can it be
>> > converted to fif format? If not, I can read the 4x4 head2mri matrix via
>> > matlab, can this information be written to fif format with certain tools
>> > in MNE?
>>
>> There is also a coreg GUI in MNE-Python, have a look here
>>
>> http://www.slideshare.net/mne-python/mnepython-coregistration
>>
>> You could write a .fif file with the transform in Matlab, but it seems
>> to me that this wouldn't be easier than using the coregistration tools
>> in mne_analyze or MNE-Python.
>>
>> HTH,
>>
>> Martin
>>
>>
>> > Thanks again!
>> >
>> >
>> > On Tue, Mar 25, 2014 at 11:39 PM, Alexandre Gramfort
>> > <alexandre.gramfort at telecom-paristech.fr
>> > <mailto:alexandre.gramfort at telecom-paristech.fr>> wrote:
>> >
>> >     hi,
>> >
>> >     >  Some additional questions.
>> >     > 1 After I ran mne_setup_forward_model, I have no feedback from the
>> >     command
>> >     > line, is it normal?
>> >
>> >     it should print that it saved a file to disk
>> >
>> >     > 2 I am using CTF data, thus I converted the .ds folder from CTF
>> to fif
>> >     > format with mne_ctf2fiff command, with option --infoonly. Here I
>> >     only want
>> >     > to get the Leadfield thus I suppose data is not necessary. However
>> >     when I
>> >     > try mne_do_forward_solution, it asked for mri description file,
>> >     which I
>> >     > haven't. I have only a series of dicom files or the .mri file
>> >     generated by
>> >     > ctf software from them. Can I still move on?
>> >
>> >     you need to do the coregistration and get a -trans.fif file.
>> >
>> >     A
>> >     _______________________________________________
>> >     Mne_analysis mailing list
>> >     Mne_analysis at nmr.mgh.harvard.edu
>> >     <mailto:Mne_analysis at nmr.mgh.harvard.edu>
>> >     https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> >
>> >
>> >     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.
>> >
>> >
>> >
>> >
>> > _______________________________________________
>> > Mne_analysis mailing list
>> > Mne_analysis at nmr.mgh.harvard.edu
>> > https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>> >
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140328/d7f72d65/attachment.html 


More information about the Mne_analysis mailing list