How to use the vedo.shapes.Spheres function in vedo

To help you get started, we’ve selected a few vedo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BrancoLab / BrainRender / brainrender / scene.py View on Github external
coords[col_names[0]].values,
                coords[col_names[1]].values,
                coords[col_names[2]].values,
            )
        ]

        # Update color
        if color_by_region:
            color = self.atlas.get_colors_from_coordinates(coords)
        elif color_by_metadata is not None:
            color = get_cells_colors_from_metadata(
                color_by_metadata, coords_df, color
            )

        # Create actors
        spheres = shapes.Spheres(
            coords, c=color, r=radius, res=res, alpha=alpha
        )
        self.actors.append(spheres)

        if verbose:
            print("Added {} cells to the scene".format(len(coords)))

        return spheres
github BrancoLab / BrainRender / brainrender / ABA / aba_utils.py View on Github external
)
        )

    coords = []
    if show_injection_site:
        if len(data["injection_sites"]) == 1:
            try:
                injection_data = data["injection_sites"][0]
            except KeyError:
                injection_data = data["injection_sites"]["0"]
        else:
            injection_data = data["injection_sites"]

        for inj in injection_data:
            coords.append(list(inj.values()))
        spheres = [shapes.Spheres(coords, r=brainrender.INJECTION_VOLUME_SIZE)]
    else:
        spheres = []

    merged = merge(*lines, *spheres)
    merged.color(color)
    merged.alpha(alpha)
    return [merged]

vedo

A python module for scientific analysis and visualization of 3D objects and point clouds based on VTK and Numpy.

MIT
Latest version published 5 months ago

Package Health Score

73 / 100
Full package analysis

Similar packages