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

Sean Ziegeler seanzig at users.sourceforge.net
Wed Mar 26 11:07:36 EDT 2008


Using a single value for the category might make it easier to apply
other filters to the category field.  For example, one could apply the
threshold filter to remove categories or histogram to see relative
occurrences of each category.  Using filters on your category may or may
not make sense, but that's my thoughts on it.

-Sean

Mike Jackson wrote:
> I do have 12 buttons in my custom GUI that allow the user to change each 
> category color.
> 
> In looking through some prior vtk code that I had written I was thinking 
> that I could attach a color table to an actual data set. Turns out I 
> didn't remember correctly and you attach a lookup table to a "Mapper" 
> object instead.
> 
> Thanks for the thoughts.
> 
> -- 
> Mike Jackson
> imikejackson & gmail * com
> 
> On Mar 26, 2008, at 10:24 AM, Kent Eschenberg wrote:
>> 1 locks you to a colormap. 2 lets the user change the colormap as the 
>> display media and context change.
>>
>> Kent
>> Pittsburgh Supercomputing Center
>>
>> Mike Jackson wrote:
>>> 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
> 
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
> 



More information about the ParaView mailing list