diff --git a/brainrender/actors/points.py b/brainrender/actors/points.py index e71f73f4..73920e71 100644 --- a/brainrender/actors/points.py +++ b/brainrender/actors/points.py @@ -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") diff --git a/tests/test_integration.py b/tests/test_integration.py index 023f9a03..8155e092 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -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"