[vtkusers] extract texture color from a vertex

marco piccima at gmail.com
Thu Dec 18 11:19:47 EST 2014


Hello,
I want to get the texture value from a cell!
I have the cellid as result of intersectWithLine.

After I get the list of vertices of the cell:
     vtkIdList* nghList = vtkIdList::New();
      source->GetCellPoints(cellId, nghList);
I iterate through the points in order to get their texture coordinates 
and interpolate them in the intersection position.
Then with the (interpolated) texture coordinates, access the texture 
image to get the RGB point color!

Is there a method faster than that?

Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141218/ae5021c0/attachment.html>


More information about the vtkusers mailing list