code/utils/vtklib.py
def extractclosestpointregion(polydata, point=[0, 0, 0]):
    """Extract region closest to specified point."""
    connect = vtk.vtkPolyDataConnectivityFilter()
    connect.SetInputData(polydata)
    connect.SetExtractionModeToClosestPointRegion()
    connect.SetClosestPoint(point)
    connect.Update()
    return connect.GetOutput()
Extract region closest to specified point.
Extract region closest to specified point.
Extract region closest to specified point .
def extractclosestpointregion(polydata, point=[0, 0, 0]):
    connect = vtk.vtkPolyDataConnectivityFilter()
    connect.SetInputData(polydata)
    connect.SetExtractionModeToClosestPointRegion()
    connect.SetClosestPoint(point)
    connect.Update()
    return connect.GetOutput()
def extractclosestpointregion ( polydata , point = [ 0 , 0 , 0 ] ) : connect = vtk . vtkPolyDataConnectivityFilter ( ) connect . SetInputData ( polydata ) connect . SetExtractionModeToClosestPointRegion ( ) connect . SetClosestPoint ( point ) connect . Update ( ) return connect . GetOutput ( )
Extract region closest to specified point.
Extract region closest to specified point .
"""Extract region closest to specified point."""
polydata
point