mne_organize_dicom for flash sequences

Dear list,

I am a beginner with MNE, trying to organize my dicoms from a T1 and gre_05
flash sequence to compute the BEM model.
I created the source and destination directories and checked the
permissions.
I am getting an error message about missing permissions to create the
folder "003_gre_5\260_PDW" (the anti-slash is not a mistake; screenshot
attached).
Since the function is able to create the folders for the T1 images in the
same directory, I don't think the problem is with the permissions.
Could it be the filenames and if so, how do I assess that?
MNE-Version is 2.7.4

Thank you for any hint on how to solve this!
Sophie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170824/c4a2cc7c/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture du 2017-08-24 10-47-29.png
Type: image/png
Size: 677356 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170824/c4a2cc7c/attachment-0001.png

Dear Sophie,

your problem seems to be Neurospin specific. Maybe you can
have help from a local expert :slight_smile:

besides these commands can now be done with MNE-Python
that tends to be less demanding about file organization and
presence of certain directories.

HTH
Alex

Thanks Alex, can you give a specific pointer on mne wiki regarding " these
commands can now be done with MNE-Python"?
We'll incorporate this new way in the pipeline (once I am on site)
Cheers,
Virginie

Dear Alex,
thank you for the answer. I am trying to follow up on your suggestion to
use MNE-python for that step.
I found the function mne.bem.convert_flash_mris, which however requires the
images to be organized by using mne_organize_dicom (see the notes section
on the bottom of that
<http://martinos.org/mne/stable/generated/mne.bem.convert_flash_mris.html>
page).
Is there a way to circumvent that step?
Thank you!
Sophie

Hi Sophie,

what command generates the "Permission non accord?e"?

can you check that you have write access to the freesurfer folders?

also I see in your script that you run mne_watershed_bem and mne_flash_bem.
You only need one.

Alex

Dear Alex,
we finally found out what the problem is, but I still don't know how to
solve it:

The flash sequence was named gre_5? during the measurement.
mne_organize_dicoms, or more specifically mne_dicom_essentials, seems to
have a problem with the '?' character: it prints a ? instead and then
throws an error when trying to create a folder with that name.
Apparently, the DICOM file names are encoded in Latin-1 / ISO 8859-1 and
the mne scripts expect UTF-8.

Is there a way to either change the filename in the dicoms, or make the
script understand/replace it?

Thank you,
Sophie

Dear Sophie,

great that you found the source of the problem.

I don't have a solution out of the box but if you share the files I can
look into it.

I can also come to you in Neurospin maybe on Friday.

Alex

Thank you, Alex. Dimitri's fix of mne_organize_dicom does the job.
Best,
Sophie

ok great

we're going to push the suggested change upstream.

it should be in the nightly build on MNE tomorrow.

thanks a lot

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170831/334a29a3/attachment.html