QIICR/dcmqi

Spacing order initialized incorrectly when reading SEG

fedorov opened this issue · 0 comments

Semantics of pixel spacing is different between DICOM and ITK. In DICOM, "The first value is the row spacing in mm, that is the spacing between the centers of adjacent rows, or vertical spacing" (see here), while in ITK the first value is spacing along the X axis (see here.

In dcmqi, frame size is initialized correctly, with the value of Columns assigned to imageSize[0], but first value of spacing is populated incorrectly from the first value of PixelSpacing:

pixelMeasures->getPixelSpacing(spacing[0], 0);
pixelMeasures->getPixelSpacing(spacing[1], 1);

This will result in incorrect segmentation geometry when PixelSpacing is anisotropic.