Skip to content

Commit

Permalink
Merge pull request #296 from brainglobe/asymmetric-cells
Browse files Browse the repository at this point in the history
Fixed bug related to issue #293, amended tests to check in the future
  • Loading branch information
alessandrofelder authored Dec 8, 2023
2 parents 7d00370 + a1c23fe commit 9bdbecf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion brainrender/actors/points.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ def __init__(
.alpha([0, 0.9])
.mode(1)
) # returns a vedo Volume
volume.mirror("z")

Actor.__init__(self, volume, name=name, br_class="density")
7 changes: 7 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ def test_cell_density(scene):
check_bounds(points_bounds, root_bounds)
check_bounds(points_density_bounds, root_bounds)

ids = points_density.mesh.isosurface().inside_points(
coordinates, return_ids=True
)

# Check that at least 75% of the points are inside the mesh
assert len(ids) >= 0.75 * len(coordinates)


def test_gene_expression(scene):
gene = "Gpr161"
Expand Down

0 comments on commit 9bdbecf

Please sign in to comment.