Skip to content

bug: dash_vtk.VolumeController overrides 'colorMapPreset' #72

Description

@VilhelmC

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions