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

dcm2niix does not recognize DICOMs #157

Closed
mfalkiewicz opened this issue Jan 29, 2018 · 8 comments
Closed

dcm2niix does not recognize DICOMs #157

mfalkiewicz opened this issue Jan 29, 2018 · 8 comments

Comments

@mfalkiewicz
Copy link

I am having problems converting several DICOM files from the PPMI database. dcm2niix claims that there are no dicom files in the folder:

mfalkiewicz@bnbpc07:~/largefs/dataset_conversion/PD/source_data/PPMI/PPMI00628/MPRAGE_GRAPPA/2012-08-24_09_39_54.0$ dcm2niix S171095
Chris Rorden's dcm2niiX version v1.0.20171215 (OpenJPEG build) GCC4.8.4 (64-bit Linux)
Found 176 DICOM image(s)
No valid DICOM files were found

However, dcm2nii is very happy to do the conversion:

mfalkiewicz@bnbpc07:~/largefs/dataset_conversion/PD/source_data/PPMI/PPMI00628/MPRAGE_GRAPPA/2012-08-24_09_39_54.0$ dcm2nii S171095
Chris Rorden's dcm2nii :: 4AUGUST2014 (Debian) 64bit BSD License
Data will be exported to S171095
Validating 179 potential DICOM images.
Found 176 DICOM images.
Converting 176/176 volumes: 1
PPMI_3587_MR_MPRAGE_GRAPPA__br_raw_20121017100817691_1_S171095_I340628.dcm->20120824_093954MPRAGEGRAPPAs009a1001B.nii
Warning: Siemens interleaved acquisition with an even number of slices. Assume even slices acquired PRIOR to odd slices. https://wiki.cimec.unitn.it/tiki-index.php?page=MRIBOLDfMRI
For slice timing correction: the slice order is Siemens-even interleaved ascending (2,4..,1,3...)
brightest voxel was 1029: data will be saved as 16-bit signed integer.
GZip...20120824_093954MPRAGEGRAPPAs009a1001B.nii.gz
Reorienting as S171095/o20120824_093954MPRAGEGRAPPAs009a1001B.nii.gz
GZip...o20120824_093954MPRAGEGRAPPAs009a1001B.nii.gz
Cropping NIfTI/Analyze image S171095/o20120824_093954MPRAGEGRAPPAs009a1001B.nii.gz
GZip...co20120824_093954MPRAGEGRAPPAs009a1001B.nii.gz

The converted images look normal.

One example subject from the PPMI database is ID = 3587.

Any ideas what might be causing this? Thanks!

neurolabusc added a commit that referenced this issue Jan 30, 2018
@neurolabusc
Copy link
Collaborator

Can you build the latest version and test that it works with all of your image samples. The image that you had problems with was very odd - it reports a Icon Image Sequence (0088,0200) with specific attributes (e.g. palette rather than scalar colors) but does not actually include the icon image. My software includes some kludges to deal with a bug in how GE's PACS system would insert icons that violated the DICOM standard. I assume someone manipulated these images to remove the icons, but did not remove the icon attributes. The current version of my software should generate warnings when it detects this odd behavior, but it should convert the images correctly.

@mfalkiewicz
Copy link
Author

I've tested it and everything seems to be fine now. Thank you!

@rpalmeida
Copy link

@neurolabusc I'm also using ppmi (subject id: 3320) and having the same problem while converting with dcm2niix. Was using the version v1.0.20170724 and updated to version v1.0.20121215 and the problem persists. Any solution would be helpful. Thanks

@neurolabusc
Copy link
Collaborator

This is another example of the same defective images. You have three choices:

  1. Wait for the next release.
  2. If you are using Windows: click on the "AppVeyor" link from the dcm2niix github homepage and choose "Artifacts" - this will provide you a compiled version of the latest source code.
  3. If you are using MacOS/Linux: Build your own copy using the latest Github master repository.
mkdir build && cd build
cmake ..
make

You may also want to contact the PPMI and ask them to clean up their DICOMs, as these images may cause problems with other/future tools.

@rpalmeida
Copy link

I went with option 3 and it solved the problem for this particular image.
Thank you for the help @neurolabusc!

@flamancini
Copy link

Hi, I am having problems reading and converting Dicom images generates from a new Siemens Trio scanner. The dicom image is found in the folder but not recognised as valid by the latest version of dcm2niix. The file header contains meta-data (see info below). The dicom files also contain physiological data - perhaps that is the problem? Thank you

--

Filename: '/Volumes/fm_data/FAPIA/data/raw/26652_0014_00001.dcm'
FileModDate: '06-Mar-2018 11:31:17'
FileSize: 10321264
Format: 'DICOM'
FormatVersion: 3
Width: []
Height: []
BitDepth: []
ColorType: ''
SpecificCharacterSet: 'ISO_IR 100'
ImageType: 'ORIGINAL\PRIMARY\RAWDATA\PHYSIO'
InstanceCreationDate: '20180302'
InstanceCreationTime: '122334.989000'
SOPClassUID: '1.3.12.2.1107.5.9.1'
SOPInstanceUID: '1.3.12.2.1107.5.2.43.167011.2018030212233464868918069'
StudyDate: '20180302'
SeriesDate: '20180302'
StudyTime: '113209.114000'
SeriesTime: '122334.986000'
AccessionNumber: 'U-ID40045'
Modality: 'MR'
Manufacturer: 'SIEMENS'
InstitutionName: 'Wolfson Brain Imaging Centre'
InstitutionAddress: 'Hills Road Cambridge,Cambridge,South East,GB,CB2 2QQ'
ReferringPhysicianName: [1×1 struct]
StationName: 'MR8'
StudyDescription: 'WBIC Protocols Ready^Protocol 442'
ProcedureCodeSequence: [1×1 struct]
SeriesDescription: 'bold_mbep2d_2mm_MB2_v2_run1 82 flip_PhysioLog'
PhysicianOfRecord: [1×1 struct]
PerformingPhysicianName: [1×1 struct]
OperatorName: [1×1 struct]
ManufacturerModelName: 'Prisma_fit'
ReferencedStudySequence: [1×1 struct]
ReferencedPerformedProcedureStepSequence: [1×1 struct]
ReferencedPatientSequence: [1×1 struct]
ReferencedImageSequence: [1×1 struct]
PatientName: [1×1 struct]
PatientID: '26652'
IssuerOfPatientID: 'MEDAVIS'
PatientBirthDate: '00000000'
PatientSex: 'O'
PatientAge: '00Y'
PatientSize: 1.6900
PatientWeight: 70
PatientAddress: ''
MedicalRecordLocator: ''
PatientTelephoneNumber: ''
PregnancyStatus: 4
BodyPartExamined: 'BRAIN'
DeviceSerialNumber: '167011'
SoftwareVersion: 'syngo MR E11'
ProtocolName: 'bold_mbep2d_2mm_MB2_v2_run1 82 flip'
PatientPosition: 'HFS'
StudyInstanceUID: '1.2.276.0.37.1.93.200608.40045'
SeriesInstanceUID: '1.3.12.2.1107.5.2.43.167011.2018030212142689826166654.0.0.0'
StudyID: '38339'
SeriesNumber: 14
AcquisitionNumber: 3295
InstanceNumber: 1
Private_0029_10xx_Creator: 'SIEMENS CSA NON-IMAGE'
Private_0029_11xx_Creator: 'SIEMENS CSA HEADER'
Private_0029_12xx_Creator: 'SIEMENS MEDCOM HEADER2'
Private_0029_1008: [10×1 uint8]
Private_0029_1009: [12×1 uint8]
Private_0029_1108: [10×1 uint8]
Private_0029_1109: [8×1 uint8]
Private_0029_1110: [12384×1 uint8]
Private_0029_1118: [2×1 uint8]
Private_0029_1119: [8×1 uint8]
Private_0029_1120: [184608×1 uint8]
Private_0029_1260: [4×1 uint8]
RequestingPhysician: [1×1 struct]
RequestingService: 'Flavia Mancini'
RequestedProcedureDescription: 'P00442_MR6'
RequestedProcedureCodeSequence: [1×1 struct]
PerformedProcedureStepStartDate: '20180302'
PerformedProcedureStepStartTime: '113209.229000'
PerformedProcedureStepID: '2.40045'
PerformedProcedureStepDescription: 'P00442_MR6'
RequestAttributesSequence: [1×1 struct]
CommentsOnPerformedProcedureStep: ''
Private_7fe1_10xx_Creator: 'SIEMENS CSA NON-IMAGE'
Private_7fe1_1010: [10122240×1 uint8]

@neurolabusc
Copy link
Collaborator

dcm2niix is designed to convert DICOM images to the NIfTI image format. It does not convert non-image based data such as physiological and audio files, as the NIfTI specification does not describe how to encode these. In your example, note that this is not an image, as revealed by the ImageType: 'ORIGINAL\PRIMARY\RAWDATA\PHYSIO' and Private_7fe1_10xx_Creator: 'SIEMENS CSA NON-IMAGE' tags.

@jmtyszka
Copy link
Collaborator

It looks like this might be an example of the physio log DICOMs output by the newer CMRR multiband sequences. Feel free to use/adapt the dcm2physio.py script from https://github.com/adolphslab/mriphysio to extract the physiological waveforms from these files.

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

5 participants