-
Notifications
You must be signed in to change notification settings - Fork 229
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
Use bids entities if available in the output name #909
Comments
The challenge is that this approach does not work across all manufacturers and operating systems, or even all BIDS situations. The high performance of dcm2niix derives from the fact that it converts all DICOM data in a single pass, converting one series at a time. Unfortunately, manufacturers often specify the total number of echoes. Due to variations in these properties, one can end up with name clashing if the post-fix is not added (you can explore this with the It is worth noting that dcm2niix does have the experimental BidsGuess option, that can resolve a lot more than the classic dcm2niix conversion. However, it has really only been trained on the clinical datasets I am working with. You can try that feature out to see if it is useful for you (the latest version also inserts the |
I understand the challenges and I am aware that the problem arises from manufacturers storing multiple images in a single Series folder (as I deal with this in bidscoin), but as I see it you could use the BIDS entities if available in the output name, and else just use the existing post-fixes as a fallback (pareto principle)? I think bidsguess is not useful for my situation, because in BIDScoin I already know exactly what the (BIDS compliant) output name should be -- but then I need to strip the postfixes and put them in the output name once more. |
Anyhow, it was just a thought and I already have (ugly) workarounds for the postfixes in place, so you can close the issue if you like |
The pseudocode I propose would be something like (e.g. for dealing multiples echos in one folder):
|
@marcelzwiers since you know the complete filename, the |
No, because even if I know the exact filename, I still cannot control how many images there are in one Series folder |
If I convert a Series folder containing multiple images (e.g. magnitude + phase or multiple echos), then dcm2niix add a post-fix to the name. Fair enough. But it would be nice if, instead of appending postfix, dcm2niix would check the output name for a corresponding bids-entity and use that for disambiguation. For instance, for converting a multi-echo VFA scan I would run:
dcm2niix {args} -f "sub-001_echo-1_part-mag_VFA" -o {outfolder} {sourcefolder}
As an output, I get multiple images with
_e
and_ph
post-fixes, which I then need to strip post-hoc from the filename and store the info in the correspondingecho
andpart
key-value pairs. It would be useful if dcm2niix would first check the output filename for corresponding bids-entities and use those instead of appending post-fixes. Of course, for backwards compatibility such a feature can be a user optionThe text was updated successfully, but these errors were encountered: