how to expand a polydata?

For example, I have a polydata: the black object in the following figure.

image

Then, I hope to expand it, and I expect the result is the red object. The hole in the black object would disappear in the red object.

A possible indirectly solution is: firstly converting the black polydata into a binary mask image, then the image dilate/erode is used, finally extracting the boundary as the result.

Is there any method in vtk to directly implement it? Any suggestion is appreciated~~~

You can use implicit modeling with vtkImplicitPolyDataDistance.

@lassoan Thanks for your kindly reply.

In my understanding, your suggestion means: firstly calculate the distance map with vtkImplicitPolyDataDistance, then extract the iso-contour/iso-surface from the distance image. Am I correct?

Yes, that sounds right. VTK tests and examples show how exactly the filter can be used.