Interpolate between slices or remove segmentation outlier

Hello Everyone,
I have the following output from the prediction of the deep learning model. Is there any function that interpolates the segmented result of I have to remove the dots?
I have tried to use the LinearInterpolateImage filter but doesn’t work for me.
@dzenanz @Stephen_Aylward is there tool in TubeTK or Itk?
Or any tool in itksnap?

You could use the NN output before binarization by a simple threshold, and do a hysteresis thresholding similar to Canny edge detector (ITK implementation). Otherwise you have a pairwise matching problem (which ends of lines to connect together?) which is combinatorial in nature.

I couldn’t understand it properly.
What if I want to remove the dots only and not interpolating them?

Use connected component analysis, keeping only the largest component. Example.