[ITK-users] Minimal example for writing Dicom sets an incorrect spacing between slices

Joël Schaerer joel.schaerer at gmail.com
Wed Mar 26 13:57:26 EDT 2014


Hi all,

I think I may have found a problem in the Dicom writing example 
ImageReadDicomSeriesWrite.cxx included with the sources (version 4.3.1). 
The spacing between slices in the output dicom files is systematically 
set to 1, no matter the spacing of the input image.

Here is a sample image:

http://sd-33294.dedibox.fr/~joel/input.mha

This is the output from gdcminfo on one of the output files:

MediaStorage is 1.2.840.10008.5.1.4.1.1.4 [MR Image Storage]
TransferSyntax is 1.2.840.10008.1.2 [Implicit VR Little Endian: Default 
Transfer Syntax for DICOM]
NumberOfDimensions: 2
Dimensions: (256,256,1)
SamplesPerPixel    :1
BitsAllocated      :16
BitsStored         :16
HighBit            :15
PixelRepresentation:1
ScalarType found   :INT16
PhotometricInterpretation: MONOCHROME2
PlanarConfiguration: 0
TransferSyntax: 1.2.840.10008.1.2
Origin: (0,0,0)
Spacing: (0.9375,0.9375,1)
DirectionCosines: (1,0,0,0,1,0)
Rescale Intercept/Slope: (0,1)
Orientation Label: AXIAL

Here is the relevant gdcmdump output:

(0018,0088) ?? (DS) [1 ]                                          # 2,1 
Spacing Between Slices

I've tried forcing a number of dicom tags in the GDCMImageIO metadata 
dict, with no success.

Is there a workaround around this? Is it a bug in ITK?

Thanks for your help!

joel


More information about the Insight-users mailing list