The resulted surface is enhenced but it is still contains smalll holes. My question is how can I fill in holes in vtkImageData or in mesh in order to get a closed 3D surface without holes.
Isosurface extracted from an unprocessed image is expected to be noisy. You can greatly improve quality by applying Gaussian smoothing, but that will also remove fine details. You can try non-linear filters, such as median or various anisotropic smoothing, which may preserve details while removing certain noise types. These filters (and many more) are available in “Simple filters” module.
However, most of the time you cannot extract structures by simple thresholding/isosurface extraction but you need to use various segmentation tools. You can find many of them in Segment Editor (and there are several extensions that installs provides additional ones).
Im trying to create the model from the 3D coordinate points that are stored in the txt file (and not a segment). I use the Marching cubes algorithm. It looks like it´s not able to link individual points, and therefore holes are created in the model.
I tried vtkImageOpenClose3D.h to close the holes but it seems do not give good results .
What software produces this text file?
Do the coordinate correspond to a list of planar contours (coming from a DICOM RT structure set)?
Or some software lists each individual voxel value of a binary labelmap (that would be extremely inefficient)?
I have created points from segmentation and generated surface to do some tests. I have resapmled and used vtkImageOpenClose3D. Now it works fine (all holes are filled