How to judge whether a point in a model node (3d model)

hello everyone, i suppose to judge whether a point inside or outside with 3D model, how i can do this? i tried to use vtk.vtkSelectEnclosedPoints() but it dosent work

You can use vtkImplicitPolyDataDistance to get distance of a point from a surface. If the distance is negative then the point is inside the mesh. You can find a complete example in the script repository.

For very large or complex or slightly invalid meshes vtkImplicitPolyDataDistance may be slow or unreliable. In this case you may consider converting the model to a labelmap volume node (using Segmentation module). This conversion is not trivial and may give slightly different result at the boundary (due to finite resolution of the image volume), but checking if a position is inside a volume is very quick and guaranteed to always succeed.

i got it, thanks for reply