[Paraview] Coloring by block

Scott, W Alan wascott at sandia.gov
Thu Jul 31 18:21:53 EDT 2014


Here is a question from one of my users - anyone have any ideas?

I realize this is probably the simplest question ever asked, but for some reason I am having trouble finding a "good" way to set block colors.

I have a multiblock data set with about 100 blocks.  I would like to use ParaView to generate some figures for a report that use a consistent block coloring scheme throughout.  Before I make myself seem too ignorant, I am able to get paraview to color blocks in many ways.  I just don't like any of them.

I want to write a file (maybe CSV?) that looks something like this:

Block #, RGB color
100, 1, 0.1, 0.1
200, 1.0, 0.0, 0.0
201, 0.8, 0.8, 0.8
...
... etc.

Or, maybe instead of a CSV it is a ParaView/python script that does all of the block coloring, e.g pseudo code:
<paraviewcommands>.block[number].setcolor<rgb>

I can set block colors individually by using the "Extract Block" filter once for every block (this is not a good solution).
I can also set block colors individually by selecting each block ('b' -> pick block in GUI -> right click, select Set Color), but this is also not a good solution since it is GUI-based.
I can also assign random colors "all at once", but the random scalar numbers generated by the filter are not "frozen", i.e. they change when new filters are applied and the pipeline is processed again.  I want to explicitly specify which colors to use.

Does anybody have any suggestions for going about this?  I'm sure this must have been asked in the past, but I didn't find any sufficient answers while "googling."  I am also interested in alternative solutions that don't rely on "hard-coding" the block colors, but which would color blocks consistently

Thanks,

Alan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20140731/5352c368/attachment.html>


More information about the ParaView mailing list