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 - Slice Ordering and Orientation Checks #353

Closed YassineAzma closed 1 year ago

YassineAzma commented 1 year ago

Add function to determine if the slice order needs to be inverted or the images need to be swapped left-right to restore the expected view of the ACR phantom

This resolves #345.

Note: this is based off work on the #343 PR. Once this has been merged, I'll rebase this PR to the active hazen branch.

github-actions[bot] commented 1 year ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
hazenlib
   ACRObject.py1011090%59–61, 66–69, 107, 123–124
   HazenTask.py25388%32–34
   __init__.py541769%125–133, 145, 179–181, 184–186, 193–196, 207
   exceptions.py21481%17–21
   relaxometry.py2858670%182–200, 377, 423–425, 492, 566–588, 606–621, 1037–1040, 1046–1052, 1085–1130
   utils.py1894377%61, 65, 75, 80, 117, 124–129, 140, 143–150, 170–172, 190–192, 211–213, 222, 227, 233, 284, 287, 295–300, 303, 346, 355, 371
hazenlib/tasks
   acr_geometric_accuracy.py1216447%41–73, 121–146, 160–194
   acr_ghosting.py1094361%34–49, 75–77, 107–109, 145–186
   acr_slice_position.py1354765%46–61, 187–233
   acr_slice_thickness.py1345857%34–48, 157–216
   acr_snr.py1356353%43–83, 93, 163–173, 207–222, 255–272
   acr_spatial_resolution.py2097166%58–83, 128, 171, 184–193, 275–326
   acr_uniformity.py833360%35–51, 108–133
   ghosting.py1525365%18–35, 50, 112–113, 117, 127–128, 154–156, 173–175, 221–259
   relaxometry.py770%1–11
   slice_position.py1172380%28, 37–38, 49, 103–104, 130, 210, 217–234
   slice_width.py3575385%34–37, 41, 109, 168–188, 453, 458–459, 465, 470, 532–533, 782–823
   snr.py1666760%51, 68–73, 167–185, 200–209, 227–237, 264–274, 279–289, 320–333, 338–346, 375–388
   snr_map.py104199%291
   spatial_resolution.py2474582%36–39, 43, 64, 149, 208, 334–370
   uniformity.py792075%42–45, 51, 93–94, 101, 135–149
TOTAL285581172% 

Tests Skipped Failures Errors Time
201 0 :zzz: 0 :x: 0 :fire: 3m 21s :stopwatch:
tomaroberts commented 1 year ago

I'll review this soon too Yassine. Thanks.

tomaroberts commented 1 year ago

@YassineAzma – I've had a quick look through the changes in this PR and it looks sensible to me. I'll revisit properly once we've merged #343.

I agree with Sophie about the naming convention, because the class is more than just a set of useful helper tools. Let's merge #343, then can you raise a new PR with the naming changes.

Can you change:

RebeccaThornley commented 11 months ago

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

RebeccaThornley commented 11 months ago

In relation to comment above, report showing SNR measurement made on wrong slice due to no slice order inversion

ACR_SAG_Rotate_90_ND_new_1010001_7_smoothing