Back to FabImage Library website
You are here: Start » Function Reference » Region » Region Morphology » PruneRegion

PruneRegion
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationBasic |
Removes one pixel wide branches from a region.
Syntax
C++
C#
void fil::PruneRegion ( const fil::Region& inRegion, const int inMaxLength, fil::Region& outRegion )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inRegion | const Region& | Input region | ||
![]() |
inMaxLength | const int | 0 - ![]() |
3 | Maximal length of a branch of the input region to be pruned |
![]() |
outRegion | Region& | Output region |
Description
The operation removes all branches with length at most inMaxLength from the input region. The branches being removed have to be at most one pixel wide, so the filter should be invoked on thinned regions such as the results of SkeletonizeRegion operation only.
Examples
![]() |
![]() |
PruneRegion run on a sample one pixel wide region with inMaxLength = 58.
See Also
- SkeletonizeRegion – Thins a region to its skeleton.