Skip to content

Commit

Permalink
Merge pull request #262 from brainglobe/test_ruler_from_surface-bug-fix
Browse files Browse the repository at this point in the history
Potential fix for test_ruler_from_surface, removed transformation
  • Loading branch information
alessandrofelder authored Oct 30, 2023
2 parents 3cf712a + 9a24de2 commit f638888
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion brainrender/actors/ruler.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def ruler_from_surface(
p2 = p1.copy()
p2[axis] = 0 # zero the chosen coordinate

pts = root.mesh.intersectWithLine(p1, p2)
pts = root.mesh.intersect_with_line(p1, p2)
surface_point = pts[0]

return ruler(p1, surface_point, unit_scale=unit_scale, units=units, s=s)
2 changes: 1 addition & 1 deletion brainrender/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _prepare_actor(self, actor):
if not actor._is_transformed:
try:
actor._mesh = actor.mesh.clone()
actor._mesh.apply_transform(mtx)
# actor._mesh.apply_transform(mtx)
except AttributeError: # some types of actors don't transform
logger.debug(
f'Failed to transform actor: "{actor.name} (type: {actor.br_class})"'
Expand Down

0 comments on commit f638888

Please sign in to comment.