[Paraview] Advice sought on proper color value storage for custom filter

Mike Jackson imikejackson at gmail.com
Wed Mar 26 10:10:57 EDT 2008


I am writing a custom reader + filter for my customer. For  
conversations sakes lets say the data (unstructured grid) could be in  
one of 12 categories. The customer wants to be able to set a custom  
display color for each of the categories. I think there are a few  
different ways to go about this but I am not sure of the pit falls of  
either way.

1: Add a 3 component scalar array to the data set that holds the RGB  
value that the cell would need. (Which category the cell is in is  
determined as the filter runs). I believe ParaView will interpret  
this as RGB colors and "Do the right thing"

2: Add a single component scalar value that holds which category the  
cell belongs to and then have the user load a custom color lookup  
table from the disk.


1 seems easier for the end user but would seem to take up more memory.
2 seems less easy (Manually have to load a custom color xml file) but  
may take less memory because I am storing 1 byte instead of 3.

Any one have any thoughts on this?

Thanks in advance.
--
Mike Jackson
imikejackson & gmail * com






More information about the ParaView mailing list