Skip to content

Commit

Permalink
fixed a bug where horizontal Slicer would invert y axis projections (#43
Browse files Browse the repository at this point in the history
)
  • Loading branch information
carlocastoldi authored May 28, 2024
1 parent a2d04d6 commit 8d45490
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions brainglobe_heatmap/slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
if position is None:
position = root.center_of_mass()

if isinstance(position, (float, int)):
if isinstance(position, (float, int, np.number)):
if isinstance(orientation, str):
pval = position
position = root.center_of_mass()
Expand Down Expand Up @@ -68,7 +68,7 @@ def __init__(
elif orientation == "sagittal":
u0, v0 = np.array([[1, 0, 0], [0, 1, 0]])
else: # orientation == "horizontal"
u0, v0 = np.array([[0, 0, -1], [-1, 0, 0]])
u0, v0 = np.array([[0, 0, 1], [1, 0, 0]])
plane0 = Plane(position, u0, v0)
u1, v1 = u0.copy(), -v0.copy() # set u1:=u0 and v1:=-v0
plane1 = Plane(p1, u1, v1)
Expand Down

0 comments on commit 8d45490

Please sign in to comment.