image = | keepBigShape3dImg (inBinLabImg3d,inNbFeatures) |
keep only the big connected components in binary or label 3d image
This algorithm allows to remove the smallest connected components into a binary or label 3d input image, keeping only the inNbFeatures biggest features.
The output result image OutImg has same type as input image InBinLabImg3d. This means that an input binary image will produce an output binary image and that an input label image will produce an output label image. Note that in label case, input labels index are reordered to fill index list holes created by shape filtering . Moreover, the biggest the feature will be assigned to the lowest label and the smallest selected feature will be assigned to the highest label.
Here is an example of small connected component removal on an image 3d :