[vtkusers] Can cell ids be determined for textures?

Dean Inglis dean.inglis at on.aibn.com
Wed Dec 18 14:35:54 EST 2002


Hi,

I am trying to get cursor snapping on oblique planes
working for vtkImagePlaneWidget (IPW).

The IPW pipeline consists of a moveable/scaleable vtkPlaneSource 
that passes its polydata to a vtkTextureMapToPlane (TMTP).
The TMTP generates texture coords at the 4 pts making
up the plane's boundary.  TMTP's output (a vtkDataSet) passes to a
vtkDataSetMapper (DSM) which internally converts the TMTP
dataset to polydata which in turn is passed to an internal
vtkPolyDataMapper.  Apparently, there is only one cell: a 
poly defined by 4 pts representing the geometry of a slice, so
this cannot be interrogated by picking for cursoring.

IPW's internal vtkImageReslice passes its resliced vtkImageData
to a vtkImageMapToColors and then to a vtkTexture.  The actor
presenting an actual slice combines the geometry of the plane
with the (possibly resampled) texture data from, for example,
a vtkOpenGLTexture, apparently without the use of either explicit or
implicit topological representation which can be queried in the
'usual' vtk manner.  For example, if one replaces the sphere in  
/Examples/Annotation/Tcl/labeledMesh.tcl with the texture
mapped plane of /Examples/Rendering/Tcl/TPlane.tcl, the pt or
cell id's that are shown can only correspond to the plane and not
it's texture data since the texture has no vtk cells.

So, is anyone aware of a way to generate something
to pick or alternatively, given a 3D world pt, get the nearest
'pixel' center/data pt of a texture map???  Hints, anyone???

Dean






More information about the vtkusers mailing list