Following the suggestions in this post, using the /Utilities/SaveSceneToFieldData example, I’ve managed to write the lookuptable by getting it via lut.GetTable()
and associating it to the vtkImageData
's vtkFieldData
. The code is simply:
lut.GetTable().SetName("colorsArray")
myMesh.GetFieldData().AddArray(lut.GetTable())
But I still cannot make, for instance, ParaView, use this fielddata as the lookuptable to map the cell scalars.
Interestingly, an issue on this was opened in 2004, but never solved.