Dcm2bids helper missing folder

Hi everyone,

I am new to dcm2bids and neurostars so I’m having some trouble with getting it to work for the first time.

Summary of what happened:

I am trying to convert anonymized T1w data to bids format. Header information has been stripped. I was following the guide and got up until the point where I have to use dcm2bids_helper to build the config file. When I run the command, it seems to work well, but when I go to tmp_dcm2bids there is no helper folder. How can I make the helper folder appear? Thank you for the help.

Command used (and if a helper script was used, a link to the helper script or the command generated):

dcm2bids_helper -d $HOME/BIDS_folder/sourcedata/Data/T1001 -o /BIDS_folder/tmp_dcm2bids/helper --force
INFO    | --- dcm2bids_helper start ---
INFO    | Running the following command: $HOME/.local/bin/dcm2bids_helper -d /BIDS_folder/sourcedata/Data/T1001 -o /BIDS_folder/tmp_dcm2bids/helper --force
INFO    | OS version: Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
INFO    | Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
INFO    | dcm2bids version: 3.0.1
INFO    | dcm2niix version: v1.0.20240202
INFO    | Checking for software update
WARNING | A newer version exists for dcm2bids: 3.1.1
WARNING | You should update it -> https://github.com/UNFmontreal/Dcm2Bids.
INFO    | Currently using the latest version of dcm2niix.
WARNING | Previous dcm2niix directory output found:
WARNING | /BIDS_folder/tmp_dcm2bids/helper
WARNING | 'force' argument is set to True
WARNING | Cleaning the previous directory and running dcm2niix
INFO    | Running: dcm2niix -b y -ba y -z y -f %3s_%f_%p_%t -o /BIDS_folder/tmp_dcm2bids/helper BIDS_folder/sourcedata/Data/T1001
INFO    | Check log file for dcm2niix output

INFO    | Helper files in: /BIDS_folder/tmp_dcm2bids/helper

INFO    | Log file saved at /BIDS_folder/tmp_dcm2bids/log/helper_20240618-140544.log
INFO    | --- dcm2bids_helper end ---

Version:

3.0.1

Environment (Docker, Singularity / Apptainer, custom installation):

custom installation


Hello @marcille,

I can see you are using an “old” version of dcm2bids.
It should work with dcm2bids 3.0.1 but if for some reasons there were an issue for this release and it has been fixed since then I think it would be a good start to check if you still have the same issue with the latest version 3.1.1.

A couple of questions:
Can you give it a try with this newer version ?
How did you install dcm2bids ?

If you get the same error with the latest version check the output log you may found more info there. Our next version of dcm2bids will give way more information if there is an issue with dcm2niix but until then (next week :wink: ) you need to check the issue this way.

Hope it helps,
Arnaud

Hi @abore , thank you for the help!

I downloaded dcm2bids using the conda method described on the github. This is a fresh install from just yesterday and it automatically downloaded version 3.0.1. Is there a way I can ensure that the version being downloaded is the newest one? I tried to uninstall and reinstall again but it still downloaded 3.0.1.

Thanks!

Ok, it’s a littly bit cryptic, I don’t really know why it doesn’t work with conda and the version I see on anaconda.org is 3.1.1.

BUT

There are two other ways to install dcm2bids. Either using pip or directly by downloading it using this link.

Can you try to get the latest version with one of these ways and tell me if you still have the same error ?

Thank you,
Arnaud

Hi @abore ,

I tried the direct download method. I realized what is happening. When I run dcm2bids_scaffold everything runs perfectly, and all my folders show up correctly in my BIDS folder. However when I run dcm2bids_helper, a new tmp_dcm2bids folder is being created outside of my BIDS folder (not in the default), which then contains the dcm2bids_helper output. I have fixed this issue, however, I am not sure why it happened in the first place.

Thanks again,
marcille

Hi @marcille ,

It makes sense. dcm2bids_helper output folder is the current folder you’re in.
You need to specify a specific folder if you want it to be somewhere else.
When you create your config file and explore everything with ``dcm2bids_help you don’t need the output to be in your BIDS folder.
Glad it works now.

Make sure you validate my response (check box) to help others to find the answer.

Best,
Arnaud