itkwidgets
itkwidgets copied to clipboard
Passing RGB(A) array
Could we color a mesh/geometry using a passed RGB(A) array on the point/cell data of the mesh?
Example: https://docs.pyvista.org/examples/00-load/read-image.html?highlight=rgb#read-image-files
A 2D RGB or RGBA image will render as RGB / RGBA by default, and it will be located at the desired location in space relative to other geometry. Does that serve this use case?
I suppose I gave a poor example of what I want to achieve in the post above. What I actually want it to have a mesh (not image but PolyData, etc.) with an array that is 2D (n_cells
by RGB(A)) and use that array to color the mesh instead of mapping the scalars.
Equivalent to using vtkDataSetMapper.SetColorModeToDirectScalars
I don't think I have any direct examples of this in PyVista docs, but here is one example from a while back: https://github.com/pyvista/pyvista/issues/146#issuecomment-479595235
This may be fixed per https://github.com/Kitware/itk-vtk-viewer/issues/299