How do I color image data by its associated cell data?

VTK imaging filters expects voxel information to be in imageData->GetPointData()->GetScalars(). Other scalars may be ignored or removed by filters and may not be possible to write to image file formats. Due to all these, I would consider storing additional scalars in vtkImageData a misuse of VTK.

Clean solutions could be:

  • Store all data in components of the points scalar array
  • Rewrite imaging filters, mappers, and IO classes to be prepared for additional scalars.
  • Use You could consider using vtkStructuredGrid or vtkExplicittructuredGrid

@cory.quammen @mwestphal what do you think? What representation ParaView supports/prefers for this kind of data?