From 49927f9fb5c5ecd90e92600edf0266428f5f54c6 Mon Sep 17 00:00:00 2001 From: Anthony Lombardi Date: Wed, 10 Jul 2024 14:27:39 -0400 Subject: [PATCH] BUG: Fix partial volume flip Regression introduced in e036c2249dc564c2cca03914837248dae6d06666 where, on config generation, the partial volumes would be automatically flipped in the x and y directions. This caused issues with post-processing. --- AutoscoperM/AutoscoperM.py | 7 +++---- AutoscoperM/Resources/UI/AutoscoperM.ui | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/AutoscoperM/AutoscoperM.py b/AutoscoperM/AutoscoperM.py index b23e8c7..f91b289 100644 --- a/AutoscoperM/AutoscoperM.py +++ b/AutoscoperM/AutoscoperM.py @@ -1494,11 +1494,10 @@ def createAndAddSlicer2AutoscoperTransformNode(volumeNode: slicer.vtkMRMLVolumeN slicer2autoscoper = vtk.vtkMatrix4x4() slicer2autoscoper.Identity() - # Rotation matrix for a 180 x-axis rotation - slicer2autoscoper.SetElement(1, 1, -slicer2autoscoper.GetElement(1, 1)) - slicer2autoscoper.SetElement(1, 2, -slicer2autoscoper.GetElement(1, 2)) + # Rotation matrix for a 180 y-axis rotation + slicer2autoscoper.SetElement(0, 0, -slicer2autoscoper.GetElement(0, 0)) slicer2autoscoper.SetElement(2, 2, -slicer2autoscoper.GetElement(2, 2)) - slicer2autoscoper.SetElement(0, 3, -volSize[0]) # Offset -X + slicer2autoscoper.SetElement(1, 3, -volSize[1]) # Offset -Y slicer2autoscoperNode = slicer.mrmlScene.AddNewNodeByClass("vtkMRMLLinearTransformNode") slicer2autoscoperNode.SetMatrixTransformToParent(slicer2autoscoper) diff --git a/AutoscoperM/Resources/UI/AutoscoperM.ui b/AutoscoperM/Resources/UI/AutoscoperM.ui index ecd300d..fa522ef 100644 --- a/AutoscoperM/Resources/UI/AutoscoperM.ui +++ b/AutoscoperM/Resources/UI/AutoscoperM.ui @@ -727,7 +727,7 @@ Flip Y - true + false @@ -764,7 +764,7 @@ Flip X - true + false