After loading the dcm file via 3D Slicer (volume), the x/y image spacing is correct which I set the value (0.0195) at tag “0028,0030” (Pixel Spacing).
However, the image spacing at Z is always 1mm at 3D Slicer. I had tested tag “0018,0088” (Spacing Between Slices) and “0018,0050” (Slice Thickness) respectively or set both to value (0.05). This does not work. Can anyone advise?
I don’t know what is happening, but two things to keep in mind:
Slicer should be calculating distance between slices based on ImagePositionPatient for the individual frames. Changing SliceThickness is not expected to have any effect in your test. SpacingBetweenSlices is probably also not taken into account - it is important only in those situations where volume is not sampled regularly (such as with sparse segmentations). If you could could identify two samples that have very different, and not 1, distance between adjacent slices based on ImagePositionPatients, and both would load with z spacing of 1, that would confirm the bug. Ideally, using publicly available data.
Multiframe DICOM remains uncommon, and it might well be that its support has bugs.
Building on what @fedorov said, you will want to specify the ImagePositionPatient for the frames in the PerFrameFunctionalGroupsSequence. In case it helps, here’s some code for creating multiframes from single frame dicom.
Thanks both replies. I add this to PerFrameFunctionalGroupsSequence. This time I use 0.04167 as spacing and it seems the DICOM tags are right after loading by 3D Slicer (DICOM). But the Z-spacing is still 1mm (volume).