UPDATE:
I found something. I'm not completely happy, since it feels a bit hacky, but it works.
I foud out that a viewer3d has a 'AnnotationAdded' event. The event argument passed to the event handler containes the annotation with its coordinates in world space. This can then be converted to voxel coordinates.
addlistener(app.Viewer3D, "AnnotationAdded", @OnNewAnnotation);
function OnNewAnnotation(s,e,a)
disp(e);
e.Annotation.Position % XYZ in world coordinates
end
However, I still feel, there should be an easier way to get the coordinates of the clicked voxel...