Skip to content
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

False detection of duplicate slices #168

Closed
jstutters opened this issue Mar 5, 2018 · 5 comments
Closed

False detection of duplicate slices #168

jstutters opened this issue Mar 5, 2018 · 5 comments

Comments

@jstutters
Copy link

I'm having a problem with the conversion of some DICOMs from a Philips Achieva. dicm2niix is falsely detecting duplicate slices in some 2D sequences. I've checked the ImagePositionPatient header and it varies by 3mm per slice in the Z direction as expected so I'm happy that there aren't any duplicate slices. The Matlab dicm2nii script is able to convert the sequence correctly to a 46 slice NIFTI. The same issue is found in dcm2niix v1.0.20170623, the latest stable release and the git master. I'm not able to provide the DICOM data unfortunately but I can update this report with more information from the headers if that would be helpful.

Program output:

Chris Rorden's dcm2niiX version v1.0.20171215 GCC4.8.5 (64-bit Linux)
Found 46 DICOM image(s)
Some images have identical time, series, acquisition and image values. DUPLICATES REMOVED.
Dims 256 256 45 1 1
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
 Distance from first slice:
dx=[0 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 102 105 108 111 114 117 120 123 126 129 132 135]
Convert 45 DICOM as ./601 (256x256x45x1)
Philips Precise RS:RI:SS = 4.16215:0:0.00786366 (see PMC3998685)
 R = raw value, P = precise value, D = displayed value
 RS = rescale slope, RI = rescale intercept,  SS = scale slope
 D = R * RS + RI    , P = D/(RS * SS)
 D scl_slope:scl_inter = 4.16215:0
 P scl_slope:scl_inter = 127.167:0
 Using P values ('-p n ' for D values)
compress: "/usr/bin/pigz" -n -f -6 "./601.nii"
compress: "/usr/bin/pigz" -n -f -6 "./601_Eq_1.nii"
Dims 256 256 30 1 1
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
 Distance from first slice:
dx=[0 3 6 9 12 15 21 24 36 39 42 45 54 57 60 63 66 78 81 84 87 90 93 105 108 111 114 117 120 123]
Convert 30 DICOM as ./601a (256x256x30x1)
Philips Precise RS:RI:SS = 4.16215:0:0.00786366 (see PMC3998685)
 R = raw value, P = precise value, D = displayed value
 RS = rescale slope, RI = rescale intercept,  SS = scale slope
 D = R * RS + RI    , P = D/(RS * SS)
 D scl_slope:scl_inter = 4.16215:0
 P scl_slope:scl_inter = 127.167:0
 Using P values ('-p n ' for D values)
compress: "/usr/bin/pigz" -n -f -6 "./601a.nii"
compress: "/usr/bin/pigz" -n -f -6 "./601a_Eq_1.nii"
Conversion required 0.284190 seconds (0.090000 for core code).
@neurolabusc
Copy link
Collaborator

Jon
I think this is a duplicate of issue 165 - Philips creates two conflicting slice position tags for every slice - with one being private. I do not have a Philips system, so I can not replicate or confirm this. My first suggestion is to make sure you recompile dcm2niix from the latest source and see if this fixes your problem. If not, can you share a sample dataset with me directly? You may also want to see if you can get the data directly from the scanner, rather than a PACS. The challenge is that Philips uses private SQs, and these can get obscured when the explicit VR file is saved as an implicit VR.

@jstutters
Copy link
Author

I've scrubbed the DICOMs to the point that I can send you a dataset that shows the problem - what's the best way to get the data over to you?

I tried building from source and the problem is still present. I'm not involved in acquiring the data so we're stuck working with what the scanning sites for the study provide otherwise I would try bypassing the PACS.

@neurolabusc
Copy link
Collaborator

Why not put them all in a zip archive and send a link to my email (lastname@sc.edu)
-chris rorden

@neurolabusc
Copy link
Collaborator

@jstutters please test the latest master source code, and close this issue if it works for your data. In your example the standard item "ImageNumber" (0020,0013) is used correctly in the main header and again with a different/contradictory value in the private SQ 2001,9000. This behavior seems to be technically legal (ftp://medical.nema.org/medical/dicom/final/cp758_ft.pdf). This issue is a specific form of the general issue described in 165.

@jstutters
Copy link
Author

Thanks! That seems to have solved the problem. Apologies if this was fixed earlier, I may have been a bit confused about which of rordenlab/dcm2niix and neurolabusc/dcm2niix had the most recent changes.

yarikoptic added a commit to neurodebian/dcm2niix that referenced this issue Jun 14, 2018
* commit 'v1.0.20171215-29-ga662295':
  Update GE and PAR/REC notes. Add warnings for novel PARREC data, use GE proprietary sliceorder
  Restore support for PAR/REC dwi with included ADC/Isotropic
  Use ImageType (0008,0008) to split phase and magnitude (rordenlab#170)
  Improved GE support
  Further PARREC tuning
  Improved Philips PARREC support
  Better PAR/REC error reporting
  0020,9157 does not necessarily index gradient directions from 1..n (e.g. 2...37 for ADNI 018_S_4868)
  Preliminary attempt to support PAR/REC with arbitrary slice orders (e.g. order reconstructed, not acquired)
  Restore support for compressed DICOM (Jon Clayden)
  Restore ability to handle DICOMs files with Icon Image
  Fixes for Philips rordenlab#165 rordenlab#170
  ENH: minor - consistent formatting (%?=description) of template keywords for -f
  More Philips enhanced support
  Partial solution for rordenlab#165
  Experimental SQ skipping: Philips private use of public tags  rordenlab#165
  Fix for rordenlab#168
  Remove GCC version >= 7.1.0 warning: snprintf output between 1 and 256 bytes into a destination of size 24
  Fix for rordenlab#157
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants