openneuropet / PET2BIDS

PET2BIDS helps you convert your PET data into BIDS! raw PET scanner files (e.g. ecat, dicom) and additional side files like .e.g excel sheets -- paper @JOSS https://doi.org/10.21105/joss.06067
https://pet2bids.readthedocs.io
MIT License
26 stars 20 forks source link

non-PET dicoms #245

Open bilgelm opened 9 months ago

bilgelm commented 9 months ago

Issue dcm2niix4pet currently converts non-PET dicoms that are found in the input directory.

For PET/CT or PET/MR acquisitions, it is possible for the directory with PET to include CT or MR dicoms as well, so it would be good for dcm2niix4pet to check for non-PET dicoms.

To Reproduce dcm2niix4pet -d ${OUTPUTDIR} ${INPUTDICOMDIRWITHPETCT} results in converted CT nifti + json files as well as PET. The CT json files contain several PET-specific tags. (As a side note, CT BIDS is in the works.)

Expected behaviour dcm2niix4pet should skip non-PET images and produce a warning instead (stating that images are skipped and pointing the user to dcm2niix if they want to convert them). An easy way to implement this would be at the copying from temp directory stage: convert all dicoms found in the input directory and generate niftis in the temp directory, but copy back only the PET niftis and jsons.

Desktop: