-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discrepancy in image-label file names in the BIDS-formatted dataset #14
Comments
@naga-karthik good catch - I will definitely address this in the next update! |
here is a quick terminal command to modify the filenames. Note, you must first
there may be a better way to do this, but it worked for me for now.
Repeat for |
Thanks, Kiri, for the bash commands! I added them into a script that could be run from the root directory.
This could be run once to rename all the files according to the proper BIDS convention for the labels. |
@naga-karthik @kiristern I believe this should work for the json files out of the box, but renaming the NIFTIs without unzipping first will result in corrupted files because the zipped file will have a different name. |
as long as the file extension is not changed (eg: |
You are absolutely right, I was not aware of this. Thank you! |
I was working on a preprocessing script to crop the images using the spinal cord masks as the reference and came across a minor discrepancy in the names of the (image, label) pairs in the BIDS-formatted version of the dataset. Particularly, the image name for a subject is as follows
sub-m023917_ses-20130506_acq-ax_T2w.nii.gz
(note the existence of_T2w
suffix here) and the corresponding labels for the same subject is as follows: (i) cord labelsub-m023917_ses-20130506_acq-ax_seg-manual.nii.gz
, (ii) lesion labelsub-m023917_ses-20130506_acq-ax_lesion-manual.nii.gz
(the suffix_T2w
is not mentioned in the file names).The preprocessing script could indeed be changed to take this into account, but I wanted to make sure whether this was intended while creating the BIDS version of the dataset. If not, then this has to be fixed in order to reduce manual tweaking of the preprocessing script.
The text was updated successfully, but these errors were encountered: