I'm having trouble converting certain images from the PPMI collection. I get the following from dcm2niix:
Found 175 DICOM file(s)
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
Warning: Missing images? Expected 175 images, but instance number (0020,0013) ranges from 1 to 176
Convert 175 DICOM as test2/test2_MPRAGE_GRAPPA2_20191204081310_14 (240x256x175x1)
Unable to equalize slice distances: slice order not consistently ascending:
dx=[0 0 2.4 3.6 4.8 6 7.2 8.4 9.6 10.8 12 13.2 14.4 15.6 16.8 18 19.2 20.4 21.6 22.8 24 25.2 26.4 27.6 28.8 30 31.2 32.4 33.6 34.8 36 37.2 38.4 39.6 40.8 42 43.2 44.4 45.6 46.8 48 49.2 50.4 51.6 52.8 54 55.2 56.4 57.6 58.8 60 61.2 62.4 63.6 64.8 66 67.2 68.4 69.6 70.8 72 73.2 74.4 75.6 76.8 78 79.2 80.4 81.6 82.8 84 85.2 86.4 87.6 88.8 90 91.2 92.4 93.6 94.8 96 97.2 98.4 99.6 100.8 102 103.2 104.4 105.6 106.8 108 109.2 110.4 111.6 112.8 114 115.2 116.4 117.6 118.8 120 121.2 122.4 123.6 124.8 126 127.2 128.4 129.6 130.8 132 133.2 134.4 135.6 136.8 138 139.2 140.4 141.6 142.8 144 145.2 146.4 147.6 148.8 150 151.2 152.4 153.6 154.8 156 157.2 158.4 159.6 160.8 162 163.2 164.4 165.6 166.8 168 169.2 170.4 171.6 172.8 174 175.2 176.4 177.6 178.8 180 181.2 182.4 183.6 184.8 186 187.2 188.4 189.6 190.8 192 193.2 194.4 195.6 196.8 198 199.2 200.4 201.6 202.8 204 205.2 206.4 207.6 208.8 210 0 9.36258e-38 0 7.86128e-43 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.35468e-38 0 -nan 0 9.36107e-38 0 9.33049e-38 0 9.35809e-38 0 -nan -nan 9.36384e-38 0 9.3581e-38 0 0 0 9.36209e-38 0 9.36249e-38 0 -nan 0 9.36325e-38 0 9.36163e-38 0 5.47341e-16 4.55702e-41 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
Recompiling with '-DmyInstanceNumberOrderIsNotSpatial' might help.
The output nifti looks complete, but the slice thickness is doubled from 1.2 mm to 2.4 mm in the nifti header, despite being listed correctly in the json sidecar. Obviously I could fix this by modifying the header, but it's a big dataset and I want to avoid too much manual adjustment. Is there a way to force dcm2niix to use the slice thickness it puts in the sidecar without using the recompiling option suggested?
I can send example data if needed, or if you already have PPMI, try image number I1350799. I've tried downloading this individual image a second time to see if this was just file corruption during download, but got the same result both times.
Thanks
Paul
./dcm2niix -r y -f %t/%s_%p/%4r.dcm ~/Downloads/PPMI
Hi Chris,
I'm having a similar issue as Paul for T1ws and PA direction DTI images. I did check the dicom headers closely, and based on slice location/instance numbers, everything seems to be accounted for (equal slice distances of ~0.8, consistently ascending instance number (by the value of 1)). I was wondering what you might recommend?
Here is the output for T1w:
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
Warning: Missing images? Expected 223 images, but instance number (0020,0013) ranges from 1 to 224
Unable to equalize slice distances: slice order not consistently ascending:
dx=[0 0 0.799999 1.6 2.4 3.2 4 4.8 5.6 6.4 7.2 8 8.8 9.6 10.4 11.2 12 12.8 13.6 14.4 15.2 16 16.8 17.6 18.4 19.2 20 20.8 21.6 22.4 23.2 24 24.8 25.6 26.4 27.2 28 28.8 29.6 30.4 31.2 32 32.8 33.6 34.4 35.2 36 36.8 37.6 38.4 39.2 40 40.8 41.6 42.4 43.2 44 44.8 45.6 46.4 47.2 48 48.8 49.6 50.4 51.2 52 52.8 53.6 54.4 55.2 56 56.8 57.6 58.4 59.2 60 60.8 61.6 62.4 63.2 64 64.8 65.6 66.4 67.2 68 68.8 69.6 70.4 71.2 72 72.8 73.6 74.4 75.2 76 76.8 77.6 78.4 79.2 80 80.8 81.6 82.4 83.2 84 84.8 85.6 86.4 87.2 88 88.8 89.6 90.4 91.2 92 92.8 93.6 94.4 95.2 96 96.8 97.6 98.4 99.2 100 100.8 101.6 102.4 103.2 104 104.8 105.6 106.4 107.2 108.8 109.6 110.4 111.2 112 112.8 113.6 114.4 115.2 116 116.8 117.6 118.4 119.2 120 120.8 121.6 122.4 123.2 124 124.8 125.6 126.4 127.2 128 128.8 129.6 130.4 131.2 132 132.8 133.6 134.4 135.2 136 136.8 137.6 138.4 139.2 140 140.8 141.6 142.4 143.2 144 144.8 145.6 146.4 147.2 148 148.8 149.6 150.4 151.2 152 152.8 153.6 154.4 155.2 156 156.8 157.6 158.4 159.2 160 160.8 161.6 162.4 163.2 164 164.8 165.6 166.4 167.2 168 168.8 169.6 170.4 171.2 172 172.8 173.6 174.4 175.2 176 176.8 177.6 178.4 3.07165e-41 -1.60121e+13 3.07165e-41 2.34087e-41 0 -2.21374e-24 4.57005e-41 -2.21374e-24 4.57005e-41 0 0 0 0 0 3.60608e-06 2.04793e-38 3.52657e-38 9.18369e-41 9.18369e-41 0 0 0 3.67342e-40 2.24208e-44 1 0.8 0.8 0.8 2.4 0 0 0 352 1 0 6.16298e-33 0 0 0 0 0 0 1.1017e-08 3.21607e+12 0.0560125 2.64037e-06 6.33736e-10 2.31766e+29 7.18332e+22 1.76634e-41 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.18369e-41 0.0645953 0.0228613 -0.0161774 -95.6073 -91.4316 -169.645 0.798744 0.0281824 0.0348153 -95.6073 -0.0234568 0.792905 -0.103688 -91.4316 -0.0381592 0.102504 0.792488 -169.645 0 0 0 0 4.51552e-39 0 1.26274e-38 0 2.2893e-41]
Recompiling with '-DmyInstanceNumberOrderIsNotSpatial' might help.
And DTI-PA:
Warning: Interslice distance varies in this volume (incompatible with NIfTI format).
Warning: Missing images? Expected 89 images, but instance number (0020,0013) ranges from 1 to 90
Only able to make equidistant slices from 8,16,24-bit integer or 32-bit float image data.
Any insight is appreciated, thank you!
Does the current development release fix your issue? If this does not help, can you share an example with my institutional email:
https://sc.edu/study/colleges_schools/ar...
You can download the development version by going to the web page
https://ci.appveyor.com/project/neurolabusc/dcm2niix
and selecting the operating system you use (linux, mac, win) and then clicking the "artifacts" button to download a pre-compiled executable.
Alternatively, you can build the development release youself on
unix:
git clone --branch development https://github.com/rordenlab/dcm2niix.gi...
cd dcm2niix/console
make