Mne_analysis Digest, Vol 100, Issue 3

Hi Alex,

Thank you. After I add ?grid 3 (instead of 5) to mne_volume_source_space, the file did convert successfully.
A new problem is, with the following code to covert w file to mgz and then to nii.gz file format, I have error messages from mrInit and mrVista which request some informaion.

Here is the code:

mne_volume_data2mri --src $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-vol-src.fif --stc $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-stc-lh.stc --out $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-lh.stc.mgz

mri_convert --out_orientation RAS -rt nearest --reslice_like $SUBJECTS_Anatomy_DIR/$SUBJECT/HYJ_tag_FS4_T1.nii.gz --in_type mgz $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-$PickTimeFileName-lh.w.mgz --out_type nifti1 $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-$PickTimeFileName.w.nii.gz

And after these, I got the follow error messages:

[mrLoad]: mr.voxelSize has length<4: concatenating a "1" to it
[mrLoad]: mr.dims has length<4: concatenating a "1" to it
Warning: No freqdim field set in the nifti. Assuming freqdim = 1. Nifti stored at: /home/sanyuan/Documents/LSY_dev/MNE_practice/MEG/chi_hc/150715/run1_raw_sss-00150.0.w.nii.gz.hdr

In niftiApplyXform (line 99)

  In niftiApplyAndCreateXform (line 28)
  In mrInit (line 188)
Warning: No phasedim field set in the nifti. Assuming phasedim = 2. Nifti stored at: /home/sanyuan/Documents/LSY_dev/MNE_practice/MEG/chi_hc/150715/run1_raw_sss-00150.0.w.nii.gz.hdr

In niftiApplyXform (line 106)

  In niftiApplyAndCreateXform (line 28)
  In mrInit (line 188)
Index exceeds matrix dimensions.

Error in mrInit>mrInitInplaneTseries (line 345)
f.totalFrames = mr.dims(4);

Error in mrInit (line 221)
        mrInitInplaneTseries(func,scan);

mrVista

Warning: Matlab version 8.6.0.267246 (R2015b) is not yet supported in vistasoft.

In mrVista (line 62)

Initializing Inplane view
Attaching menus
Warning: No freqdim field set in the nifti. Assuming freqdim = 1. Nifti stored at: /home/sanyuan/Documents/LSY_dev/MNE_practice/subjects/chi_hc/HYJ_tag_FS4_orig.nii.gz

In niftiApplyXform (line 99)

  In niftiApplyAndCreateXform (line 28)
  In viewSetAnatomy (line 45)
  In viewSet (line 191)
  In loadAnat (line 34)
  In openMontageWindow (line 165)
  In mrVista
Warning: No phasedim field set in the nifti. Assuming phasedim = 2. Nifti stored at: /home/sanyuan/Documents/LSY_dev/MNE_practice/subjects/chi_hc/HYJ_tag_FS4_orig.nii.gz

In niftiApplyXform (line 106)

  In niftiApplyAndCreateXform (line 28)
  In viewSetAnatomy (line 45)
  In viewSet (line 191)
  In loadAnat (line 34)
  In openMontageWindow (line 165)
  In mrVista
Reference to non-existent field 'scanParams'.

Error in dtGet (line 123)
            val = dt.scanParams(varargin{1}).cropSize;

Error in viewGetTimeSeries (line 58)
                val = dtGet(dataTYPES(1),'Func Size', scan);

Error in viewGet (line 317)
        val = viewGetTimeSeries(vw,param,varargin{:});

Error in labelInplaneLR (line 65)
if Rdim == viewGet(vw,'slicedim')

Error in openMontageWindow (line 186)
INPLANE{s} = labelInplaneLR(INPLANE{s}); %This assumes that the LR data is saved in mrSESSION

Error in mrVista

mrInit

***** [mrInit] Initializing Session LSY_dev ***** (06-May-2016 16:10:17)
freq_dim not set correctly in NIFTI header.
phase_dim not set correctly in NIFTI header.
[mrLoad]: mr.voxelSize has length<4: concatenating a "1" to it
[mrLoad]: mr.dims has length<4: concatenating a "1" to it
Warning: No freqdim field set in the nifti. Assuming freqdim = 1. Nifti stored at:
/home/sanyuan/Documents/LSY_dev/MNE_practice/subjects/chi_hc/mri/ribbon.nii

In niftiApplyXform (line 99)

  In niftiApplyAndCreateXform (line 28)
  In mrInit (line 188)
Warning: No phasedim field set in the nifti. Assuming phasedim = 2. Nifti stored at:
/home/sanyuan/Documents/LSY_dev/MNE_practice/subjects/chi_hc/mri/ribbon.nii

In niftiApplyXform (line 106)

  In niftiApplyAndCreateXform (line 28)
  In mrInit (line 188)
Index exceeds matrix dimensions.

Error in mrInit>mrInitInplaneTseries (line 345)
f.totalFrames = mr.dims(4);

Error in mrInit (line 221)
        mrInitInplaneTseries(func,scan);

I found no way to fill in missing information when converting the files.
Could you help me to find out might be the cause or step I missed?

Best,
Sanyuan

mne_analysis-request at nmr.mgh.harvard.edu ? 2016?5?4? ??9:54 ???

Send Mne_analysis mailing list submissions to
  mne_analysis at nmr.mgh.harvard.edu

To subscribe or unsubscribe via the World Wide Web, visit
  Mne_analysis Info Page
or, via email, send a message with subject or body 'help' to
  mne_analysis-request at nmr.mgh.harvard.edu

You can reach the person managing the list at
  mne_analysis-owner at nmr.mgh.harvard.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mne_analysis digest..."

Today's Topics:

  1. Creating bem meshes with mne_watershed_bem -
     mne_convert_surface not found (milton_avila at usp.br)
  2. Re: Creating bem meshes with mne_watershed_bem -
     mne_convert_surface not found (Alexandre Gramfort)
  3. Error message from mne_volume_data2mri: w file vertex number
     out of range (San-Yuan Lin)
  4. Re: Error message from mne_volume_data2mri: w file vertex
     number out of range (Alexandre Gramfort)
  5. Re: Creating bem meshes with mne_watershed_bem -
     mne_convert_surface not found (milton_avila at usp.br)

----------------------------------------------------------------------

Message: 1
Date: Tue, 3 May 2016 18:11:38 -0300 (BRT)
From: milton_avila at usp.br
Subject: [Mne_analysis] Creating bem meshes with mne_watershed_bem -
  mne_convert_surface not found
To: mne_analysis at nmr.mgh.harvard.edu
Message-ID: <1368681712.9206796.1462309898045.JavaMail.root at usp.br>
Content-Type: text/plain; charset="utf-8"

Dear MNE users,

I am trying to create BEM meshes using
mne_watershed_bem.

I raises the following error:

Running subprocess: mne_convert_surface --surf S07_brain_surface --mghmri /media/milton/Dados/MRI/S07/mri/T1.mgz --surfout S07_brain_surface --replacegeom
Command not found: mne_convert_surface
Traceback (most recent call last):
File "pre_process.py", line 257, in <module>
mne.bem.make_watershed_bem(subj, subjects_dir=mri_path, overwrite=True)
File "<string>", line 2, in make_watershed_bem
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py", line 551, in verbose
return function(*args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/bem.py", line 1015, in make_watershed_bem
run_subprocess(cmd, env=env, stdout=sys.stdout, stderr=sys.stderr)
File "<string>", line 2, in run_subprocess
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py", line 551, in verbose
return function(*args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py", line 804, in run_subprocess
p = subprocess.Popen(command, *args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

The files created:
<subj>_brain_surface
<subj>_inner_skull_surface
<subj>_outer_skull_surface
<subj>_inner_skin_surface

The files NOT created:
inner_skull.surf,
outer_skull.surf
outer_skin.surf

Does anybody know what is going on?
Thanks in advance
Milton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160503/7ff383df/attachment-0001.html

------------------------------

Message: 2
Date: Wed, 4 May 2016 13:52:07 +0200
From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
Subject: Re: [Mne_analysis] Creating bem meshes with mne_watershed_bem
  - mne_convert_surface not found
To: Discussion and support forum for the users of MNE Software
  <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
  <CADeotZq5poNMMvrCJj88G-=nON-WoT1WpW4Re0Hsu9eJ10Ze=w at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

hi Milton,

do you have the problem with all your subjects?

if so can you try with the latest version of mne-python code?

I recently had to fix this code that was not creating properly the sym links.

Alex

Dear MNE users,

I am trying to create BEM meshes using
mne_watershed_bem.

I raises the following error:

Running subprocess: mne_convert_surface --surf S07_brain_surface --mghmri
/media/milton/Dados/MRI/S07/mri/T1.mgz --surfout S07_brain_surface
--replacegeom
Command not found: mne_convert_surface
Traceback (most recent call last):
File "pre_process.py", line 257, in <module>
   mne.bem.make_watershed_bem(subj, subjects_dir=mri_path, overwrite=True)
File "<string>", line 2, in make_watershed_bem
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 551, in verbose
   return function(*args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/bem.py", line
1015, in make_watershed_bem
   run_subprocess(cmd, env=env, stdout=sys.stdout, stderr=sys.stderr)
File "<string>", line 2, in run_subprocess
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 551, in verbose
   return function(*args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 804, in run_subprocess
   p = subprocess.Popen(command, *args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line 710, in
__init__
   errread, errwrite)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line 1335, in
_execute_child
   raise child_exception
OSError: [Errno 2] No such file or directory

The files created:
<subj>_brain_surface
<subj>_inner_skull_surface
<subj>_outer_skull_surface
<subj>_inner_skin_surface

The files NOT created:
inner_skull.surf,
outer_skull.surf
outer_skin.surf

Does anybody know what is going on?
Thanks in advance
Milton

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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.

------------------------------

Message: 3
Date: Wed, 4 May 2016 20:15:25 +0800
From: San-Yuan Lin <lin.sanyuan at gmail.com>
Subject: [Mne_analysis] Error message from mne_volume_data2mri: w file
  vertex number out of range
To: mne_analysis at nmr.mgh.harvard.edu
Message-ID: <00E0A193-8C19-4660-85BC-CE5012E323B4 at gmail.com>
Content-Type: text/plain; charset=big5

Hi All,

I?ve tried to convert w file into niifi format for mrVista by using the following code, and got "w file vertex number out of range.? message from mne_volume_data2mri. Does anyone know the meaning of this message?

(I used ico 5 for both source space and forward model.)

Here is the code I used:

mne_volume_source_space --mindist 3 --surf $SUBJECTS_Anatomy_DIR/$SUBJECT/surf/lh.sphere --bem $SUBJECTS_Anatomy_DIR/$SUBJECT/bem/$SsFileHead-bem.fif --mri $SUBJECTS_Anatomy_DIR/$SUBJECT/mri/T1.mgz --src $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-vol-lh-src.fif

mne_volume_data2mri --scale 0.1 --src $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-vol-lh-src.fif --w $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-w-$PickTimeFileName-lh.w --out $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-$PickTimeFileName-lh.w.mgz

Thanks,
Sanyuan

------------------------------

Message: 4
Date: Wed, 4 May 2016 14:17:33 +0200
From: Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
Subject: Re: [Mne_analysis] Error message from mne_volume_data2mri: w
  file vertex number out of range
To: Discussion and support forum for the users of MNE Software
  <mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
  <CADeotZoFg39zcDXbzOQ43T=44SoH+Fkogd0N2tF-TT0S2k6Aow at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

hi Sanyuan,

ico5 refers to a surface/cortical source space. Could it be the issue
as you want to manipulate volume grids?

Alex

Hi All,

I?ve tried to convert w file into niifi format for mrVista by using the following code, and got "w file vertex number out of range.? message from mne_volume_data2mri. Does anyone know the meaning of this message?

(I used ico 5 for both source space and forward model.)

Here is the code I used:

mne_volume_source_space --mindist 3 --surf $SUBJECTS_Anatomy_DIR/$SUBJECT/surf/lh.sphere --bem $SUBJECTS_Anatomy_DIR/$SUBJECT/bem/$SsFileHead-bem.fif --mri $SUBJECTS_Anatomy_DIR/$SUBJECT/mri/T1.mgz --src $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-vol-lh-src.fif

mne_volume_data2mri --scale 0.1 --src $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-vol-lh-src.fif --w $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-w-$PickTimeFileName-lh.w --out $Data_DIR/$SUBJECT/$SsFileDir/$SsFileHead-$PickTimeFileName-lh.w.mgz

Thanks,
Sanyuan
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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.

------------------------------

Message: 5
Date: Wed, 4 May 2016 10:54:47 -0300 (BRT)
From: milton_avila at usp.br
Subject: Re: [Mne_analysis] Creating bem meshes with mne_watershed_bem
  - mne_convert_surface not found
To: Discussion and support forum for the users of MNE Software
  <mne_analysis at nmr.mgh.harvard.edu>
Message-ID: <364624205.9382566.1462370087867.JavaMail.root at usp.br>
Content-Type: text/plain; charset="utf-8"

H i Alex!
Thanks for the reply.

No success. I got the same error.
It is happening with the only subject I have.
Milton
----- Mensagem original -----

De: "Alexandre Gramfort" <alexandre.gramfort at telecom-paristech.fr>
Para: "Discussion and support forum for the users of MNE Software"
<mne_analysis at nmr.mgh.harvard.edu>
Enviadas: Quarta-feira, 4 de Maio de 2016 8:52:07
Assunto: Re: [Mne_analysis] Creating bem meshes with
mne_watershed_bem - mne_convert_surface not found

hi Milton,

do you have the problem with all your subjects?

if so can you try with the latest version of mne-python code?

I recently had to fix this code that was not creating properly the
sym links.

Alex

Dear MNE users,

I am trying to create BEM meshes using
mne_watershed_bem.

I raises the following error:

Running subprocess: mne_convert_surface --surf S07_brain_surface
--mghmri
/media/milton/Dados/MRI/S07/mri/T1.mgz --surfout S07_brain_surface
--replacegeom
Command not found: mne_convert_surface
Traceback (most recent call last):
File "pre_process.py", line 257, in <module>
mne.bem.make_watershed_bem(subj, subjects_dir=mri_path,
overwrite=True)
File "<string>", line 2, in make_watershed_bem
File
"/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 551, in verbose
return function(*args, **kwargs)
File
"/home/milton/anaconda2/lib/python2.7/site-packages/mne/bem.py",
line
1015, in make_watershed_bem
run_subprocess(cmd, env=env, stdout=sys.stdout, stderr=sys.stderr)
File "<string>", line 2, in run_subprocess
File
"/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 551, in verbose
return function(*args, **kwargs)
File
"/home/milton/anaconda2/lib/python2.7/site-packages/mne/utils.py",
line 804, in run_subprocess
p = subprocess.Popen(command, *args, **kwargs)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line
710, in
__init__
errread, errwrite)
File "/home/milton/anaconda2/lib/python2.7/subprocess.py", line
1335, in
_execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

The files created:
<subj>_brain_surface
<subj>_inner_skull_surface
<subj>_outer_skull_surface
<subj>_inner_skin_surface

The files NOT created:
inner_skull.surf,
outer_skull.surf
outer_skin.surf

Does anybody know what is going on?
Thanks in advance
Milton

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

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
MyComplianceReport.com: Compliance and Ethics Reporting . 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
Mne_analysis Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160504/f732fc1f/attachment.html

------------------------------

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

End of Mne_analysis Digest, Vol 100, Issue 3
********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160509/d56667ae/attachment-0001.html

hi Sanyuan,

can you share a full script with all the commands?

For the sample data we scripts we used are:

https://github.com/mne-tools/mne-scripts/blob/master/sample-data/run_meg_volume_tutorial.sh

or in python:

https://github.com/mne-tools/mne-scripts/blob/master/sample-data/run_meg_volume_tutorial.py

HTH
Alex