Skip to content

Commit

Permalink
Merged in bugfix/RAM-3251_acr_mri_results (pull request #337)
Browse files Browse the repository at this point in the history
RAM-3251 Fix ACR MRI results slice thickness

Approved-by: Randy Taylor
  • Loading branch information
jrkerns committed Jan 29, 2024
2 parents b7fdf9e + 3934cdc commit 197d610
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 7 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ Winston-Lutz
image inversion manually between the class instantiation and the ``.analyze()`` call, this
change should not affect you. If you are, you may no longer need the inversion call.

ACR
^^^

* The slice thickness given when calling ``ACRMRI.results()`` was reporting the nominal slice thickness
not the measured slice thickness. The output from ``ACRMRI.results_data()`` was correct however and has not changed.


v 3.19.0
--------

Expand Down
2 changes: 1 addition & 1 deletion pylinac/acr.py
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ def results(self, as_str: bool = True) -> str | tuple:
string = (
f" - {self._model} Results - ",
f"Geometric Distortions: {self.geometric_distortion.distances()}",
f"Slice Thickness: {self.slice1.slice_thickness:2.2f}mm",
f"Slice Thickness: {self.slice1.measured_slice_thickness_mm:2.2f}mm",
f"Slice 1 S/I Position shift: {self.slice1.slice_shift_mm:2.2f}mm",
f"Slice 11 S/I Position shift: {self.slice11.slice_shift_mm:2.2f}mm",
f"Uniformity PIU: {self.uniformity_module.percent_image_uniformity:2.2f}",
Expand Down
8 changes: 8 additions & 0 deletions tests_basic/test_acr.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ class ACRMRMixin(CloudFileMixin):
slice1_shift: float
slice11_shift: float
psg: float
results: list[str] = []

@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -356,6 +357,11 @@ def test_slice11_shift(self):
def test_psg(self):
self.assertAlmostEqual(self.mri.uniformity_module.psg, self.psg, delta=0.3)

def test_results(self):
results = self.mri.results()
for result in self.results:
self.assertIn(result, results)


class ACRT1Single(ACRMRMixin, TestCase):
file_name = "T1-Single.zip"
Expand Down Expand Up @@ -413,6 +419,7 @@ class ACRGE3T(ACRMRMixin, TestCase):
slice1_shift = 0
slice11_shift = 1.5
psg = 0.3
results = ["5.50mm"]


class ACRGE3TOffset(ACRGE3T):
Expand All @@ -439,6 +446,7 @@ class ACRGE3TRotated(ACRGE3T):
"""

phantom_roll = -0.4
results = ["4.80mm"] # induced rotation does change this a bit. See above.

@classmethod
def setUpClass(cls):
Expand Down

0 comments on commit 197d610

Please sign in to comment.