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

colorMapPreset and colorDataRange do not worked in SliceRepresentation #51

Open
lascqy opened this issue Jun 18, 2021 · 2 comments
Open

Comments

@lascqy
Copy link

lascqy commented Jun 18, 2021

For VolumeRepresentation, I use some codes like:
dash_vtk.VolumeRepresentation(
id='vol',
colorMapPreset='jet',
colorDataRange=[0,255],
children=.....
),

it works fine~

but in SliceRepresentation, I use:
dash_vtk.SliceRepresentation(
id="slice-x",
xSlice=128,
colorMapPreset='jet',
colorDataRange=[120,255],
children=dash_vtk.ShareDataSet(),
),

nothing happened....it is still in grayscale on the slicer
why?

@jourdain
Copy link
Collaborator

Indeed the SliceRepresentation does not have the connectivity with the lookupTable. Since this needs to be optional, I never connected it. It would be easy to do but it would also require to add some custom code to automatically add/remove the lookup table from the mapper which I didn't do in the first pass due to lack of time.

@lascqy
Copy link
Author

lascqy commented Jun 19, 2021

Indeed the SliceRepresentation does not have the connectivity with the lookupTable. Since this needs to be optional, I never connected it. It would be easy to do but it would also require to add some custom code to automatically add/remove the lookup table from the mapper which I didn't do in the first pass due to lack of time.

yes, I found some codes in https://github.com/Kitware/react-vtk-js/blob/master/src/core/SliceRepresentation.js.
the lookupTable part has been commented out.

Actually,I‘ve made a 3D render sence in vedo and now want to embed it into a dash-based webpage.
So, I chose dash-vtk to do it.

I will be very appreciated if you can finish this function when you are free of time.
Otherwise, do you have any other suggestion for this situation (some other tools to connect the dash without dash-vtk).

I want to realize it by myself, but I am familiar with R, python, C, not js...........

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

2 participants