[vtkusers] vtkPolyData filter based on texture coordinates

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Mon Jul 15 17:18:23 EDT 2002


Hi Martin,

>I have a vtkPolyData object created from a vtkOBJReader.  The .obj file
>contains texture coordinates and I want to filter/clip the vtkPolyData
based
>on a range of texture coordinates i.e. those falling within a certain
region
>of the texture bitmap.  Before I embark on writing a new filter does
anyone
>know a way of doing this using existing classes?

    If you have the vtk book (I am looking at the 2nd edition) check out pp
297 and 402, Texture Thresholding etc. The examples given there are:
texThresh.tcl, tcutSph.cxx, quadricCut.cxx. I am not sure if these examples
still exist in the current vtk.
The concept is to set the alpha value in your texture map to 0 to hide
geometry, and to 1 to show it. You could use intermediate values too. I
have never used this technique, but I guess you could do this quite easily
for a region of the texture map.

  Dave Pont





More information about the vtkusers mailing list