[vtkusers] Blending the output of a mapper with another color

Bill Lorensen bill.lorensen at gmail.com
Sat Oct 6 17:15:12 EDT 2012


I think your= can create two lookup tables, one for each scalar. Then use
vtkLookupTable::MapScalarsThroughLookupTable to create two rgb outputs.

Then in a loop, do the blending between the rgb values of each output.

Finally, create a new point data that has the blended rgb values for the
polydata

On Sat, Oct 6, 2012 at 4:45 PM, Matt Sutton <matt.sutton at padtinc.com> wrote:

> Sorry to reply to my own post, but I also want this blending to occur on a
> per vertex basis.  That is, the epsilon value would be an array of the same
> length as the input scalar array passed through the lookup table.
> Regards,
> Matt
>
> Sent from my iPad
>
> On Oct 6, 2012, at 1:40 PM, "Matt Sutton" <matt.sutton at padtinc.com> wrote:
>
> I mean display all of the data with a lookup table.  What I would like to
> do is to take the color output from a lookup table and blend it with a base
> color, probably white, by a ratio say, epsilon.  Something like
> C*(1-epsilon) + epsilon*base
> I looked at the vtkLookupTableWithEnabling class thinking that it was
> close.  I actually tried creating a new class by editing a copy of that
> class (not subclassing it) but the length of the "enable" array was not
> clear to me?
> Thanks for any suggestions!
> Matt
>
> Sent from my iPad
>
> On Oct 6, 2012, at 5:04 AM, "Bill Lorensen" <bill.lorensen at gmail.com>
> wrote:
>
> When you say "contour" the data do you mean generate isosurfaces/isolines
> or do you mean display all of the data with a lookup table?
>
> On Fri, Oct 5, 2012 at 11:11 AM, Matt Sutton <matt.sutton at padtinc.com>wrote:
>
>> Hello,
>> I have two separate scalar data arrays that I would like to use for
>> coloring a poly data. One scalar will always be between 0-1.  The other
>> will have arbitrary values.  I would like to contour the poly data with the
>> arbitrary scalar quantity using a standard lookup table.  Then, I would
>> like to take the corresponding output color value for each point and blend
>> it with a base color based on the second scalar value.  Is there a filter
>> that will do this?
>> Thanks,
>> Matt
>>
>> Sent from my iPad
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20121006/3f095ee8/attachment.htm>


More information about the vtkusers mailing list