<DIV>Use the GetPointId function to get Pointid of the picked point</DIV> <DIV> </DIV> <DIV>Use to pointId to get Scalar value. U can use the </DIV> <DIV> </DIV> <DIV><BR><BR><B><I>Prathap M Nair <prathap.nair@elec.qmul.ac.uk></I></B> wrote:</DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <META content="MSHTML 6.00.2900.2769" name=GENERATOR> <STYLE></STYLE> <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>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<BR>Follow this link to subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></BLOCKQUOTE> <DIV><BR></DIV><p>
                <hr size=1> <B>Yahoo! Personals</B><BR>
Single? There's someone we'd like you to meet.<BR>
Lots of someones, actually. <a href="http://us.rd.yahoo.com/evt=36108/*http://personals.yahoo.com
">Yahoo! Personals</a>