Can I pick the point on pointcloud just like picture?

def pick(obj,event):

        clickPos = obj.GetEventPosition()
        #print (clickPos)
        picker.Pick(clickPos[0], clickPos[1], 0, ren)
        p=picker.GetPickPosition()
        print ('position:',p)

Hello, friend.

What class is picker instance of? Make sure you’re using vtkPointPicker: https://vtk.org/doc/nightly/html/classvtkPointPicker.html .

all the best,

Paulo

Thanks.
I get the correct point position by changing the picker from the cellpicker to pointpick after reading your recommend api.
Thank you very much!
Li zhenzhu

1 Like