Donders-Institute / bidscoin

BIDScoin converts your source-level neuroimaging data to BIDS
https://bidscoin.readthedocs.io
GNU General Public License v3.0
131 stars 35 forks source link

GE DICOM incorrectly detected as P-File #149

Closed ajschadler12 closed 2 years ago

ajschadler12 commented 2 years ago

Describe the bug Referenced in #148. Test data here. Previous behavior: some GE-dicom series were incorrectly classified as P-files. After updating to 1d1e352, bidsmapper fails to detect these files. Restricting plugins to dcm2niix2bids duplicates this behavior.

marcelzwiers commented 2 years ago

Are you sure bidsmapper now fails to detect P-files? I don't have P-files here and your test is just DICOM data, no? I think all works normal if I run the bidsmapper on your test data

ajschadler12 commented 2 years ago

My apologies for the confusion:

The test-dicoms are not being detected. Previously (as mentioned before) they were being detected as p-files. Now, they are not being detected at all.

marcelzwiers commented 2 years ago

Here they are detected as DICOM files?

ajschadler12 commented 2 years ago

They are not being detected:

$ file /home/ajschadler12/test/bidscoin/dicoms/abcd_pe_fieldmap/i19155091.MRDC.41
/home/ajschadler12/test/bidscoin/dicoms/abcd_pe_fieldmap/i19155091.MRDC.41: DICOM medical imaging data

$ bidsmapper -p dcm2niix2bids -n '*' -m '*' /home/ajschadler12/test/bidscoin/dicoms /home/ajschadler12/test/bidscoin/
2022-09-01 13:56:37 - INFO | 
2022-09-01 13:56:37 - INFO | -------------- START BIDSmapper ------------
2022-09-01 13:56:37 - INFO | >>> bidsmapper sourcefolder=/home/ajschadler12/test/bidscoin/dicoms bidsfolder=/home/ajschadler12/test/bidscoin bidsmap=bidsmap.yaml template=/home/ajschadler12/.local/lib/python3.10/site-packages/bidscoin/heuristics/bidsmap_dccn.yaml plugins=['dcm2niix2bids'] subprefix=* sesprefix=* store=False force=False
2022-09-01 13:56:37 - INFO | No existing bidsmap file found: /home/ajschadler12/.local/lib/python3.10/site-packages/bidscoin/heuristics/bidsmap.yaml
2022-09-01 13:56:37 - INFO | Reading: /home/ajschadler12/.local/lib/python3.10/site-packages/bidscoin/heuristics/bidsmap_dccn.yaml
2022-09-01 13:56:38 - INFO | Mapping: /home/ajschadler12/test/bidscoin/dicoms/abcd_pe_fieldmap (subject 1/1)
2022-09-01 13:56:38 - INFO | Executing plugin: dcm2niix2bids.py -> /home/ajschadler12/test/bidscoin/dicoms/abcd_pe_fieldmap
2022-09-01 13:56:38 - INFO | Opening the bidseditor                                          

dakine

marcelzwiers commented 2 years ago
raw_test
`-- sub-GE_pepolar
    `-- abcd_pe_fieldmap
        |-- i19155091.MRDC.41
        |-- i19155092.MRDC.37
        |-- i19155093.MRDC.1
        |-- i19155094.MRDC.21
        |-- i19155095.MRDC.3
[..]

$ bidsmapper raw_test/ bids_test/
2022-09-01 23:41:37 - INFO | 
2022-09-01 23:41:37 - INFO | -------------- START BIDSmapper ------------
2022-09-01 23:41:37 - INFO | >>> bidsmapper sourcefolder=/home/mrphys/marzwi/mridata/bidscoin/raw_test bidsfolder=/home/mrphys/marzwi/mridata/bidscoin/bids_test bidsmap=bidsmap.yaml template=/opt/bidscoin/dev/bidscoin/heuristics/bidsmap_dccn.yaml plugins=[] subprefix=None sesprefix=None store=False force=False
2022-09-01 23:41:37 - INFO | No existing bidsmap file found: /opt/bidscoin/dev/bidscoin/heuristics/bidsmap.yaml
2022-09-01 23:41:37 - INFO | Reading: /opt/bidscoin/dev/bidscoin/heuristics/bidsmap_dccn.yaml
2022-09-01 23:41:39 - INFO | Mapping: /home/mrphys/marzwi/mridata/bidscoin/raw_test/sub-GE_pepolar (subject 1/1)                                                                                                        
2022-09-01 23:41:39 - INFO | Executing plugin: dcm2niix2bids.py -> /home/mrphys/marzwi/mridata/bidscoin/raw_test/sub-GE_pepolar                                                                                         
2022-09-01 23:41:40 - INFO | Discovered 'extra_data' DICOM sample: /home/mrphys/marzwi/mridata/bidscoin/raw_test/sub-GE_pepolar/abcd_pe_fieldmap/i19155091.MRDC.41                                                      
2022-09-01 23:41:40 - INFO | Executing plugin: spec2nii2bids.py -> /home/mrphys/marzwi/mridata/bidscoin/raw_test/sub-GE_pepolar                                                                                         
2022-09-01 23:41:40 - INFO | Opening the bidseditor                                                                                                                                                                     

afbeelding

marcelzwiers commented 2 years ago

I suspect bidsmapper can't find the files because of your data organisation of your raw data. It expects a subject/[session]/series/DICOM_files structure. So subjects could be e.g. sub-GE_pepolar

ajschadler12 commented 2 years ago

Looks like your suspicions were correct...