Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: dash_vtk.VolumeController overrides 'colorMapPreset' #72

Open
VilhelmC opened this issue Sep 11, 2023 · 0 comments
Open

bug: dash_vtk.VolumeController overrides 'colorMapPreset' #72

VilhelmC opened this issue Sep 11, 2023 · 0 comments

Comments

@VilhelmC
Copy link

Description

When a dash_vtk.VolumeController component is included as a child to dash_vtk.VolumeRespresentation or dash_vtk.VolumeDataRespresentation it overrides the 'colorMapPreset' property of the VolumeRepresentation, rendering the volume with the 'erdc_rainbow_bright' colormap.

Steps/Code to Reproduce

import random

import dash
from dash import html
import dash_vtk

random.seed(42)

app = dash.Dash(name)
server = app.server

volume_view = dash_vtk.View(
children=dash_vtk.VolumeDataRepresentation(
spacing = [1, 1, 1],
dimensions = [10, 10, 10],
origin = [0, 0, 0],
scalars = [random.random() for _ in range(1000)],
rescaleColorMap = True,
colorDataRange = [0,1],
#volumeController= False,
colorMapPreset = 'Cold and Hot'
)
)

app.layout = html.Div(
style={"height": "calc(100vh - 16px)"},
children=[
html.Div(children=volume_view, style={"height": "100%", "width": "100%"})
],
)

if name == "main":
app.run_server(debug=True)

Expected Results

image

Actual Results

image

Versions

Dash 2.12.1
Dash Core Components 2.0.14
Dash HTML Components 2.11.1
Dash VTK 0.0.9

Browser: Chrome - Version 116.0.5845.112 (Official Build) (64-bit)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant