Hello!
I am trying to extract enclosed points of a point cloud inside a polydata using VTK.
Extracting the points (with vtkExtractEnclosedPoints) seems to work. However, there are outlier points that aren’t inside the polydata that are still there.
I’m trying to remove them using vtkStatisticalOutlierRemoval but Slicer crashes when I call the Update() function. I have tried using vtkRadiusOutlierRemoval but it does not seem to do anything (but it doesn’t make Slicer crash.)
I have created a C++ script independant from Slicer and used vtkStatisticalOutlierRemoval there and things are working well.
I’ve solved the issue by using a markup closed curve to draw the region of interest. It’s quicker to compute and creates a cleaner shape.
I cannot share the mosaic but the issue is the same using randomly generated points (like on the ExtractEnclosedPoints example).
The customShape is actually the closedSurfacePolyData inside the updateBrushModel function in the scissor script (qSlicersegmentBreastScissorWidget) on the SegmentEditor. My guess is that it might have tiny polygons and points but i’m not sure.
Sorry for the late reply, it seems like I’ve managed to make it work by using vtkVertexGlyphFilter before displaying the polydata
Thank you for your help!