[vtkusers] vtkThreshold: how to change the parameter to colour instead of remove the areas

scotsman60 doug at beachmailing.com
Fri Dec 29 14:08:14 EST 2017


Hello,

You code is setup to only visualize the cells that are output by the
threshold filter - so you're only ever going to get some portion of the
original model displayed.

I'd suggest one of tthree strategies (there are likely others)

1) Create 2 mappers/actors - one for the cells above the threshold and one
for the cells below. Feed one of the mappers with the "below threshold"
filter and one with the "above threshold" filter. Color each actor
differently and then render both actors 

2) Set up a cell scalar field and use the threshold filter to find the cells
above the threshold and change the scalar field value for these cells only -
then color the cells by scalar value using a lut. 

3) If you ONLY want to visualize the cells above some curvature value, use
the curvature field and a two color lookup table directly and avoid the
threshold filter - set up the lut to color scalar values above your desired
threshold in one color and below it in another.

Option 3 is likely way more efficient/faster than the others.

Hope this helps,

Doug



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list