[vtkusers] Fwd: Is it possible to set different colors on different blocks of vtkMultiBlockDataSet ?

Chao Liang chaolian at mtu.edu
Mon Aug 5 14:08:04 EDT 2013


Hello,

I am using VTK with C++. My question is:

I have a vtkMultiBlockDataSet, say, it has 1000 blocks. I want to set
different colors, different line widths, etc. to different blocks in this
data set. One way I can think of is that I can use vtkExtractGrid to get
the block or blocks I want to color, then make them as a new
vtkMultiBlockDataSet, then I can do whatever I want to the new created
vtkMultiBlockDataSet. But the drawback of this way is that its cost would
be high if I deal with a huge data set.

I am wondering if there is a better way to do it. The perfect way I am
looking for is that without using vtkExtractGrid, just directly set colors
on different blocks on the original data set vtkMultiBlockDataSet, without
copying any data. Is it possible? If so, could you please tell me how to do
and provide some references if possible? Thank you very much.

Best,

Chao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130805/78c342e9/attachment.htm>


More information about the vtkusers mailing list