<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am trying to retrieve the scalar values
associated with picked points in my polydata object. I use PointPicker to
pick the points and have a class "CallBack1" associated with the picker as
Observer to the EndPickEvent. I have used the class before and everything works
fine to get the picked coordinates, but I have trouble now accessing the scalar
array within the class.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Extract of the callback class:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><EM>void CMyCallback1:: Execute(vtkObject *caller,
unsigned long, void*)<BR>{<BR>
vtkWin32RenderWindowInteractor *iren =
reinterpret_cast<vtkWin32RenderWindowInteractor*>(caller);<BR>
vtkPointPicker *picker = (vtkPointPicker
*)iren->GetPicker();<BR> <BR> <STRONG> vtkDoubleArray
*shapeind1 = (vtkDoubleArray *)
picker->GetMapper()->GetInput()->GetPointData()->GetArray("Shape_Index");<BR> vtkDoubleArray
*curvind1 = (vtkDoubleArray *)
picker->GetActor()->GetMapper()->GetInput()->GetPointData()->GetArray("Curve_Index");<BR></STRONG>
if (picker->GetPointId() !=
-1)<BR> {</EM></FONT></DIV>
<DIV><FONT face=Arial size=2><EM> <STRONG>
..........</STRONG><BR> </EM></FONT><FONT face=Arial
size=2><EM> }<BR>}</EM></FONT></DIV>
<DIV><EM><FONT face=Arial size=2></FONT></EM> </DIV>
<DIV><FONT face=Arial size=2>If I use
"picker->GetMapper()->GetInput()->GetPointData()->GetArray("Shape_Index");", I
get the following error while compiling,</FONT></DIV>
<DIV><FONT face=Arial size=2><EM>error C2039: 'GetInput' : is not a member of
'vtkAbstractMapper3D'<BR>
c:\vtk\vtk42\rendering\vtkabstractmapper3d.h(40) : see declaration of
'vtkAbstractMapper3D'</EM></FONT></DIV>
<DIV><EM><FONT face=Arial size=2></FONT></EM> </DIV>
<DIV><FONT face=Arial size=2>If I use
"picker->GetActor()->GetMapper()->GetInput()->GetPointData()->GetArray("Curve_Index");", I
get unhandled exception errors.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there any other way of getting the associated
scalar value or getting the pointer to the polydata?</FONT></DIV>
<DIV><FONT face=Arial size=2>Any help/suggestion would
be appreciated.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks in Advance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Prathap</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>---------------------------------------------------------</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Prathap M Nair</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Research Student<BR>Multimedia and Vision
Lab<BR>Queen Mary, University of London<BR>Mile End Road, London E1 4NS
(UK)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>