We noticed that ImageHelper::GetSpacingValue returns a z-spacing value equal
to 0.0 in some dynamic MR Ehanced series. It causes a really bad result
because gdcmImageReader is used by itk::ImageFileReader which throws an
exception when z-spacing = 0.0 and aborts the reading.
The problem is in ImageHelper::ComputeZSpacingFromIPP. It returns zspacing =
0.0 without error when all images have the same ImagePositionPatient value
(ie, a series which all of its images were acquired at the same position but
in different time instances). There's an example here: http://bit.ly/gg3RPN
There are two solutions to solve the problem:
1- ImageHelper::ComputeZSpacingFromIPP returns false when zspacing = 0.0. As
a consequence, ImageHelper::GetSpacingValue sets spacing = 1.0 and emits
a warning message which I think it's interesting.
2- ImageHelper::ComputeZSpacingFromIPP returns true but change zspacing to
1.0 when zspacing = 0.0.
Moreover, as a suggestion, perhaps it could be interesting to consider
SpacingBetweenSlices when it is filled.
What do you think about it?