rordenlab / dcm2niix

dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC
https://www.nitrc.org/plugins/mwiki/index.php/dcm2nii:MainPage
Other
892 stars 228 forks source link

Inconsistent reverse B0 (PA) identification #258

Closed jhlegarreta closed 5 years ago

jhlegarreta commented 5 years ago

Description

Although the filenames produced by dcm2niix to transform DWI DICOM files into NIfTI files identifies files and labels them as being reverse B0 (i.e. PA) files, it seems not to be in agreement when visually inspecting the volumes.

Also, the PhaseEncodingDirection tag value in the JSON file created by dcm2niix for the reverse B0 files (whether they contain the direction label in the filename or not), seems not be consistent across studies

Scanner manufacturer and model

Scanner manufacturer and model as written in the JSON file tags Manufacturer and ManufacturersModelName produced by dcm2niix, forward/reverse B0 filename relevant part generated by dcm2niix, PhaseEncodingDirection tag value in the corresponding JSON files and AP/PA presence by visual inspection:

1. Philips TrioTim ; B02_AP: j- | B03_PA: j ; true PA: B03_PA
2. Philips Ingenia ; b0_AP: j | no PA filename produced ; true PA
3. Philips Achieva ; b0: j (no direction tag in filename) ; not a PA
4. Philips Ingenia ; b0_AP: j | no PA filename produced ; true PA
5. Philips Achieva ; AP: j | no PA filename produced ; not a PA
6. Siemens TrioTim ; B02_AP: j- | B03_PA: j ; true PA: B03_PA
7. Siemens TrioTim ; B02: j- | B03: j | (no AP/PA filename produced) ; true PA (B03)
8. Siemens TrioTim ; B02_AP: j- | B03_PA: j ; true PA: B03_PA
9. Siemens Prisma ; AP: j- | PA; j ; not a PA
10. Siemens Prisma ; b0_1: j- | b0_2: j- ; not a PA
11. Siemens Skyra ; B02_AP: j- | B03_PA: j- ; not a PA
12. Siemens Skyra ; B02_AP: j- | B03_PA: j- ; not a PA
13. Siemens Prisma ; b0_1: j- | b0_2: j- ; not a PA
14. Philips Intera ; b0: j (no direction tag in filename) ; not a PA
15. Philips Intera ; b0: j (no direction tag in filename) ; not a PA
16. Siemens Prisma** ; B02_AP: j- | B03_PA: j ; true PA: B03_PA
17. Siemens TrioTim ; B02: j- | B03: j ; true PA B03
18. GE Signa Pioneer ; (no AP/PA/B0 filename produced) ; 
      true PA (present in a file *EP_SE* file)

dmc2niix and OS version

dcm2niiX version v1.0.20181125 GCC5.4.0 (64-bit Linux)

Command used when doing the DICOM to NIfTI conversion

dcm2niix -o $study_nifti_out_path -f %i_%p_%q $study_dicom_path

executed inside a loop over all the DICOM folders, and where $study_nifti_out_path is my output path for the dcm2niix generated NIfTI files for each study, and $study_dicom_path is the path of each DICOM folder where the original data files live.

neurolabusc commented 5 years ago

The short version:

mharms commented 5 years ago

Hi Chris. I'm confused. I thought it had been decided back here https://github.com/rordenlab/dcm2niix/issues/163#issuecomment-380887134 that PhaseEncodingDirection should only be used if the polarity is known (which is consistent with the intention of the BIDS spec). i.e., PhaseEncodingDirection should not be used if the polarity is NOT known. Did something change since that discussion?

neurolabusc commented 5 years ago

@mharms yes, thanks for your correction. Recent versions of dcm2niix will use the tag PhaseEncodingAxis instead of PhaseEncodingDirection when the phase encoding polarity is unknown. Since I do not have access to hardware that makes the problematic images, I have little experience with these.

if any user has access to Philips hardware (or a Siemens Vida XA10), it would be great to have enhanced DICOM datasets that illustrate diffusion gradient direction and phase encoding for this equipment. There are a few DICOM images for this equipment. However, the is nothing equivalent to the Siemens (pre-XA10), GE or UIH validation DICOM datasets. These reference datasets are intentionally very small (low spatial resolution, very few volumes) that are run with every commit of dcm2niix code. Given that enhanced DICOM is very vulnerable to disruption by non-enhanced aware tools (e.g. attempts to anonymize or convert to implicit VR can corrupt these datasets), it would be really useful to have reference examples of what these images should look like.

jhlegarreta commented 5 years ago

@neurolabusc thanks for the detailed answer !

Well, I see that this is harder than I thought, and that dcm2niix makes as best as it can to get the information as accurately as vendor's provide. I appreciate the effort.

A few comments:

For axial scans COLS would be R<>L and ROWS would be A<>P. Note that for your sample dcm2niix is able to always determine this accurately (all your scans are A<>P).

neurolabusc commented 5 years ago
jhlegarreta commented 5 years ago

Thanks for all this supplementary explanations @neurolabusc . I appreciate the time you've taken to answer.

I see that the question is nontrivial and it requires lots of experience. I'll let you know if I come to some meaningful conclusion or if I can somehow improve dcm2niix.

In the meantime, I'm closing the issue then.