Skip to content

Allow user to set transparency of region in 3D heatmaps #101

Description

@adamltyson

Based on this image.sc issue:
https://forum.image.sc/t/heatmap-3d-visualization-of-brain-region-transparency-regulation/

It's possible to do, but it would be easier to add this as a parameter somehow

Example:

import brainglobe_heatmap as bgh

values = dict(
    HIP=3,
    TH=1,
    RSP=0.2,
)

scene = bgh.Heatmap(
    values,
    position=(8000, 5000, 5000),
    orientation="frontal",
    thickness=5000,
    format="3D",
)

# get the HIP actor
HIP = scene.scene.get_actors(br_class="brain region", name="HIP")[0]

# Set the opacity
HIP.alpha(0.3)

# Render the scene
scene.show()

gives:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions