[vtkusers] Question about color mapping due to scalar(s) in VTK
Alex Malyushytskyy
alexmalvtk at gmail.com
Thu Jul 12 15:53:08 EDT 2012
It there any reason VTK does not provide vtkDataSetAttributes specific
to data set,
but it has to be only only nodal or cell data?
Assume you need to color data according to the nodal or cell scalar in VTK.
This can be specified on the dataset level if you construct proper pipeline.
But when you have a single variable stored with dataset (for example polydata )
you need work directly with actor.
Yes, I it is possible to store custom variable with dataset, then
build look up table and then set appropriate color to each actor,
but it is way less convenient and require usage of different
approaches in the same application
if you need to switch between showing scalars per-cell (or per-node)
and per-data set, depending on the user need.
This makes sense not only in color definition.
For example you might be interested in velocity of the center mass of
the object ( single point ) in one case, when in the other cases
you might want velocity at each node of the dataset,
Adding support of scalar(s) attached to dataset itself, seems logical
way to go, so I am wondering was there any reason not to implement it
( besides time).
More information about the vtkusers
mailing list