Skip to content

Commit

Permalink
BUG: Fix partial volume flip
Browse files Browse the repository at this point in the history
Regression introduced in e036c22 where,
on config generation, the partial volumes would be automatically flipped
in the x and y directions. This caused issues with post-processing.
  • Loading branch information
NicerNewerCar committed Jul 17, 2024
1 parent 392d49d commit 49927f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions AutoscoperM/AutoscoperM.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions AutoscoperM/Resources/UI/AutoscoperM.ui
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@
<string>Flip Y</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
Expand Down Expand Up @@ -764,7 +764,7 @@
<string>Flip X</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
</widget>
</item>
Expand Down

0 comments on commit 49927f9

Please sign in to comment.