| image = | enforceConvexity3dImg (inImg,halfKnlSize) |
| image = | enforceConvexity3dImg (inImg,halfKnlSize,nbAngles) |
Removes concavities in the object of the 3d input image.
This algorithm modifies the 3D objects in the images to make them convex. The parameter halfKnlSize is the size of the biggest concavity to fill.
The algorithms relies on pair of oriented half linear structuring elements. For a given orientation, two opposite oriented half linear structuring elements are used to find neighbours with the same value. If such a neighbour is found, the same value is assigned to the current voxel.
The number of structuring element pairs is defined by the optional parameter nbAngles. This means that more the number of angles is high, more the result will be smooth but will require more calculations.
Here is an example of a result :
Possible artifacts: if the structuring element size is not long enough, only some voxels of the concavity will be filled, leading to undesired partial growth. Pleanse, see Enforce Convexity 3d for an illustration of such artifact.