-
Notifications
You must be signed in to change notification settings - Fork 123
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
Color maps consistency and convenient access #205
Comments
One more thing to add to this list (might change API):
|
@tgandor thanks for sharing.
That's right. We have to do something about it for the docs.
It's not a problem. Colormap definitions do not assume a value scale. Everything is projected into the color_range. This is the standard for defining colormap in paraview (source: https://gitlab.kitware.com/paraview/paraview/raw/master/Remoting/Views/ColorMaps.json )
colormap resolving is on kernel side in K3D. I don't want to increase the size of snapshots/k3djs codebase to hold every potential colormap. So we can only implement setter to automagically replace string to a proper array. but:
Will fail. I don't think that it's worth introducing that.
What's the problem? Some k3d users come from the world of matplotlib, others from the world of VTK. The collections are separated, but complete and original. Do we want to save a few kb in the source code?
Yes. For example for those colormap:
Finally, the colormap is transferred to the frontend anyway as binary float32 data. It doesn't matter what you write in the source code. The bigger value for us is that we have k3d.matplotlib_color_maps rather than k3d.matplotlib_like_color_maps Please look at https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/_cm.py and https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/_cm_listed.py K3D use name 'matplotlib' and 'paraview' so I don't think that we have credibility to affect the data.
It's a fully automated process in object constructor , right? Of course We can change it.
class_colors sound good but on the other hand isn't it is a colormap in fact? That change will introduce a breaking change to API so @marcinofulus should decide. |
Some conclusions after discussion:
Rest of stuff, as |
There are a few minor issues with color maps (or colormaps?) as we have them right now:
np.array(k3d.colormaps.some_group.SomeColorMap, dtype=np.float32)
for our own built-in colormaps? Couldn't we have them ready to use, asndarrays
with the correctdtype
?This issue is for answering and addressing these questions.
The text was updated successfully, but these errors were encountered: