GSTT-CSC / hazen

Quality assurance framework for Magnetic Resonance Imaging
https://github.com/GSTT-CSC/hazen
Apache License 2.0
22 stars 12 forks source link

ACR object slice ordering results in use of incorrect slice #404

Closed sophie22 closed 9 months ago

sophie22 commented 10 months ago

from RebeccaThornley commented on Dec 7, 2023

Hi, on a recent data set the slice order inversion did not seem to work for some tests: SNR, ghosting, uniformity.

Though inversion seem to be applied correctly for geometric accuracy, the measurements were not performed correctly/not displayed correctly on the report.

ACR_SAG_Rotate_90_new_1017001_7 ACR_SAG_Rotate_90_new_1017001_11

Originally posted by @RebeccaThornley in https://github.com/GSTT-CSC/hazen/issues/353#issuecomment-1844918063

sophie22 commented 10 months ago

Issue 1) Because the phantom was placed in the non-standard (not axial) orientation, the image slices are ordered by an ImagePositionPatient value that is not changing (by default, the ‘z’ value [2] is being used): dcm.ImagePositionPatient[0]: [ 54.9642 44.9642 34.9642 24.9642 14.9642 4.9642 -5.0358 -15.0358 -25.0358 -35.0358 -45.0358]

dcm.ImagePositionPatient[1]: [-147.017 -147.017 -147.017 -147.017 -147.017 -147.017 -147.017 -147.017 -147.017 -147.017 -147.017]

dcm.ImagePositionPatient[2]: [-117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831 -117.81831]

Issue 2) The slice 7, (at index [6]) is being selected before performing the orientation checks, which is a programming issue on my part and explains the difference in the success of the SNR task while geometric accuracy fails (as orientation checks are not relevant for SNR). After some modification to the code, performing sorting by z position and orientation checks (locating the circle which should be the last slice) and only then selecting the seventh slice, hazen can correctly perform most tasks. I will create a PR for this change and will be fixed in the next release of hazen.

sophie22 commented 10 months ago

relates to #352