itkwidgets icon indicating copy to clipboard operation
itkwidgets copied to clipboard

Passing RGB(A) array

Open banesullivan opened this issue 4 years ago • 3 comments

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

banesullivan avatar Jul 26 '19 14:07 banesullivan

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?

thewtex avatar Jul 29 '19 22:07 thewtex

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

55501487-bb618100-5607-11e9-900a-8e0b57012467

banesullivan avatar Jul 29 '19 23:07 banesullivan

This may be fixed per https://github.com/Kitware/itk-vtk-viewer/issues/299

thewtex avatar Jun 12 '20 12:06 thewtex