-
Notifications
You must be signed in to change notification settings - Fork 82
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
tmp_dcm2bids/ #100
Comments
Actually I had this backwards! No wonder I was confused. It turns out that From current
I see this folder structure, as expected:
but if I skip copying the metadata to
then I get nonsense:
That clears some things up for me. That, of course, fits with what I know from #98. So I think the main bug here is that in the case where Line 62 in 14ff8b1
then copying in the sidecars is also skipped, making the whole process a no-op. The only reason it usually works is because that folder is expected to be populated by And it's a secondary bug that you can't run this on a folder of un-BIDSified NIfTIs. Fixing both will require rethinking the same parts of the code. |
|
dcm2bids
assumes your target directory containstmp_dcm2bids/$subject/
. If it doesn't exist it crashes:This is really confusing to me. It's not a parameter in the API:
Dcm2Bids/dcm2bids/dcm2bids.py
Lines 23 to 32 in 14ff8b1
It's only mentioned in passing in the docs, but not that it's a parameter. All the docs imply that that folder will be created as a side-effect.
It will be made as a side-effect but only if the
dcm2niix
step runs:Dcm2Bids/dcm2bids/dcm2niix.py
Lines 98 to 99 in 14ff8b1
But this folder isn't actually necessary. If you put a single empty file in it
dcm2bids
runs fine:In fact, the test circumvents this by tricking itself:
Dcm2Bids/tests/test_dcm2bids.py
Lines 20 to 21 in 14ff8b1
This works because
dcm2bids.dcm2niix.Dcm2niix
simply checks if any file exists, not if they make sense:Dcm2Bids/dcm2bids/dcm2niix.py
Lines 59 to 62 in 81de8ad
So I think we should make sure this folder isn't necessary.. It's weird that
dcm2niix
is tied to the logging stream, and it's weird that despite the check above nothing else actually makes use of those files. I haven't thought or read through all the implications, but this seems really strange to me!I propose that you'd want these features:
dcm2bids
on a pre-BIDSified dataset, should run successfully and change nothing ordcm2bids
on a dataset of non-BIDSified NIfTI files should succeed. I've heard rumours this is already true?dcm2niix
should only be an optional step, and thereforetmp_dcm2bids/
should be created on-demanddcm2bids
multiple times on the same input should run successfully and change nothingThe text was updated successfully, but these errors were encountered: