You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the convert_bids_to_nnUNetV2.py script for an fMRI dataset and script is running into the following error: contrast bold for subject <subject-name> does not exist this contrast is ignored for all my subjects.
Why is this happening?
The script assumes that the the datatype used from conversion from `bids` to the `nnUNet` is `anat`. The below lines of code assume that the data type is `anat`:
The files name of subjects in general for anat data type is {subject}_{contrast}.nii.gz which is also used/hard-coded in the above lines. When I use the func data type (which is the data type of my dataset), it starts throwing the error because of two reasons:
The code is not able to read the new data type func
The naming convention of fMRI data is generally like -- {subject}_{task-name}_{contrast}.nii.gz
Attaching screenshot from the BIDS dataset for naming convention reference:
Solution:
Add a flag --data-type so that the use can mention the type of dataset. The most used ones (afaik) are anat, func and dwi
Remove the hard-coded naming structure and make it more dynamic as per the data type. But I also would be fine with keeping It hard-coded since it makes sure that the dataset actually uses the BIDS file naming convention.
The text was updated successfully, but these errors were encountered:
Sounds good! The default can be anat. List of choices then [anat, func and dwi], or we can keep it "open" for any datatype specified by the user.
I've kept it open for now. Generally the anat and dwi would have similar naming conventions but func would have a task-name in between subject-name and contrast. The PR #44 solves this.
Description:
I am using the
convert_bids_to_nnUNetV2.py
script for an fMRI dataset and script is running into the following error:contrast bold for subject <subject-name> does not exist this contrast is ignored
for all my subjects.Why is this happening?
The script assumes that the the datatype used from conversion from `bids` to the `nnUNet` is `anat`. The below lines of code assume that the data type is `anat`:
utilities/dataset_conversion/convert_bids_to_nnUNetV2.py
Lines 85 to 94 in e9cbfd8
The files name of subjects in general for
anat
data type is{subject}_{contrast}.nii.gz
which is also used/hard-coded in the above lines. When I use thefunc
data type (which is the data type of my dataset), it starts throwing the error because of two reasons:func
{subject}_{task-name}_{contrast}.nii.gz
Attaching screenshot from the BIDS dataset for naming convention reference:
Solution:
--data-type
so that the use can mention the type of dataset. The most used ones (afaik) areanat
,func
anddwi
BIDS
file naming convention.The text was updated successfully, but these errors were encountered: