Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
rmatsuda committed Oct 25, 2024
1 parent 759efd7 commit c8ae460
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion invesalius/net/neuronavigation_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,10 @@ def set_vector_field(self, vector_field):
# Modify vector_field to swap x and y coordinates and adjust z orientation to match mTMS
for vector in vector_field:
# Swap x and y in the position
vector["position"][0], vector["position"][1] = vector["position"][1], vector["position"][0]
vector["position"][0], vector["position"][1] = (
vector["position"][1],
vector["position"][0],
)
# Reverse the z orientation
vector["orientation"][2] = -vector["orientation"][2]
wx.CallAfter(Publisher.sendMessage, "Set vector field", vector_field=vector_field)
Expand Down

0 comments on commit c8ae460

Please sign in to comment.