[vtkusers] Mappers and vtkLookupTable

Allen Sanderson allen at sci.utah.edu
Tue Feb 16 20:12:16 EST 2016


A colleague also pointed me to the vtkTubeFilter and I am using that successfully.

Thanks.

Cheers,

Allen


Allen Sanderson
SCI Institute
University of Utah
www.sci.utah.edu



> On Feb 16, 2016, at 3:44 PM, Cory Quammen <cory.quammen at kitware.com> wrote:
> 
> Allen,
> 
> I don't know of a way to set the line width based on a variable in
> stock VTK. Maybe you could do something with a custom geometry shader,
> which you can set in the OpenGL2 backend version of
> vtkOpenGLPolyDataMapper via SetGeometryShaderCode(const char*).
> 
> Another approach could be using vtkTubeFilter to automatically set the
> radius of the cylinders. The input to this filter should be a set of
> line segments with point data with your variable for each line defined
> at each endpoint of the line.
> 
> HTH,
> Cory
> 
> On Tue, Feb 16, 2016 at 5:32 PM, Allen Sanderson <allen at sci.utah.edu> wrote:
>> Thanks David, we thought that was the case.
>> 
>> Let me ask a somewhat parallel question. When rendering lines one typically
>> sets a line width and sends the geometry downstream. The lines will be
>> colored base on a variable but the line width is constant. At the same time
>> when doing point glyphs we set the color and size based on a variable. If we
>> wanted to vary the line width using a variable is our only choice to use a
>> cylinder?
>> 
>> Cheers,
>> 
>> 
>> Allen
>> 
>> 
>> 
>> Allen Sanderson
>> 
>> SCI Institute
>> 
>> University of Utah
>> 
>> www.sci.utah.edu
>> 
>> 
>> 
>> 
>> On Feb 16, 2016, at 12:20 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>> 
>> Hi Allen,
>> 
>> You are correct, vtkLookupTable does not provide a way of doing this.
>> 
>> I'm not sure what work-arounds there are for geometry, but for images
>> you can map the RGB and A separately, and then combine them into
>> RGBA with vtkImageAppendComponents.
>> 
>> - David
>> 
>> 
>> On Tue, Feb 16, 2016 at 11:48 AM, Allen Sanderson <allen at sci.utah.edu>
>> wrote:
>>> 
>>> Hello,
>>> 
>>> We are trying to render geometry using a lookup table for the RGB value
>>> using one scalar variable, but we want to use a secondary scalar variable
>>> for determining the opacity.  Something like the following:
>>> 
>>> RGB -> variable one
>>> A -> variable two
>>> 
>>> In looking through the VTK 6 documentation on mappers we have not found
>>> anything that leads us to believe this functionality is possible. But we
>>> have done an exhaustive search.
>>> 
>>> If it is possible we would greatly appreciate pointers. Thanks.
>>> 
>>> 
>>> 
>>> Cheers,
>>> 
>>> Allen
>>> 
>>> 
>>> Allen Sanderson
>>> SCI Institute
>>> University of Utah
>>> www.sci.utah.edu
>> 
>> 
>> _______________________________________________
>> 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
>> 
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>> 
>> 
>> 
>> _______________________________________________
>> 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
>> 
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>> 
> 
> 
> 
> -- 
> Cory Quammen
> R&D Engineer
> Kitware, Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160216/f02c1613/attachment.html>


More information about the vtkusers mailing list