Woolz Image Processing  Version 1.7.5
WlzDomainOps

Files

file  WlzClipObjToBox.c
 Functions for clipping the domain of either 2D or 3D domain objects so that they lie within the given axis aligned biunding box.
 
file  WlzDiffDomain.c
 Functions for computing the domain difference between objects.
 
file  WlzDiffDomain3d.c
 Functions for computing the domain difference between 3D objects.
 
file  WlzDomainFill.c
 Functions to fill holes in domain objects.
 
file  WlzDomainFill3D.c
 Functions to fill holes in 3D voxel domain objects.
 
file  WlzDomainUtils.c
 Utility functions for domains.
 
file  WlzDrawDomain.c
 Functions for composing a domain from simple drawing commands.
 
file  WlzEmpty.c
 Convenience functions to check empty status of objects.
 
file  WlzFillBlankPlanes.c
 Fills blank planes of a 3D object. Originally this was used by MAPaint to allow painting of intermediate planes.
 
file  WlzIntervalCount.c
 Counts the number of intervals (or equivalent) in an object's domain.
 
file  WlzIntervalDomScan.c
 Functions for scanning through an object's interval domain.
 
file  WlzIterate.c
 Functions for iteration through Woolz objects.
 
file  WlzLBTDomain.c
 Functions for creating and manipulating linear binary tree domains.
 
file  WlzSkeleton.c
 Performs a proper interval-domain skeletonisation Hilditch's method.
 
file  WlzVolume.c
 Computes the volume of domain objects.
 
file  WlzXOR.c
 Functions for computing the set exclusive or of objects.
 

Functions

WlzObjectWlzClipObjToBox3D (WlzObject *srcObj, WlzIBox3 clipBox, WlzErrorNum *dstErrNum)
 Clips the given object's domain so that it does not lie outside the given 3D axis alaigned clip box. More...
 
WlzObjectWlzDiffDomain (WlzObject *obj1, WlzObject *obj2, WlzErrorNum *dstErr)
 Calculates the domain difference between two objects. More...
 
WlzObjectWlzDiffDomain3d (WlzObject *obj1, WlzObject *obj2, WlzErrorNum *dstErr)
 Calculates the domain difference between two 3D objects This function assumes that the object pointers have been checked to be non-NULL, non-empty, both 3D types and with non-NULL domains. This is the case if the function is accessed via WlzDiffDomain which is recommended. More...
 
WlzObjectWlzDomainFill (WlzObject *obj, WlzErrorNum *dstErr)
 Fills holes in a Woolz domain object domain. The returned object will have a NULL valuetable. More...
 
WlzObjectWlzDomainFill3D (WlzObject *srcObj, WlzErrorNum *dstErr)
 Fills the holes in the given object's domain (which are by definition not connected to the outside). When the given object's domain has more than one component part, the object should first be labeled, this function should then be called for each of the labeled parts and then the union of the filled domains should be formed. More...
 
WlzObjectType WlzDomainType (WlzDomain dom)
 Gets the type of the given domain. More...
 
void WlzBitLnSetItv (WlzUByte *bitLnP, int iLft, int iRgt, int size)
 Sets bits in the given byte packed bit line which are within the given interval. More...
 
WlzErrorNum WlzDynItvLnFromBitLn (WlzIntervalDomain *iDom, WlzUByte *bitLn, int line, int width, WlzDynItvPool *iPool)
 Adds an interval line to a interval domain given an allocated interval domain a byte packed bitmask for the interval line and a pool of available intervals. More...
 
WlzErrorNum WlzDynItvAdd (WlzIntervalDomain *iDom, WlzDynItvPool *iPool, int line, int iLft, int iLen)
 Adds an interval to a interval domain given an allocated interval domain, a pool of available intervals, the line, the intervals left most column and the intertvals width. More...
 
WlzErrorNum WlzStandardIntervalDomain (WlzIntervalDomain *idom)
 Standardises an interval domain by ensuring that it has a minaimal bounding box, striping away empty lines as required. The domain is modified "in place". More...
 
WlzErrorNum WlzStandardPlaneDomain (WlzPlaneDomain *pdom, WlzVoxelValues *voxtb)
 Standardizes a plane domain and corresponding voxel-table (voxel-tables must have exactly matching valuetables) by stripping leading and trailing NULL domains and standardising each domain in turn. The bounding box is reset to be minimal. Both the domain and values may be modified by this function. Any plane which has an invalid interval domain is discarded. More...
 
WlzObjectWlzDrawDomainObj (WlzDVertex2 org, WlzThreeDViewStruct *view, int keep2D, char *cmdStr, int *dstErrIdx, WlzErrorNum *dstErr)
 Constructs a 3D spatial domain object (without values) by drawing on a section in 3D space, using commands in the given command string. More...
 
int WlzIsEmpty (WlzObject *obj, WlzErrorNum *wlzErr)
 Convenience procedure to check if an object is empty. This include objects with zero area or volume. More...
 
WlzErrorNum WlzFillBlankPlanes (WlzObject *obj, int min_domain)
 Fill in blank planes of a 3D object. More...
 
int WlzIDomMaxItvLn (WlzIntervalDomain *iDom)
 Computes the maximum number of intervals on any line. More...
 
int WlzIntervalCount (WlzIntervalDomain *idom, WlzErrorNum *dstErr)
 Count the number of intervals or equivalent if rectangular. More...
 
WlzLong WlzIntervalCountObj (WlzObject *obj, WlzErrorNum *dstErr)
 Counts the number of intervals in an object, where the object type is WLZ_EMPTY_OBJ, WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ. Any other object type (including compound objects is an error). More...
 
WlzErrorNum WlzInitRasterScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzRasterDir raster)
 Initialise raster scanning. More...
 
WlzErrorNum WlzNextInterval (WlzIntervalWSpace *iwsp)
 Get next interval in a standard object. More...
 
WlzErrorNum WlzNextLine (WlzIntervalWSpace *iwsp, int step)
 Moving to the line which is step away from the present line (beware when both nextline() and nextinterval() are used since nextinterval() will locate the first interval in that line) More...
 
WlzErrorNum WlzInitLineScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzRasterDir raster, int scale, int firstline)
 Initialise line scanning, must be called before the first call of WlzNextLine(). More...
 
int WlzIWSpIntersection (WlzInterval *dstItv, WlzIntervalWSpace *iWSp0, WlzIntervalWSpace *iWSp1, int *dstIsn)
 Classifies the possible intersections between the intervals of the two given interval workspaces. More...
 
WlzRasterDir WlzRasterDir2D (WlzRasterDir dir)
 Masks a 2 or 3D raster direction so that it is valid for 2D. More...
 
WlzIterateWSpaceWlzIterateInit (WlzObject *obj, WlzRasterDir dir, int grey, WlzErrorNum *dstErr)
 Creates a new domain object iteration workspace that may be used to iterate through either a 2 or 3D domain object. More...
 
void WlzIterateWSpFree (WlzIterateWSpace *itWSp)
 Frees the given iteration workspace including it's interval and grey workspaces. The object and 2D object are freed if non NULL. More...
 
WlzErrorNum WlzIterate (WlzIterateWSpace *itWSp)
 Iterates through an object for which the given workspace was initialised. This function will return WLZ_ERR_EOO when there are no more pixels/voxels remaining. More...
 
WlzDomain WlzLBTDomainFromObj (WlzObject *obj, WlzErrorNum *dstErr)
 Creates a new 2D or 3D linear binary tree domain from the given object's domain. The given object must be either a 2D or 3D domain object. domain. More...
 
WlzLBTDomain2DWlzLBTDomain2DFromDomain (WlzDomain dom, WlzErrorNum *dstErr)
 Creates a new 2D linear binary tree domain from the given domain. More...
 
WlzLBTDomain3DWlzLBTDomain3DFromDomain (WlzDomain dom, WlzErrorNum *dstErr)
 Creates a new 2D linear binary tree domain from the given domain. More...
 
WlzIntervalDomainWlzLBTDomainToIDomain (WlzLBTDomain2D *lDom, WlzErrorNum *dstErr)
 Creates a new interval domain from the given 2D linear binary tree domain. More...
 
WlzPlaneDomainWlzLBTDomainToPDomain (WlzLBTDomain3D *lDom, WlzErrorNum *dstErr)
 Creates a new plane domain from the given 3D linear binary tree domain. More...
 
WlzIntervalDomainWlzIDomainFromPItv2D (int line1, int lastln, int kol1, int lastkl, int nPItv, WlzPartialItv2D *pItv, WlzErrorNum *dstErr)
 Allocates and computes an interval domain from the given table of partial intervals. The given partial intervals must fit within the given domain bounding box. More...
 
WlzPlaneDomainWlzPDomainFromPItv3D (int plane1, int lastpl, int line1, int lastln, int kol1, int lastkl, int nPItv, WlzPartialItv3D *pItv, WlzErrorNum *dstErr)
 Allocates and computes a plane domain from the given table of partial intervals. The given partial intervals must fit within the given domain bounding box. More...
 
WlzLBTDomain3DWlzLBTDomain3DFromPDomain (WlzPlaneDomain *pDom, WlzErrorNum *dstErr)
 Creates a new 3D linear binary tree domain from the given interval domain. More...
 
WlzLBTDomain2DWlzLBTDomain2DFromIDomain (WlzIntervalDomain *iDom, WlzErrorNum *dstErr)
 Creates a new 2D linear binary tree domain from the given interval domain. More...
 
WlzErrorNum WlzLBTBalanceDomain2D (WlzLBTDomain2D *lDom, WlzObject *iObj, int maxSz, int maxBndSz)
 Balances the given LBT domain so that the neighbouring nodes of each node are either of the same size or differ in size by a ratio of 2:1. The function also enforces maximum node size for all nodes and boundary nodes. The neighbour finding algorithm used is quick and simple but it requires an object in which the values are set to the corresponding LBT domain indices. For efficiency an associated interval domain may be given, if the associated domain pointer is NULL then a domain will be computed. More...
 
WlzErrorNum WlzLBTBalanceDomain3D (WlzLBTDomain3D *lDom, WlzObject *iObj, int maxSz, int maxBndSz)
 Balances the given LBT domain so that the neighbouring nodes of each node are either of the same size or differ in size by a ratio of 2:1. The function also enforces maximum node size for all nodes and boundary nodes. The neighbour finding algorithm used is quick and simple but it requires an object in which the values are set to the corresponding LBT domain indices. For efficiency an associated interval domain may be given, if the associated domain pointer is NULL then a domain will be computed. More...
 
WlzObjectWlzLBTMakeNodeIndexObj2D (WlzLBTDomain2D *lDom, WlzIntervalDomain *iDom, WlzErrorNum *dstErr)
 Creates a new 2D domain object with integer values which are the indices of the nodes containing the pixels of the domain. More...
 
WlzObjectWlzLBTMakeNodeIndexObj3D (WlzLBTDomain3D *lDom, WlzPlaneDomain *pDom, WlzErrorNum *dstErr)
 Creates a new 3D domain object with integer values which are the indices of the nodes containing the pixels of the domain. More...
 
WlzErrorNum WlzLBTIndexObjSetAllNodes2D (WlzLBTDomain2D *lDom, WlzObject *iObj)
 Sets all index values in an existing 2D LBT node index object. More...
 
WlzErrorNum WlzLBTIndexObjSetAllNodes3D (WlzLBTDomain3D *lDom, WlzObject *iObj)
 Sets all index values in an existing 3D LBT node index object. More...
 
void WlzLBTClassifyNode2D (WlzLBTDomain2D *lDom, WlzGreyValueWSpace *iGVWSp, int idN, WlzLBTNodeClass2D *dstCls, int *dstRot)
 Classifies the given LBT node by it's connectivity and returns it's class and the counter-clockwise rotation of the basic class pattern in multiples of 90 degrees. More...
 
void WlzLBTClassifyNodeFace3D (WlzLBTDomain3D *lDom, WlzGreyValueWSpace *iGVWSp, int idN, int idF, WlzDVertex3 *vtx, WlzLBTNodeClass2D *dstCls, int *dstRot)
 Classifies the given LBT node's face by it's connectivity and returns it's class and the counter-clockwise rotation of the basic class pattern, when viewed from outside of the node's cube looking at the face, in multiples of 90 degrees. This function uses the face index and orientation system defined in WlzCMeshFromBalLBTDom3D(). More...
 
int WlzLBTCountNodNbrDir2D (WlzLBTDomain2D *lDom, WlzGreyValueWSpace *iGVWSp, int idN, WlzDirection dir)
 Counts the number of neighbours of the given node in the given direction. More...
 
int WlzLBTNodeSz2D (WlzLBTNode2D *nod)
 Computes the size of a 2D linear binary tree node. More...
 
int WlzLBTNodeLogSz2D (WlzLBTNode2D *nod)
 Computes the log (base 2) of the size of a 2D linear binary tree node. More...
 
int WlzLBTNodeSz3D (WlzLBTNode3D *nod)
 Computes the size of a 3D linear binary tree node. More...
 
int WlzLBTNodeLogSz3D (WlzLBTNode3D *nod)
 Computes the log (base 2) of the size of a 3D linear binary tree node. More...
 
void WlzLBTPosToKey3D (WlzIVertex3 pos, unsigned *keys)
 Sets the value of the LBT key for the given position, where the position is relative to the first line and column of the domain. The key is encoded by interleaving the bits of the column coordinate, line coordinate, plane coordinate and term value in that order. The keys are ordered so that bit 0 is least significant. More...
 
void WlzLBTPosToKey2D (WlzIVertex2 pos, unsigned *keys)
 Sets the value of the LBT key for the given position, where the position is relative to the first line and column of the domain. The key is encoded by interleaving the bits of the column coordinate, line coordinate and term value in that order. The keys are ordered so that bit 0 is least significant. More...
 
void WlzLBTGetKeyDigits3D (unsigned *keys, WlzUByte *digits)
 Gets an array of WLZ_LBTDOMAIN_MAXDIGITS location digits from the given 3D keys. More...
 
void WlzLBTGetKeyDigits2D (unsigned *keys, WlzUByte *digits)
 Gets an array of WLZ_LBTDOMAIN_MAXDIGITS location digits from the given 2D keys. More...
 
void WlzLBTKeyToPos3I (unsigned *key, WlzIVertex3 *pos)
 Sets position (relative to the first line and column of the domain) which corresponds to the given 3D LBT key. More...
 
void WlzLBTKeyToPos2I (unsigned *key, WlzIVertex2 *pos)
 Sets position (relative to the first line and column of the domain) which corresponds to the given 3D LBT key. More...
 
void WlzLBTKeyToBox3I (unsigned *key, WlzIBox3 *box)
 Sets bounding box which corresponds to the given 3D LBT key. More...
 
void WlzLBTKeyToBox2I (unsigned *key, WlzIBox2 *box)
 Sets bounding box which corresponds to the given 2D LBT key. More...
 
WlzErrorNum WlzLBTTestOutputNodesTxt (FILE *fP, WlzDomain dom)
 Outputs the nodes of the LBT ask text for testing. More...
 
WlzErrorNum WlzLBTTestOutputNodesVtk (FILE *fP, WlzDomain dom)
 Outputs the nodes of the LBT as VTK polydata for testing. More...
 
WlzObjectWlzSkeleton (WlzObject *srcObj, int smoothpasses, WlzConnectType minCon, WlzErrorNum *dstErr)
 Computes the skeleton of the given object using Hilditch's method. See detail. More...
 
WlzLong WlzVolume (WlzObject *obj, WlzErrorNum *wlzErr)
 Calculate the volume of the input 3D domain object. More...
 
WlzObjectWlzXORDom (WlzObject *o0, WlzObject *o1, WlzErrorNum *dstErr)
 Calculates the domain exclusive or of the two given objects. The exclusive or object \(O_x\) is computed using

\[ O_x = (O_0 - O_1) \cup (O_1 - O_0) \]

where \(-\) and \(\cup\) are the set difference and union operators respectively. This seems to be slightly quicker than the alternative:

\[ O_x = (O_0 \cup O_1) - (O_1 \cap O_0) \]

. More...

 

Detailed Description

Function Documentation

WlzObject* WlzClipObjToBox3D ( WlzObject srcObj,
WlzIBox3  clipBox,
WlzErrorNum dstErrNum 
)
WlzObject* WlzDiffDomain ( WlzObject obj1,
WlzObject obj2,
WlzErrorNum dstErr 
)
WlzObject* WlzDiffDomain3d ( WlzObject obj1,
WlzObject obj2,
WlzErrorNum dstErr 
)

Calculates the domain difference between two 3D objects This function assumes that the object pointers have been checked to be non-NULL, non-empty, both 3D types and with non-NULL domains. This is the case if the function is accessed via WlzDiffDomain which is recommended.

Returns
The difference object, NULL on error.
Parameters
obj1First object.
obj2Second object.
dstErrDestination error pointer, may be NULL.

References _WlzObject::assoc, _WlzVoxelValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzVoxelValues::lastpl, _WlzPlaneDomain::line1, _WlzObject::linkcount, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzObject::plist, _WlzObject::type, _WlzCoreDomain::type, _WlzPlaneDomain::type, _WlzVoxelValues::type, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WlzAssignDomain(), WlzAssignValues(), WlzCopyDomain(), WlzDiffDomain(), WlzFreeObj(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), and WlzStandardPlaneDomain().

Referenced by WlzDiffDomain().

WlzObject* WlzDomainFill3D ( WlzObject srcObj,
WlzErrorNum dstErr 
)

Fills the holes in the given object's domain (which are by definition not connected to the outside). When the given object's domain has more than one component part, the object should first be labeled, this function should then be called for each of the labeled parts and then the union of the filled domains should be formed.

Returns
New Woolz object without holes or NULL on error.
Parameters
srcObjGiven 3D domain object.
dstErrDestination error pointer, may be NULL.

References AlcFree(), _WlzDomain::b, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzBoundList::down, _WlzGreyValueWSpace::gPtr, _WlzValues::i, _WlzDomain::i, _WlzPlaneDomain::lastpl, _WlzPolygonDomain::maxvertices, _WlzBoundList::next, _WlzPolygonDomain::nvertices, _WlzDomain::p, _WlzBoundList::poly, _WlzPixelV::type, _WlzObject::type, _WlzPolygonDomain::type, _WlzBoundList::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzBoundList::up, _WlzPixelV::v, _WlzVoxelValues::values, _WlzValues::vox, _WlzIVertex2::vtX, _WlzPolygonDomain::vtx, _WlzIVertex2::vtY, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_TAB_INTL, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_SIMPLE_FILL, WLZ_THRESH_HIGH, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignObject(), WlzAssignValues(), WlzBoundaryDomain(), WlzBoundingBox3I(), WlzBoundToObj(), WlzClipObjToBox3D(), WlzFreeBoundList(), WlzFreeObj(), WlzFreePolyDmn(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzHasIntersection(), WlzInsideDomain2D(), WlzIntersect2(), WlzLabel(), WlzMakeBoundList(), WlzMakeIntervalValues(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakePolygonDomain(), WlzMakeVoxelValueTb(), WlzObjToBoundary(), WlzStandardPlaneDomain(), WlzThreshold(), WlzUnion2(), WlzUnionN(), WlzWriteObj(), _WlzBoundList::wrap, _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzDomainFill().

WlzObjectType WlzDomainType ( WlzDomain  dom)

Gets the type of the given domain.

Returns
The type of the domain, WLZ_NULL if the domain is NULL.
Parameters
domGiven domain.

References _WlzDomain::core, _WlzCoreDomain::type, and WLZ_NULL.

void WlzBitLnSetItv ( WlzUByte bitLnP,
int  iLft,
int  iRgt,
int  size 
)

Sets bits in the given byte packed bit line which are within the given interval.

Returns
void
Parameters
bitLnPThe bit line pointer.
iLftLeft coordinate of interval.
iRgtRight coordinate of interval.
sizeNumber of bits in the bit line.

Referenced by WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzRankFilter(), WlzRsvFilterBuffer(), and WlzToArray2D().

WlzErrorNum WlzDynItvLnFromBitLn ( WlzIntervalDomain iDom,
WlzUByte bitLn,
int  line,
int  width,
WlzDynItvPool iPool 
)

Adds an interval line to a interval domain given an allocated interval domain a byte packed bitmask for the interval line and a pool of available intervals.

Returns
Woolz error code.
Parameters
iDomGiven interval domain.
bitLnByte packed bitmap for line.
lineThe line coordinate.
widthWidth of the line, ie number of valid bits in bitmask.
iPoolInterval pool.

References _WlzIntervalDomain::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_INTERVALDOMAIN_INTVL, and WlzDynItvAdd().

Referenced by WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), and WlzFromArray2D().

WlzErrorNum WlzDynItvAdd ( WlzIntervalDomain iDom,
WlzDynItvPool iPool,
int  line,
int  iLft,
int  iLen 
)

Adds an interval to a interval domain given an allocated interval domain, a pool of available intervals, the line, the intervals left most column and the intertvals width.

Returns
Woolz error code.
Parameters
iDomGiven interval domain.
iPoolInterval pool.
lineThe line.
iLftLeft most column of interval.
iLenWidth of the interval.

References ALC_ER_NONE, AlcFreeStackPush(), AlcMalloc(), _WlzIntervalDomain::freeptr, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzDynItvPool::itvBlock, _WlzDynItvPool::itvsInBlock, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, _WlzDynItvPool::offset, _WlzIntervalDomain::type, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WLZ_INTERVALDOMAIN_INTVL.

Referenced by WlzDynItvLnFromBitLn().

WlzErrorNum WlzStandardPlaneDomain ( WlzPlaneDomain pdom,
WlzVoxelValues voxtb 
)

Standardizes a plane domain and corresponding voxel-table (voxel-tables must have exactly matching valuetables) by stripping leading and trailing NULL domains and standardising each domain in turn. The bounding box is reset to be minimal. Both the domain and values may be modified by this function. Any plane which has an invalid interval domain is discarded.

Returns
Woolz error code.
Parameters
pdomGiven plane domain, must NOT be NULL..
voxtbCorresponding voxel table, maybe NULL.

References _WlzObject::assoc, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzVoxelValues::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzObject::plist, _WlzObject::type, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_PLANEDOMAIN_DATA, WlzFreeIntervalDomain(), WlzFreeValueTb(), WlzIsEmpty(), and WlzStandardIntervalDomain().

Referenced by Wlz3DSectionSegmentObject(), WlzAffineTransformGMShell(), WlzCbThreshold(), WlzClipObjToBox3D(), WlzCMeshTransformManyObjAsIdx(), WlzConstruct3DObjFromFile(), WlzConstruct3DObjFromObj(), WlzCutObjToValBox3D(), WlzDiffDomain3d(), WlzDilation(), WlzDomainFill3D(), WlzErosion(), WlzFromArray3D(), WlzIntersect3d(), WlzLabel3D(), WlzMakeCuboidObject(), WlzMakeSphereObject(), WlzSampleObjPoint3D(), WlzStructDilation(), WlzStructErosion(), WlzThinToPoints(), WlzThreshold(), and WlzUnion3d().

WlzObject* WlzDrawDomainObj ( WlzDVertex2  org,
WlzThreeDViewStruct view,
int  keep2D,
char *  cmdStr,
int *  dstErrIdx,
WlzErrorNum dstErr 
)

Constructs a 3D spatial domain object (without values) by drawing on a section in 3D space, using commands in the given command string.

Returns
New 3D spatial domain object, an empty object or NULL on error.
            The command string must have the following syntax:
        <command string> = <init command>[<command>]+<end command>
        <init command> = <ident>:<version>;
        <end command> = END:;
        <ident> = WLZ_DRAW_DOMAIN
        <version> = 1
        <command> = <command name>:[<parameter>[,<parameter>]*];
        <command name> = PEN | LINE | CIRCLE
In addition to the init and end commands, the following drawing commands are recognised:
        CIRCLE:<action>:<radius>,<x>,<y>;
        LINE:<action>:<width>,<x>,<y>,<x>,<y>;
              PEN:<action>,<width>,<x>,<y>[,<x>,<y>]*;
Where
        <action> = DRAW | ERASE
A simple example is:
        WLZ_DRAW_DOMAIN:1;
        CIRCLE:DRAW,100,200,200;
        LINE:ERASE,10,0,0,200,200;
        PEN,DRAW,4,0,0,200,0,200,200,0,200,0,0;
        END:;
The circle command draws or erases a filled circle which is specified by it's radius and centre parameters. The line command draws a rectangle using the given width and end coordinates of the mid-line. The pen command draws a polyline which is composed of a series of rectangular segments, with each segment ending in a semi-circular cap. The parameters of the pen command are the width and line segment end point coordinates. All widths, radii and coordinates may be in any floating point format recognised by scanf().
  Other commands may be present provided they have the
  same syntax described above, but they will be ignored.

  All white space characters are ignored.

    The drawn domain is offset by the given origin before being
    transformed to the section plane given by the view structure.
Parameters
orgOrigin of the 2D drawing frame with respect to the 2D Woolz object cut using the given view transform.
viewThe section plane in 3D space on which the domain is drawn. May be NULL, in which case the view transform is the default transform created by WlzMake3DViewStruct().
keep2DIgnore the view struct and keep the object 2D if this flag is non-zero.
cmdStrString with drawing commands using the syntax described above.
dstErrIdxUsed to return the index of the last character parsed in the command string. May be NULL.
dstErrDestination error pointer, may be NULL.

References ALC_STRTOK_R, AlcFree(), AlcRealloc(), _WlzDrawDomWSp::buf, _WlzDrawDomWSp::bufMax, _WlzDrawDomWSp::cmdStr, _WlzDrawDomWSp::cmdStrIdx, _WlzDrawDomWSp::savPtr, _WlzThreeDViewStruct::view_mode, _WlzDVertex2::vtX, _WlzDVertex2::vtY, Wlz3DViewTransformObj(), WLZ_3D_VIEW_STRUCT, WLZ_DRAWDOM_ACT_DRAW, WLZ_DRAWDOM_ACT_ERASE, WLZ_DRAWDOM_ACT_NONE, WLZ_DRAWDOM_CMD_CIRCLE, WLZ_DRAWDOM_CMD_END, WLZ_DRAWDOM_CMD_ERROR, WLZ_DRAWDOM_CMD_INIT, WLZ_DRAWDOM_CMD_LINE, WLZ_DRAWDOM_CMD_PEN, WLZ_DRAWDOM_CMD_UNKNOWN, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_NINT, WLZ_UP_IS_UP_MODE, WlzAssignObject(), WlzCopyObject(), WlzDiffDomain(), WlzFree3DViewStruct(), WlzFreeObj(), WlzGeomRectFromWideLine(), WlzInit3DViewStruct(), WlzMake3DViewStruct(), WlzMakeCircleObject(), WlzMakeEmpty(), WlzMakeQuadrilateral(), WlzShiftObject(), WlzStringMatchValue(), and WlzUnion2().

WlzErrorNum WlzFillBlankPlanes ( WlzObject obj,
int  min_domain 
)

Fill in blank planes of a 3D object.

Detail
A Woolz 3D object can be generated with NULL domains for any plane value (except first and last). This is equivalent to empty planes (empty domains should be used here). This procedure generates new domains to of size determined by the 3D bounding box and will add grey-tables if required. This was primarily of use if it is required to generate a sparse object, e.g. of selected key-sections, which needs to be painted.
Returns
Woolz error.
Parameters
objInput 3D woolz domain object.
min_domainMinimum domain value.
Source:
WlzFillBlankPlanes.c

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_TAB_RAGR, WLZ_INTERVALDOMAIN_RECT, WLZ_NULL, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignDomain(), WlzAssignValues(), WlzFreeObj(), WlzGetBackground(), WlzGreyTableTypeToGreyType(), WlzGreyValueTableType(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzNewIDomain(), WlzNewValueTb(), and WlzUnion2().

int WlzIDomMaxItvLn ( WlzIntervalDomain iDom)

Computes the maximum number of intervals on any line.

Returns
Maximum number of intervals on a line.
Parameters
iDomGiven interval domain.

References _WlzIntervalDomain::intvlines, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalDomain::type, WLZ_INTERVALDOMAIN_INTVL, and WLZ_INTERVALDOMAIN_RECT.

Referenced by WlzDilation(), WlzErosion(), WlzErosion4(), WlzStructDilation(), and WlzStructErosion().

int WlzIntervalCount ( WlzIntervalDomain idom,
WlzErrorNum dstErr 
)
WlzLong WlzIntervalCountObj ( WlzObject obj,
WlzErrorNum dstErr 
)

Counts the number of intervals in an object, where the object type is WLZ_EMPTY_OBJ, WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ. Any other object type (including compound objects is an error).

Returns
Number of intervals in object. This is always zero on error but may also be zero if the object has no intervals.
Parameters
objGiven object.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, and WlzIntervalCount().

WlzErrorNum WlzInitRasterScan ( WlzObject obj,
WlzIntervalWSpace iwsp,
WlzRasterDir  raster 
)

Initialise raster scanning.

Returns
Woolz error.
Parameters
objInput object too be scanned.
iwspInterval scan workspace.
rasterScanning direction.
Source:
WlzIntervalDomScan.c

References _WlzIntervalWSpace::colraster, _WlzIntervalWSpace::colrmn, _WlzDomain::core, _WlzIntervalWSpace::dmntype, _WlzObject::domain, _WlzDomain::i, _WlzIntervalWSpace::intdmn, _WlzIntervalWSpace::intrmn, _WlzIntervalDomain::intvlines, _WlzIntervalWSpace::intvln, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::linbot, _WlzIntervalDomain::line1, _WlzIntervalWSpace::lineraster, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::linrmn, _WlzIntervalWSpace::objaddr, _WlzObject::type, _WlzIntervalDomain::type, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_RASTERDIR_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_RASTERDIR_DLDC, WLZ_RASTERDIR_DLIC, WLZ_RASTERDIR_ILDC, and WLZ_RASTERDIR_ILIC.

Referenced by Wlz3DSectionSegmentObject(), Wlz3DViewTransformObj(), WlzArea(), WlzCCorS2D(), WlzCentrality(), WlzCentreOfMassVtx3D(), WlzConComThreshold(), WlzCopyObjectGreyValues(), WlzCutObjToValBox2D(), WlzDGTensorSDFeature(), WlzDiffDomain(), WlzGreySetHilbertRankValues(), WlzHasIntersection(), WlzImageBlendObjToBufRGBA(), WlzInitGreyRasterScan(), WlzIntersectN(), WlzIterate(), WlzLabel(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzLineArea(), WlzMakeIntervalValues(), WlzMeshFromObjBox(), WlzMeshIDomAdd(), WlzNewValueTb(), WlzObjToBoundary(), WlzObjToConvexPolygon(), WlzPrincipalAngle(), WlzProjectObjToPlane(), WlzReadObj(), WlzSampleObj(), WlzSkStrip4(), WlzToArray2D(), WlzUnionN(), and WlzVerticesFromObj2I().

WlzErrorNum WlzNextInterval ( WlzIntervalWSpace iwsp)

Get next interval in a standard object.

Returns
Woolz error.
Parameters
iwspInterval scanning workspace.
Source:
WlzIntervalDomScan.c

References _WlzIntervalWSpace::colpos, _WlzIntervalWSpace::colraster, _WlzIntervalWSpace::colrmn, _WlzIntervalWSpace::dmntype, _WlzInterval::ileft, _WlzIntervalWSpace::intdmn, _WlzIntervalWSpace::intpos, _WlzIntervalWSpace::intrmn, _WlzIntervalWSpace::intvln, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::lineraster, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::linrmn, _WlzIntervalLine::nintvs, _WlzIntervalWSpace::nwlpos, _WlzIntervalWSpace::rgtpos, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_INTERVALDOMAIN_INTVL, and WLZ_INTERVALDOMAIN_RECT.

Referenced by Wlz3DSectionSegmentObject(), Wlz3DViewTransformObj(), WlzArea(), WlzCCorS2D(), WlzCentrality(), WlzCentreOfMassVtx3D(), WlzConComThreshold(), WlzCopyObjectGreyValues(), WlzCutObjToValBox2D(), WlzDGTensorSDFeature(), WlzDiffDomain(), WlzGreySetHilbertRankValues(), WlzHasIntersection(), WlzImageBlendObjToBufRGBA(), WlzIntersectN(), WlzIterate(), WlzLabel(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzLineArea(), WlzMakeIntervalValues(), WlzMeshFromObjBox(), WlzMeshIDomAdd(), WlzNewValueTb(), WlzNextGreyInterval(), WlzObjToBoundary(), WlzObjToConvexPolygon(), WlzPrincipalAngle(), WlzProjectObjToPlane(), WlzReadObj(), WlzSampleObj(), WlzSeqPar(), WlzSkStrip4(), WlzToArray2D(), WlzUnionN(), and WlzVerticesFromObj2I().

int WlzIWSpIntersection ( WlzInterval dstItv,
WlzIntervalWSpace iWSp0,
WlzIntervalWSpace iWSp1,
int *  dstIsn 
)

Classifies the possible intersections between the intervals of the two given interval workspaces.

Returns
Value indicating which interval workspace should be advanced: 0 for first, 1 for second.

There are six possible cases which are returned as an intersection code. The destination interval pointer will have it's values set to cover the intersection where it exists. Given first interval F, second interval S and overlaps between the two intervals represented by O and gaps by - then the intersection codes returned are:

Code Intersection
0S-F
1F-S
2FOF or O
3SOS
4SOF
5FOS
Parameters
dstItvDestination pointer for the interval values, must be valid.
iWSp0First interval workspace, must be valid.
iWSp1Second interval workspace, must be valid.
dstIsnDestination pointer for the intersection code, may be NULL.

References _WlzInterval::ileft, _WlzInterval::iright, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, and _WlzIntervalWSpace::rgtpos.

Referenced by WlzCopyObjectGreyValues(), and WlzDGTensorSDFeature().

WlzRasterDir WlzRasterDir2D ( WlzRasterDir  dir)

Masks a 2 or 3D raster direction so that it is valid for 2D.

Returns
Returns a 2D raster direction.
Parameters
dirGiven raster direction.

References WLZ_RASTERDIR_DLDC.

Referenced by WlzIterate(), and WlzIterateInit().

WlzIterateWSpace* WlzIterateInit ( WlzObject obj,
WlzRasterDir  dir,
int  grey,
WlzErrorNum dstErr 
)

Creates a new domain object iteration workspace that may be used to iterate through either a 2 or 3D domain object.

Returns
A new domain object iteration workspace.
Parameters
objGiven object which must be either of the type WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ.
dirRaster scan direction.
greyNon-zero if grey value access is needed (not required if the object does not have grey values).
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzIterateWSpFree(), and WlzRasterDir2D().

Referenced by WlzCMeshClosePointDom2D5(), and WlzGreySetIncValues().

void WlzIterateWSpFree ( WlzIterateWSpace itWSp)

Frees the given iteration workspace including it's interval and grey workspaces. The object and 2D object are freed if non NULL.

Parameters
itWSpGiven iteration workspace.

References AlcFree(), _WlzIterateWSpace::gWSp, _WlzIterateWSpace::iWSp, _WlzIterateWSpace::obj2D, WlzEndGreyScan(), and WlzFreeObj().

Referenced by WlzCMeshClosePointDom2D5(), WlzGreySetIncValues(), and WlzIterateInit().

WlzErrorNum WlzIterate ( WlzIterateWSpace itWSp)

Iterates through an object for which the given workspace was initialised. This function will return WLZ_ERR_EOO when there are no more pixels/voxels remaining.

Returns
Woolz error code.
Parameters
itWSpGiven iteration workspace.

References AlcCalloc(), AlcMalloc(), _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzIterateWSpace::dir, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzIterateWSpace::gP, _WlzIterateWSpace::grey, _WlzIterateWSpace::gType, _WlzIterateWSpace::gWSp, _WlzGreyP::inp, _WlzIterateWSpace::itvPos, _WlzIterateWSpace::iWSp, _WlzPlaneDomain::lastpl, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::linrmn, _WlzGreyP::lnp, _WlzIterateWSpace::obj, _WlzIterateWSpace::obj2D, _WlzIntervalWSpace::objaddr, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzIterateWSpace::plnIdx, _WlzIterateWSpace::plnRmn, _WlzIterateWSpace::pos, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzObject::type, _WlzCoreDomain::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_DOMAIN, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RASTERDIR_DP, WlzFreeObj(), WlzInitGreyRasterScan(), WlzInitRasterScan(), WlzMakeMain(), WlzNextGreyInterval(), WlzNextInterval(), and WlzRasterDir2D().

Referenced by WlzCMeshClosePointDom2D5(), and WlzGreySetIncValues().

WlzDomain WlzLBTDomainFromObj ( WlzObject obj,
WlzErrorNum dstErr 
)

Creates a new 2D or 3D linear binary tree domain from the given object's domain. The given object must be either a 2D or 3D domain object. domain.

Returns
New 2D or 3D linear binary tree domain.
Parameters
objGiven object.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzDomain::l2, _WlzDomain::l3, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzLBTDomain2DFromDomain(), and WlzLBTDomain3DFromDomain().

Referenced by WlzLBTTestOutputNodesVtk().

WlzLBTDomain2D* WlzLBTDomain2DFromDomain ( WlzDomain  dom,
WlzErrorNum dstErr 
)

Creates a new 2D linear binary tree domain from the given domain.

Returns
New 2D linear binary tree domain.
Parameters
domGiven domain, which must be 2D.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzDomain::i, _WlzCoreDomain::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, and WlzLBTDomain2DFromIDomain().

Referenced by WlzCMeshFromObj2D(), and WlzLBTDomainFromObj().

WlzLBTDomain3D* WlzLBTDomain3DFromDomain ( WlzDomain  dom,
WlzErrorNum dstErr 
)

Creates a new 2D linear binary tree domain from the given domain.

Returns
New 2D linear binary tree domain.
Parameters
domGiven domain, which must be 2D.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzDomain::p, _WlzCoreDomain::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_PLANEDOMAIN_DOMAIN, and WlzLBTDomain3DFromPDomain().

Referenced by WlzCMeshFromObj3D(), and WlzLBTDomainFromObj().

WlzIntervalDomain* WlzIDomainFromPItv2D ( int  line1,
int  lastln,
int  kol1,
int  lastkl,
int  nPItv,
WlzPartialItv2D pItv,
WlzErrorNum dstErr 
)

Allocates and computes an interval domain from the given table of partial intervals. The given partial intervals must fit within the given domain bounding box.

Returns
Woolz interval domain or NULL on error.
Parameters
line1First line.
lastlnLast line.
kol1First column.
lastkllast column.
nPItvNumber of partial intervals.
pItvArray of partial intervals.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlcFreeStackPush(), AlgQSort(), _WlzIntervalDomain::freeptr, _WlzInterval::ileft, _WlzPartialItv2D::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzPartialItv2D::iright, _WlzIntervalDomain::line1, _WlzPartialItv2D::ln, _WlzIntervalLine::nintvs, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_INTERVALDOMAIN_INTVL, WlzFreeIntervalDomain(), and WlzMakeIntervalDomain().

Referenced by WlzLBTDomainToIDomain().

WlzPlaneDomain* WlzPDomainFromPItv3D ( int  plane1,
int  lastpl,
int  line1,
int  lastln,
int  kol1,
int  lastkl,
int  nPItv,
WlzPartialItv3D pItv,
WlzErrorNum dstErr 
)

Allocates and computes a plane domain from the given table of partial intervals. The given partial intervals must fit within the given domain bounding box.

Returns
Woolz interval domain or NULL on error.
Parameters
plane1First plane.
lastplLast plane.
line1First line.
lastlnLast line.
kol1First column.
lastkllast column.
nPItvNumber of partial intervals.
pItvArray of partial intervals.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlcFreeStackPush(), AlgQSort(), _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzPartialItv3D::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzPartialItv3D::iright, _WlzIntervalDomain::line1, _WlzPartialItv3D::ln, _WlzIntervalLine::nintvs, _WlzPartialItv3D::pl, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_INTERVALDOMAIN_INTVL, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignDomain(), WlzFreePlaneDomain(), WlzMakeIntervalDomain(), WlzMakePlaneDomain(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.

Referenced by WlzLBTDomainToPDomain().

WlzLBTDomain3D* WlzLBTDomain3DFromPDomain ( WlzPlaneDomain pDom,
WlzErrorNum dstErr 
)

Creates a new 3D linear binary tree domain from the given interval domain.

Returns
New 3D linear binary tree domain.
Todo:
There are two possible algorithms here: Create all possible nodes for in Morton order condensing nodes on the fly or the simpler and slower algorithm create all possible nodes in scan order and then sort to get the Morton order. Currently the latter algorithm is used but this should be replaced with the former when there's working code. time than
Parameters
pDomGiven plane domain.
dstErrDestination error pointer, may be NULL.

References ALC_ER_NONE, AlcCalloc(), AlcFreeStackPush(), _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzPlaneDomain::domains, _WlzLBTNode3D::flags, _WlzLBTDomain3D::freeptr, _WlzLBTNode3D::keys, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalWSpace::lftpos, _WlzPlaneDomain::line1, _WlzIntervalWSpace::linpos, _WlzLBTDomain3D::maxNodes, _WlzLBTDomain3D::nNodes, _WlzLBTDomain3D::nodes, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzIntervalWSpace::rgtpos, _WlzCoreDomain::type, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_DOMAIN, WLZ_ERR_EOO, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_LBT_NODE_FLAG_BOUNDARY, WLZ_LBTDOMAIN_3D, WLZ_RASTERDIR_ILIC, WlzErosion(), WlzFreeObj(), WlzInitRasterScan(), WlzInsideDomain(), WlzLBTPosToKey3D(), WlzMakeLBTDomain3D(), WlzMakeMain(), and WlzNextInterval().

Referenced by WlzLBTDomain3DFromDomain().

WlzLBTDomain2D* WlzLBTDomain2DFromIDomain ( WlzIntervalDomain iDom,
WlzErrorNum dstErr 
)

Creates a new 2D linear binary tree domain from the given interval domain.

Returns
New 2D linear binary tree domain.
Todo:
There are two possible algorithms here: Create all possible nodes for in Morton order condensing nodes on the fly or the simpler and slower algorithm create all possible nodes in scan order and then sort to get the Morton order. Currently the latter algorithm is used but this should be replaced with the former when there's working code. time than
Parameters
iDomGiven domain, which must be an interval domain.
dstErrDestination error pointer, may be NULL.

References ALC_ER_NONE, AlcCalloc(), AlcFreeStackPush(), _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzLBTNode2D::flags, _WlzLBTDomain2D::freeptr, _WlzDomain::i, _WlzLBTNode2D::keys, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzIntervalWSpace::linpos, _WlzLBTDomain2D::maxNodes, _WlzLBTDomain2D::nNodes, _WlzLBTDomain2D::nodes, _WlzIntervalWSpace::rgtpos, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_8_CONNECTED, WLZ_ERR_EOO, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_LBT_NODE_FLAG_BOUNDARY, WLZ_LBTDOMAIN_2D, WLZ_RASTERDIR_ILIC, WlzErosion(), WlzFreeObj(), WlzInitRasterScan(), WlzInsideDomain(), WlzLBTPosToKey2D(), WlzMakeLBTDomain2D(), WlzMakeMain(), and WlzNextInterval().

Referenced by WlzLBTDomain2DFromDomain().

WlzErrorNum WlzLBTBalanceDomain2D ( WlzLBTDomain2D lDom,
WlzObject iObj,
int  maxSz,
int  maxBndSz 
)

Balances the given LBT domain so that the neighbouring nodes of each node are either of the same size or differ in size by a ratio of 2:1. The function also enforces maximum node size for all nodes and boundary nodes. The neighbour finding algorithm used is quick and simple but it requires an object in which the values are set to the corresponding LBT domain indices. For efficiency an associated interval domain may be given, if the associated domain pointer is NULL then a domain will be computed.

Returns
Woolz error code.
Parameters
lDomGiven LBT domain.
iObjIndex object for finding neighbours of nodes.
maxSzMaximum node size.
maxBndSzMaximum boundary node size

References AlcCPQQueueFree(), AlcCPQQueueNew(), AlcHashTableFree(), AlcHashTableNew(), AlcRealloc(), AlgBitNextPowerOfTwo(), AlgQSort(), _WlzLBTNode2D::keys, _WlzLBTDomain2D::maxNodes, _WlzLBTDomain2D::nNodes, _WlzLBTDomain2D::nodes, WLZ_DIRECTION_DC, WLZ_DIRECTION_DL, WLZ_DIRECTION_IC, WLZ_DIRECTION_IL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WlzGreyValueFreeWSp(), WlzGreyValueMakeWSp(), WlzLBTNodeLogSz2D(), and WlzLBTNodeSz2D().

Referenced by WlzCMeshFromObj2D(), and WlzLBTTestOutputNodesVtk().

WlzErrorNum WlzLBTBalanceDomain3D ( WlzLBTDomain3D lDom,
WlzObject iObj,
int  maxSz,
int  maxBndSz 
)

Balances the given LBT domain so that the neighbouring nodes of each node are either of the same size or differ in size by a ratio of 2:1. The function also enforces maximum node size for all nodes and boundary nodes. The neighbour finding algorithm used is quick and simple but it requires an object in which the values are set to the corresponding LBT domain indices. For efficiency an associated interval domain may be given, if the associated domain pointer is NULL then a domain will be computed.

Returns
Woolz error code.
Parameters
lDomGiven LBT domain.
iObjIndex object for finding neighbours of nodes.
maxSzMaximum node size.
maxBndSzMaximum boundary node size

References AlcCPQQueueFree(), AlcCPQQueueNew(), AlcHashTableFree(), AlcHashTableNew(), AlcRealloc(), AlgBitNextPowerOfTwo(), AlgQSort(), _WlzLBTNode3D::keys, _WlzLBTDomain3D::maxNodes, _WlzLBTDomain3D::nNodes, _WlzLBTDomain3D::nodes, WLZ_DIRECTION_DC, WLZ_DIRECTION_DL, WLZ_DIRECTION_DP, WLZ_DIRECTION_IC, WLZ_DIRECTION_IL, WLZ_DIRECTION_IP, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WlzGreyValueFreeWSp(), WlzGreyValueMakeWSp(), WlzLBTNodeLogSz3D(), and WlzLBTNodeSz3D().

Referenced by WlzCMeshFromObj3D(), and WlzLBTTestOutputNodesVtk().

WlzObject* WlzLBTMakeNodeIndexObj2D ( WlzLBTDomain2D lDom,
WlzIntervalDomain iDom,
WlzErrorNum dstErr 
)

Creates a new 2D domain object with integer values which are the indices of the nodes containing the pixels of the domain.

Returns
New object with node indices or NULL on error.
Parameters
lDomGiven LBT domain.
iDomCorresponding interval domain, may be NULL.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzDomain::i, _WlzGreyV::inv, _WlzLBTDomain2D::nNodes, _WlzPixelV::type, _WlzIntervalDomain::type, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WlzAssignValues(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzFreeValueTb(), WlzGreyValueFreeWSp(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzLBTDomainToIDomain(), WlzMakeMain(), WlzNewValueTb(), and WlzSetBackground().

Referenced by WlzCMeshFromObj2D(), and WlzLBTTestOutputNodesVtk().

WlzObject* WlzLBTMakeNodeIndexObj3D ( WlzLBTDomain3D lDom,
WlzPlaneDomain pDom,
WlzErrorNum dstErr 
)

Creates a new 3D domain object with integer values which are the indices of the nodes containing the pixels of the domain.

Returns
New object with node indices or NULL on error.
Parameters
lDomGiven LBT domain.
pDomCorresponding interval domain, may be NULL.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzDomain::i, _WlzGreyV::inv, _WlzLBTDomain3D::nNodes, _WlzDomain::p, _WlzPixelV::type, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzValues::vox, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WlzAssignValues(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzFreeValueTb(), WlzGreyValueFreeWSp(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzLBTDomainToPDomain(), WlzMakeMain(), WlzNewValuesVox(), and WlzSetBackground().

Referenced by WlzCMeshFromObj3D(), and WlzLBTTestOutputNodesVtk().

WlzErrorNum WlzLBTIndexObjSetAllNodes2D ( WlzLBTDomain2D lDom,
WlzObject iObj 
)

Sets all index values in an existing 2D LBT node index object.

Returns
Woolz error code.
Parameters
lDom
iObj

References _WlzGreyV::inv, _WlzLBTDomain2D::nNodes, _WlzPixelV::type, _WlzPixelV::v, WLZ_ERR_NONE, WLZ_GREY_INT, WlzGreyValueFreeWSp(), WlzGreyValueMakeWSp(), and WlzSetBackground().

Referenced by WlzCMeshFromObj2D().

void WlzLBTClassifyNode2D ( WlzLBTDomain2D lDom,
WlzGreyValueWSpace iGVWSp,
int  idN,
WlzLBTNodeClass2D dstCls,
int *  dstRot 
)

Classifies the given LBT node by it's connectivity and returns it's class and the counter-clockwise rotation of the basic class pattern in multiples of 90 degrees.

Returns
void
Parameters
lDomLinear binary tree domain.
iGVWSpGrey workspace for index object.
idNIndex of the LBT node.
dstClsDestination pointer for the class.
dstRotDestination pointer for the rotation.

References _WlzGreyValueWSpace::gVal, _WlzGreyV::inv, _WlzLBTDomain2D::nodes, WLZ_LBT_NODE_CLASS_2D_0, WlzGreyValueGet(), WlzLBTKeyToBox2I(), WlzLBTNodeSz2D(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.

Referenced by WlzCMeshFromBalLBTDom3D().

void WlzLBTClassifyNodeFace3D ( WlzLBTDomain3D lDom,
WlzGreyValueWSpace iGVWSp,
int  idN,
int  idF,
WlzDVertex3 vtx,
WlzLBTNodeClass2D dstCls,
int *  dstRot 
)

Classifies the given LBT node's face by it's connectivity and returns it's class and the counter-clockwise rotation of the basic class pattern, when viewed from outside of the node's cube looking at the face, in multiples of 90 degrees. This function uses the face index and orientation system defined in WlzCMeshFromBalLBTDom3D().

Returns
void
Parameters
lDomLinear binary tree domain.
iGVWSpGrey workspace for index object.
idNIndex of the LBT node.
idFIndex of the face.
vtxCoordinates of the 6 vertices at the origin of faces of the LBT node's bounding box.
dstClsDestination pointer for the class.
dstRotDestination pointer for the rotation.

References ALC_ER_NONE, AlcCPQEntryInsert(), AlcCPQItemFree(), AlcCPQItemUnlink(), AlcHashItemGet(), AlcHashItemUnlink(), AlcHashTableEntryInsert(), _WlzGreyValueWSpace::bkdFlag, _AlcCPQItem::entry, _WlzGreyValueWSpace::gPtr, _WlzGreyValueWSpace::gVal, _WlzPartialItv2D::ileft, _WlzPartialItv3D::ileft, _WlzGreyP::inp, _WlzGreyV::inv, _WlzLBTNode2D::keys, _WlzLBTNode3D::keys, _WlzPartialItv2D::ln, _WlzPartialItv3D::ln, _WlzLBTDomain2D::nodes, _WlzLBTDomain3D::nodes, _WlzPartialItv3D::pl, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_DIRECTION_DC, WLZ_DIRECTION_DL, WLZ_DIRECTION_DP, WLZ_DIRECTION_IC, WLZ_DIRECTION_IL, WLZ_DIRECTION_IP, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_LBT_NODE_CLASS_2D_0, WLZ_VTX_3_ADD, WlzGreyValueGet(), WlzLBTKeyToBox2I(), WlzLBTKeyToBox3I(), WlzLBTNodeLogSz2D(), WlzLBTNodeLogSz3D(), WlzLBTNodeSz3D(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzCMeshFromBalLBTDom3D().

int WlzLBTCountNodNbrDir2D ( WlzLBTDomain2D lDom,
WlzGreyValueWSpace iGVWSp,
int  idN,
WlzDirection  dir 
)

Counts the number of neighbours of the given node in the given direction.

Returns
Number of neighbours in given direction.
Parameters
lDomGiven LBT domain.
iGVWSpGrey workspace for index object.
idNIndex of node in the LBT domain.
dirGiven direction.

References _WlzGreyValueWSpace::gVal, _WlzGreyV::inv, _WlzLBTNode2D::keys, _WlzLBTNode3D::keys, _WlzLBTDomain2D::nodes, _WlzLBTDomain3D::nodes, WLZ_DIRECTION_DC, WLZ_DIRECTION_DL, WLZ_DIRECTION_DP, WLZ_DIRECTION_IC, WLZ_DIRECTION_IL, WLZ_DIRECTION_IP, WlzGreyValueGet(), WlzLBTKeyToBox2I(), WlzLBTKeyToBox3I(), WlzLBTNodeLogSz2D(), WlzLBTNodeLogSz3D(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

int WlzLBTNodeSz2D ( WlzLBTNode2D nod)

Computes the size of a 2D linear binary tree node.

Returns
Node size: 0 on error else 1, 2, 4, ....
Parameters
nodGiven node.

References _WlzLBTNode2D::keys.

Referenced by WlzCMeshFromBalLBTDom3D(), WlzLBTBalanceDomain2D(), WlzLBTClassifyNode2D(), and WlzLBTDomainToIDomain().

int WlzLBTNodeLogSz2D ( WlzLBTNode2D nod)

Computes the log (base 2) of the size of a 2D linear binary tree node.

Returns
Node size: -1 on error else 0, 1, 2, ....
Parameters
nodGiven node.

References _WlzLBTNode2D::keys.

Referenced by WlzLBTBalanceDomain2D(), WlzLBTClassifyNodeFace3D(), and WlzLBTCountNodNbrDir2D().

int WlzLBTNodeSz3D ( WlzLBTNode3D nod)

Computes the size of a 3D linear binary tree node.

Returns
Node size: 0 on error else 1, 2, 4, ....
Parameters
nodGiven node.

References _WlzLBTNode3D::keys.

Referenced by WlzCMeshFromBalLBTDom3D(), WlzLBTBalanceDomain3D(), WlzLBTClassifyNodeFace3D(), and WlzLBTDomainToPDomain().

int WlzLBTNodeLogSz3D ( WlzLBTNode3D nod)

Computes the log (base 2) of the size of a 3D linear binary tree node.

Returns
Node size: -1 on error else 0, 1, 2, ....
Parameters
nodGiven node.

References _WlzLBTDomain2D::depth, _WlzLBTNode3D::keys, _WlzLBTDomain2D::nNodes, and _WlzLBTDomain2D::nodes.

Referenced by WlzLBTBalanceDomain3D(), WlzLBTClassifyNodeFace3D(), and WlzLBTCountNodNbrDir2D().

void WlzLBTPosToKey3D ( WlzIVertex3  pos,
unsigned *  keys 
)

Sets the value of the LBT key for the given position, where the position is relative to the first line and column of the domain. The key is encoded by interleaving the bits of the column coordinate, line coordinate, plane coordinate and term value in that order. The keys are ordered so that bit 0 is least significant.

Returns
void
Parameters
posPosition.
keysKeys to be set in line, column and term order.

References _WlzIVertex3::vtX, _WlzIVertex3::vtY, and _WlzIVertex3::vtZ.

Referenced by WlzLBTDomain3DFromPDomain().

void WlzLBTPosToKey2D ( WlzIVertex2  pos,
unsigned *  keys 
)

Sets the value of the LBT key for the given position, where the position is relative to the first line and column of the domain. The key is encoded by interleaving the bits of the column coordinate, line coordinate and term value in that order. The keys are ordered so that bit 0 is least significant.

Returns
void
Parameters
posPosition.
keysKeys to be set in line, column and term order.

References _WlzIVertex2::vtX, and _WlzIVertex2::vtY.

Referenced by WlzLBTDomain2DFromIDomain().

void WlzLBTGetKeyDigits3D ( unsigned *  keys,
WlzUByte digits 
)

Gets an array of WLZ_LBTDOMAIN_MAXDIGITS location digits from the given 3D keys.

Returns
void
Parameters
keysKeys to be read.
digitsArray of WLZ_LBTDOMAIN_MAXDIGITS digits.

References WLZ_LBTDOMAIN_MAXDIGITS.

Referenced by WlzLBTTestOutputNodesTxt().

void WlzLBTGetKeyDigits2D ( unsigned *  keys,
WlzUByte digits 
)

Gets an array of WLZ_LBTDOMAIN_MAXDIGITS location digits from the given 2D keys.

Returns
void
Parameters
keysKeys to be read.
digitsArray of WLZ_LBTDOMAIN_MAXDIGITS digits.

References WLZ_LBTDOMAIN_MAXDIGITS.

Referenced by WlzLBTTestOutputNodesTxt().

void WlzLBTKeyToPos3I ( unsigned *  key,
WlzIVertex3 pos 
)

Sets position (relative to the first line and column of the domain) which corresponds to the given 3D LBT key.

Returns
void
Parameters
keyKeys in line, column and term order.
posPosition to be set.

References _WlzIVertex3::vtX, _WlzIVertex3::vtY, and _WlzIVertex3::vtZ.

Referenced by WlzCMeshFromBalLBTDom3D(), WlzLBTDomainToPDomain(), and WlzLBTKeyToBox2I().

void WlzLBTKeyToPos2I ( unsigned *  key,
WlzIVertex2 pos 
)

Sets position (relative to the first line and column of the domain) which corresponds to the given 3D LBT key.

Returns
void
Parameters
keyKeys in line, column and term order.
posPosition to be set.

References _WlzIVertex2::vtX, and _WlzIVertex2::vtY.

Referenced by WlzCMeshFromBalLBTDom3D(), WlzLBTDomainToIDomain(), and WlzLBTKeyToBox2I().

void WlzLBTKeyToBox3I ( unsigned *  key,
WlzIBox3 box 
)

Sets bounding box which corresponds to the given 3D LBT key.

Returns
void
Parameters
keyKeys in line, column and term order.
boxPosition to be set.

References _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzCMeshFromBalLBTDom3D(), WlzLBTClassifyNodeFace3D(), WlzLBTCountNodNbrDir2D(), WlzLBTTestOutputNodesTxt(), and WlzLBTTestOutputNodesVtk().

WlzObject* WlzSkeleton ( WlzObject srcObj,
int  smoothpasses,
WlzConnectType  minCon,
WlzErrorNum dstErr 
)

Computes the skeleton of the given object using Hilditch's method. See detail.

Returns
Skeleton object, NULL on error.
Skeleton algorithm
Performs a proper interval-domain skeletonisation by Hilditch's method.

This algorithm iterates a two-stage process with three interval domain objects as follows:

Stage 1 - remove points according to algorithm:

  • (i) is current input object.
  • (ii) is current subset of (i) where a point deletion is possible.
  • (iii) is the set of points deleted during this pass

Stage 2 - tidy up for next pass:

  1. check for termination - object (iii) above empty
  2. construct new, thinned input object (i) by subtracting object (iii) from old object (i).
  3. construct new object (ii) by taking dilation of (iii) and intersecting with new (i).

The method can be further improved by reducing the number of points scanned in the first pass to edge points. These are extracted as the difference between the original object and its erosion. Implement Hilditch's tests 1-6 by table look up (48 words, 32 bits). Neighbour order is as follows:

3 2* 1
4*   0=8
5 6 7

asterisk marks neighbourswhere "removed this pass" (RTP) is relevant to algorithm

Use neighbours 0 - 4 and RTP 2 to generate an address in range 0 - 47 (neighbour 2 has three effective values: not in object previously, in object now, removed this pass), bit values as follows:

8 16/32* 4
2 - 1
- - -

or without 4 connected points:

2 16/32* 1
8 - 4
- - -

Use neighbours 5-7, RTP 4, and the smoothing criterion to generate a 5 bit bit-address, look at corresponding bit in addressed word in look-up table. If zero, retain point. Address values as follows:

- - -
8* - -
2 4 1

Thus lookup table is 48 words long, 32 bit unsigned values.

Notes
Look-up table constructed by separate program "newskelsetup.c". We must intersect potDelObj and skObj on each iteration or alternatively explicitly look at each element of potDelObj and see if a member of skObj otherwise we may decide to delete points outside skObj and then muck up points within skObj.
Source:
WlzSkeleton.c
Parameters
srcObjInput object.
smoothpassesNumber of smoothing passes to be applied.
minConMinimum connectivity required.
dstErrError return.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzMakeEmpty(), and WlzSkeleton3D().

WlzObject* WlzXORDom ( WlzObject o0,
WlzObject o1,
WlzErrorNum dstErr 
)

Calculates the domain exclusive or of the two given objects. The exclusive or object \(O_x\) is computed using

\[ O_x = (O_0 - O_1) \cup (O_1 - O_0) \]

where \(-\) and \(\cup\) are the set difference and union operators respectively. This seems to be slightly quicker than the alternative:

\[ O_x = (O_0 \cup O_1) - (O_1 \cap O_0) \]

.

Returns
Object with domain equal to the set exclusive or of the two given objects.
Parameters
o0First object.
o1Second object.
dstErrDestination error pointer, may be NULL.

References WLZ_ERR_NONE, WlzAssignObject(), WlzDiffDomain(), WlzFreeObj(), and WlzUnion2().

Referenced by WlzRegConCalcRCC().