I’m trying to create a VTP PolyData output file with cell data scalars that represent RGB color values. Is there a way to do this without having to create a color mapper, which I apparently can’t do without an actor object? I’m not trying to visualize the data, I’m just trying to create the VTP file.
Sure, you can create a three component array and store the RGB values there.
I tried that by setting the CellData of the vtkPolyData object to an array of RGB triples. However, when I loaded it into Paraview, it interpreted the values as X-Y-Z vectors instead of RGB triples, and used the magnitudes of these “vectors” as indices into a default color map. There appeared to be no way from within Paraview to interpret the RGB triples as colors.
Uncheck “MapScalars” in the advanced display properties in the scalar coloring section.
But this is VTK discourse and you stated: “I’m not trying to visualize the data, I’m just trying to create the VTP file.”
Thanks, that did the trick.