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 generates one .nii per direction with Siemens Magnetom Sola DWI data #383

Closed
PaulineRoca opened this issue Mar 12, 2020 · 3 comments

Comments

@PaulineRoca
Copy link

Hi,

I tried to convert DWI data from a Siemens Magnetom Sola MR scanner but I obtained one output nifti file per direction and dcm2niix crashes before the end.

  • Chris Rorden's dcm2niiX version v1.0.20190902 (JP2:OpenJPEG) (JP-LS:CharLS) GCC5.4.0 (64-bit Linux)
  • sequence: Diffusion weighted MRI containing 30 directions
    • (0018,0024) [SH] SequenceName: *ep_b1000#2
    • (0008,0008) [CS] ImageType: ORIGINAL\PRIMARY\DIFFUSION\NONE\ND\MFSPLIT
  • MR Scanner:
    • Manufacturer: Siemens
    • Manufacturer's Model Name: MAGNETOM Sola
    • (0018,1020) [LO] SoftwareVersions: syngo MR XA11

Command:

dcm2niix -f %d_%s -o ./nii_19022020_enhanced/ .

Output images:

TENSEUR_30_DIRECTIONS_AX_10a.nii.gz
TENSEUR_30_DIRECTIONS_AX_10b.nii.gz
TENSEUR_30_DIRECTIONS_AX_10c.nii.gz
TENSEUR_30_DIRECTIONS_AX_10d.nii.gz
TENSEUR_30_DIRECTIONS_AX_10e.nii.gz
TENSEUR_30_DIRECTIONS_AX_10f.nii.gz
TENSEUR_30_DIRECTIONS_AX_10g.nii.gz
TENSEUR_30_DIRECTIONS_AX_10h.nii.gz
TENSEUR_30_DIRECTIONS_AX_10i.nii.gz
TENSEUR_30_DIRECTIONS_AX_10j.nii.gz
TENSEUR_30_DIRECTIONS_AX_10k.nii.gz
TENSEUR_30_DIRECTIONS_AX_10l.nii.gz
TENSEUR_30_DIRECTIONS_AX_10m.nii.gz
TENSEUR_30_DIRECTIONS_AX_10.nii.gz
TENSEUR_30_DIRECTIONS_AX_10n.nii.gz
TENSEUR_30_DIRECTIONS_AX_10o.nii.gz
TENSEUR_30_DIRECTIONS_AX_10p.nii.gz
TENSEUR_30_DIRECTIONS_AX_10q.nii.gz
TENSEUR_30_DIRECTIONS_AX_10r.nii.gz
TENSEUR_30_DIRECTIONS_AX_10s.nii.gz
TENSEUR_30_DIRECTIONS_AX_10t.nii.gz
TENSEUR_30_DIRECTIONS_AX_10u.nii.gz
TENSEUR_30_DIRECTIONS_AX_10v.nii.gz
TENSEUR_30_DIRECTIONS_AX_10w.nii.gz
TENSEUR_30_DIRECTIONS_AX_10x.nii.gz
TENSEUR_30_DIRECTIONS_AX_10y.nii.gz

The error log is at the end of this issue.

I looked at the DICOM tag, and there is one different SeriesInstanceUID (0020,000E) for each diffusion volume (one per direction of the diffusion gradient) whereas all the DICOM files share the same Series Number (0020,0011).
Do you have any idea about the pb ?

Thanks in advance !

Pauline

Error log

Chris Rorden's dcm2niiX version v1.0.20190902 (JP2:OpenJPEG) (JP-LS:CharLS) GCC5.4.0 (64-bit Linux)
Found 1705 DICOM file(s)
Warning: Slice timing appears corrupted (range 50300..50300, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10 (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10.nii"
Warning: Slice timing appears corrupted (range 16800..16800, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10a (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10a.nii"
Warning: Slice timing appears corrupted (range 204400..204400, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10b (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10b.nii"
Warning: Slice timing appears corrupted (range 170900..170900, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10c (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10c.nii"
Warning: Slice timing appears corrupted (range 90500..90500, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10d (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10d.nii"
Warning: Slice timing appears corrupted (range 57000..57000, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10e (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10e.nii"
Warning: Slice timing appears corrupted (range 43600..43600, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10f (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10f.nii"
Warning: Slice timing appears corrupted (range 3400..3400, TR=6700 ms)
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10g (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10g.nii"
Warning: Slice timing appears corrupted (range 177600..177600, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10h (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10h.nii"
Warning: Slice timing appears corrupted (range 211100..211100, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10i (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10i.nii"
Warning: Slice timing appears corrupted (range 36900..36900, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10j (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10j.nii"
Warning: Slice timing appears corrupted (range 110600..110600, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10k (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10k.nii"
Warning: Slice timing appears corrupted (range 144100..144100, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10l (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10l.nii"
Warning: Slice timing appears corrupted (range 191000..191000, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10m (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10m.nii"
Warning: Slice timing appears corrupted (range 63700..63700, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10n (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10n.nii"
Warning: Slice timing appears corrupted (range 97200..97200, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10o (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10o.nii"
Warning: Slice timing appears corrupted (range 164200..164200, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10p (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10p.nii"
Warning: Slice timing appears corrupted (range 23500..23500, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10q (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10q.nii"
Warning: Slice timing appears corrupted (range 83800..83800, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10r (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10r.nii"
Warning: Slice timing appears corrupted (range 130700..130700, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10s (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10s.nii"
Warning: Slice timing appears corrupted (range 30200..30200, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10t (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10t.nii"
Warning: Slice timing appears corrupted (range 184300..184300, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10u (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10u.nii"
Warning: Slice timing appears corrupted (range 137400..137400, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10v (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10v.nii"
Warning: Slice timing appears corrupted (range 103900..103900, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10w (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10w.nii"
Warning: Slice timing appears corrupted (range 117300..117300, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10x (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10x.nii"
Warning: Slice timing appears corrupted (range 157500..157500, TR=6700 ms)
Warning: This diffusion series does not have a B0 (reference) volume
Convert 55 DICOM as ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10y (102x102x55x1)
Compress: "/usr/bin/pigz" -b 960 -n -f -6 "./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10y.nii"
Warning: Slice timing appears corrupted (range 77100..77100, TR=6700 ms)
Error: Too many NIFTI images with the name ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10
Warning: Slice timing appears corrupted (range 70400..70400, TR=6700 ms)
Error: Too many NIFTI images with the name ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10
Warning: Slice timing appears corrupted (range 150800..150800, TR=6700 ms)
Error: Too many NIFTI images with the name ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10
Warning: Slice timing appears corrupted (range 197700..197700, TR=6700 ms)
Error: Too many NIFTI images with the name ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10
Warning: Slice timing appears corrupted (range 124000..124000, TR=6700 ms)
Error: Too many NIFTI images with the name ./nii_19022020_enhanced/TENSEUR_30_DIRECTIONS_AX_10

@PaulineRoca PaulineRoca changed the title dcm2niix generates 1 .nii per directions with Siemens Magnetom Sola DWI data dcm2niix generates one .nii per direction with Siemens Magnetom Sola DWI data Mar 12, 2020
@neurolabusc
Copy link
Collaborator

I think you have diagnosed the issue correctly. The Series instance UID should be shared by all images of the series. You can use the merge command (-m y) to ignore other forms of variability within a series (e.g. dcm2niix -m y -f %d_%s -o ./nii_19022020_enhanced/ .). However, I think the series instance must still be common. My sense is that these images got corrupted at some stage (e.g. image anonymization), so if you can get a copy prior to this tampering, you should be fine. For example, export your images directly from the scanner console.

I have never seen DICOM data from a Sola before, but it appears to use the same XA10/XA11 software as the Vida. You should be aware that the XA series generates DICOM images that are radically different than any previous Siemens scanner. Please see my comments regarding using the Anonymization and Mosaic features on this generation of scanners. In brief, if you use the console to anonymize or save as mosaic, the resulting images no longer have the information required for subsequent analysis. This reflects a limitation of the DICOM images, not my software.

For non-XA systems (e.g. Trio, Prisma, Skyra) saving EPI volumes as mosaics results in less disk usage and fewer DICOM files. Therefore, Siemens users are in the habit of selecting mosaic images. This strategy will cause data loss if applied to the XA series.

Feel free to send a sample via DropBox/GoogleDrive to email address shown in my avatar. However, if your XA data is saved as mosaics or as Siemens anonymized there will be no way to salvage important parameters.

@PaulineRoca
Copy link
Author

Hi,

Thanks for answering so quickly.
I just tried the command dcm2niix -m y -f %d_%s -o ./nii_19022020_enhanced/ .which gives the same error.
I didn't acquire and didn't anonymize these images (there are from a multicenter research study).
I will ask the center about the export and anonymization method associated with these images (and ask them if I can send you a sample).

Thanks again,

Pauline

@neurolabusc
Copy link
Collaborator

@PaulineRoca can you use a tool like dcmdump or Horos to read the DICOM header and tell me if the ImplementationVersionName reports MATLAB and 0012,0063 reports DICOMANON. E.G.

(0002,0013) SH [MATLAB IPT 9.4]                         #  14, 1 ImplementationVersionName
(0012,0063) LO [DICOMANON (rev R2010a) - PS 3.15-2008 Table E.1-1] #  50, 1 DeidentificationMethod

If so, this is related to issues 275 and 296. Specifically, a user applied Matlab's dicomanon to the data scrambling the crucial SeriesInstanceUID (0020,000e) and likely wiping out a lot of other crucial information. I do not have much experience with Siemens XA data, but for other Siemens MR data this tool removes the crucial CSA header, wiping out many details including NumberOfMosaics, SliceNormalVector, DiffusionGradientDirection, SliceMeasurementDuration, BandwidthPerPixelPhaseEncode, PhaseEncodingDirectionPositive, ASL settings, etc.

If this is the case for you, the issue is not with my software, but the crude anonymization applied. While anonymizing DICOM data is important for data sharing, one needs to take care that the anonymization tool preserves the critical sequence details. I have been impressed with gdcmanon.

I have updated a great and desperate kludge to my software, whereby if Matlab DICOMANON is detected it will use the Series Date and Series time in place of the SeriesInstanceUID. One would think that series date/time would be identify an individual better than the UID, but for some reason DICOMANON preserves these values. This kludge may stack your series correctly, but I would heed the warning that is generated that these images are likely to be severely impoverished. Even basic DICOM viewers like HOROS will see each slice as a separate series. These images are not archival. If you have a license to Matlab you should contact them to repair their software to prevent such data loss. Images corrupted by dicomanon are not archival quality.

If you want to try out my great and desperate kludge, you can get the development release:

On MacOS and Linux you can build the developmental branch with these commands:

git clone --branch development https://github.com/rordenlab/dcm2niix.git
cd dcm2niix/console
make
./dcm2niix

Windows users should be able to get a compiled version from AppVeyor.

yarikoptic added a commit to neurodebian/dcm2niix that referenced this issue May 6, 2020
* tag 'v1.0.20200331': (52 commits)
  Update submodules
  Update dcm_qa submodule.
  UIH 3D sequence quirk
  New release, EstimatedTotalReadoutTime/EstimatedEffectiveEchoSpacing (rordenlab#377)
  Philips TotalReadoutTime (rordenlab#377)
  Cleanup
  Experimental Canon DICOM support (rordenlab#388)
  Experimental solution for issue 384 (rordenlab#384)
  Detect catastrophic anonymization (rordenlab#383)
  Only report "multiple inversion times" if 0018,9079 values differ (e.g. Bangalore data in https://github.com/neurolabusc/dcm_qa_philips)
  Consistent echo naming (rordenlab#381)
  Philips partial Fourier (rordenlab#377)
  Support InversionTImes (0018,9079) tag (rordenlab#380)
  Philips effective echo spacing formula ambiguous (rordenlab#377)
  TR for Philips 3D EPI (rordenlab#369)
  Citation (rordenlab#102)
  GE PET with variable slice intensity (rordenlab#374)
  Estimate Philips EffectiveEchoSpacing (nipreps/sdcflows#5)
  GE slice interpolation (rordenlab#373)
  3D EPI TR (rordenlab#369) 3D phase (rordenlab#371) Enhanced ordering (rordenlab#372 (comment))
  ...
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