Woolz Image Processing Version 1.4.0
|
Data Structures | |
struct | _WlzBoundList |
A complete list of a set of boundaries which is encoded in tree form. More... | |
Files | |
file | WlzBoundaryUtils.c |
Simple functions that operate on boundary lists. | |
file | WlzBoundToObj.c |
Functions to convert a boundary object or domain to a domain object. | |
file | WlzObjToBoundary.c |
Computes a boundary list from a Woolz object. | |
Functions | |
WlzErrorNum | WlzBoundaryToPolyObjArray (WlzObject *bndObj, int *dstNumObjs, WlzObject ***dstObjArray) |
decomposes a boundary into it's component polygons. | |
WlzErrorNum | WlzBoundObjToPolyDomArray (WlzObject *bndObj, int *dstArySz, WlzPolygonDomain ***dstPolyAry) |
Given a boundary list object returns a simple array of polygon domains. | |
int | WlzBoundPolyCount (WlzBoundList *bnd, WlzErrorNum *dstErr) |
Count the number of polygon domains in a boundary list. | |
int | WlzBoundVtxCount (WlzBoundList *bnd, WlzErrorNum *dstErr) |
Recursive function which counts the total number of vertices in a boundary list. | |
WlzObject * | WlzBoundaryToObj (WlzObject *boundary, WlzPolyFillMode fillMode, WlzErrorNum *dstErr) |
Return a domain object corresponding to the input boundary object. | |
WlzObject * | WlzBoundToObj (WlzBoundList *bound, WlzPolyFillMode fillMode, WlzErrorNum *dstNum) |
Convert the input boundary list to a domain object. Use WlzBoundaryToObj if conversion of a 3D stack of boundary list is required or if the boundary is available as a first class object. | |
WlzObject * | WlzObjToBoundary (WlzObject *obj, int wrap, WlzErrorNum *dstErr) |
Compute the recursive boundary structure of input object "obj",with "wrap" points repeated in each boundary polygon to ensurewrap-around (usual value for drawing purposes : 1). All boundary polygon arcs lie in one of the 8 directions vertical, horizontal, diagonal. | |
WlzBoundList * | WlzBoundDecimate (WlzBoundList *bound, double maxDist, WlzErrorNum *dstErr) |
Decimate a boundary list using WlzPolyDecimate() on the boundary polylines. | |
WlzBoundList * | WlzBoundSmooth (WlzBoundList *bound, int iterations, WlzErrorNum *dstErr) |
Smooth a boundary list using WlzPolySmooth(). | |
WlzObject * | WlzBoundTo8Bound (WlzObject *gvnObj, WlzErrorNum *dstErr) |
Computes a new boundary list from the given one, such that the new boundary list has 8-connected polylines. |
WlzErrorNum WlzBoundaryToPolyObjArray | ( | WlzObject * | bndObj, |
int * | dstNumObjs, | ||
WlzObject *** | dstObjArray | ||
) |
decomposes a boundary into it's component polygons.
bndObj | Given boundary. |
dstNumObjs | Destination pointer for the number of polygons. |
dstObjArray | Destination pointer for the array of polygons. |
References AlcFree(), AlcMalloc(), _WlzValues::core, _WlzDomain::poly, WLZ_2D_POLYGON, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_NULL, WlzAssignObject(), WlzBoundObjToPolyDomArray(), WlzFreePolyDmn(), and WlzMakeMain().
WlzErrorNum WlzBoundObjToPolyDomArray | ( | WlzObject * | bndObj, |
int * | dstArySz, | ||
WlzPolygonDomain *** | dstPolyAry | ||
) |
Given a boundary list object returns a simple array of polygon domains.
bndObj | Given boundary list object. |
dstArySz | Destination ptr for array size. |
dstPolyAry | Destination ptr for the array. |
References AlcMalloc(), _WlzDomain::b, _WlzObject::domain, _WlzObject::type, WLZ_BOUNDLIST, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, and WlzBoundPolyCount().
Referenced by WlzBoundaryToPolyObjArray().
int WlzBoundPolyCount | ( | WlzBoundList * | bnd, |
WlzErrorNum * | dstErr | ||
) |
Count the number of polygon domains in a boundary list.
bnd | Given boundary list. |
dstErr | Destination ptr for error, may be NULL. |
References WLZ_ERR_DOMAIN_NULL, and WLZ_ERR_NONE.
Referenced by WlzBoundObjToPolyDomArray().
int WlzBoundVtxCount | ( | WlzBoundList * | bnd, |
WlzErrorNum * | dstErr | ||
) |
Recursive function which counts the total number of vertices in a boundary list.
bnd | Given boundary list. |
dstErr | Destination error pointer, may be NULL. |
References _WlzBoundList::down, _WlzBoundList::next, _WlzPolygonDomain::nvertices, _WlzBoundList::poly, WLZ_ERR_DOMAIN_NULL, and WLZ_ERR_NONE.
WlzObject* WlzBoundaryToObj | ( | WlzObject * | boundary, |
WlzPolyFillMode | fillMode, | ||
WlzErrorNum * | dstErr | ||
) |
Return a domain object corresponding to the input boundary object.
boundary | Input boundary object. |
fillMode | Fill mode for the individual polyline boundaries. If the input object is a genuine boundary object then there will be no self-intersecting polylines and fillMode = WLZ_SIMPLE_FILL is appropriate. See WlzPolyToObj(). |
dstErr | Error return |
References _WlzDomain::b, _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzPlaneDomain::type, _WlzObject::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_3D_DOMAINOBJ, WLZ_BOUNDLIST, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzBoundToObj(), WlzFreeObj(), WlzFreePlaneDomain(), WlzMakeEmpty(), WlzMakeMain(), and WlzMakePlaneDomain().
WlzObject* WlzBoundToObj | ( | WlzBoundList * | bound, |
WlzPolyFillMode | fillMode, | ||
WlzErrorNum * | dstNum | ||
) |
Convert the input boundary list to a domain object. Use WlzBoundaryToObj if conversion of a 3D stack of boundary list is required or if the boundary is available as a first class object.
bound | Input boundary list domain. |
fillMode | Polyline fill mode, see WlzPolyToObj(). |
dstNum | Error return. |
References _WlzBoundList::down, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, WLZ_4_CONNECTED, WLZ_BOUNDLIST_PIECE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_VERTEX_FILL, WlzDiffDomain(), WlzErosion(), WlzFreeObj(), WlzPolyToObj(), and WlzUnion2().
Referenced by WlzAffineTransformObjCb(), WlzBoundaryToObj(), WlzDomainFill(), WlzGreyMask(), WlzGreyTemplate(), and WlzTransposeObj().
WlzObject* WlzObjToBoundary | ( | WlzObject * | obj, |
int | wrap, | ||
WlzErrorNum * | dstErr | ||
) |
Compute the recursive boundary structure of input object "obj",with "wrap" points repeated in each boundary polygon to ensurewrap-around (usual value for drawing purposes : 1). All boundary polygon arcs lie in one of the 8 directions vertical, horizontal, diagonal.
obj | Input domain object. |
wrap | Number ov overlapping vertices within each polygon. |
dstErr | Error return. |
References AlcFree(), AlcMalloc(), _WlzDomain::b, WlzBoundPoint::bi, WlzBoundPoint::bl, WlzBoundPoint::bwas, _WlzDomain::core, _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, DOWN, _WlzBoundList::down, _WlzDomain::i, WlzBoundPoint::interval_props, WlzBoundPoint::k, _WlzPlaneDomain::kol1, WlzBoundPoint::l, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, WlzBoundInterval::left, LEFT_END, WlzBoundInterval::line, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzBoundList::poly, _WlzDomain::poly, WlzBoundInterval::rb, WlzBoundInterval::right, RIGHT_END, _WlzPlaneDomain::type, _WlzObject::type, UP, _WlzObject::values, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_BOUNDLIST, WLZ_BOUNDLIST_HOLE, WLZ_BOUNDLIST_PIECE, WLZ_DBG, WLZ_DBG_ALLOC, WLZ_DBG_LVL_1, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_UNSPECIFIED, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_DOMAIN, WLZ_PLANEDOMAIN_POLYGON, WLZ_POLYGON_INT, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignPolygonDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzIntervalCount(), WlzMakeBoundList(), WlzMakeMain(), WlzMakePlaneDomain(), and WlzMakePolygonDomain().
Referenced by WlzAffineTransformObjCb(), WlzDomainFill(), WlzTransposeObj(), and WlzVerticesFromObjBnd2I().
WlzBoundList* WlzBoundDecimate | ( | WlzBoundList * | bound, |
double | maxDist, | ||
WlzErrorNum * | dstErr | ||
) |
Decimate a boundary list using WlzPolyDecimate() on the boundary polylines.
bound | input boundary list |
maxDist | distance parameter to test for vertex removal |
dstErr | error return |
References _WlzBoundList::down, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzAssignBoundList(), WlzAssignPolygonDomain(), WlzFreeBoundList(), WlzMakeBoundList(), WlzPolyDecimate(), and _WlzBoundList::wrap.
WlzBoundList* WlzBoundSmooth | ( | WlzBoundList * | bound, |
int | iterations, | ||
WlzErrorNum * | dstErr | ||
) |
Smooth a boundary list using WlzPolySmooth().
bound | input boundary list |
iterations | number of iterations for smoothing the polylines |
dstErr | error return |
References _WlzBoundList::down, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzAssignBoundList(), WlzAssignPolygonDomain(), WlzFreeBoundList(), WlzMakeBoundList(), WlzPolySmooth(), and _WlzBoundList::wrap.
WlzObject* WlzBoundTo8Bound | ( | WlzObject * | gvnObj, |
WlzErrorNum * | dstErr | ||
) |
Computes a new boundary list from the given one, such that the new boundary list has 8-connected polylines.
gvnObj | Object with given boundary list. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::b, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzBoundList::down, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, _WlzObject::type, WLZ_BOUNDLIST, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WlzFreeObj(), WlzMakeBoundList(), WlzMakeMain(), WlzPolyTo8Polygon(), and _WlzBoundList::wrap.