Woolz Image Processing  Version 1.8.3
WlzAllocation

Files

file  WlzAssign.c
 Woolz objects domains and values maintain a linkcount, which records it's usage by other objects, domains or values. To increment a linkcount the appropriate assignment function should be used.
 
file  WlzBuildObj.c
 Functions to allow spatial domain objects with values to be built incrementally.
 
file  WlzConstruct3D.c
 Functions to construct 3D domain objects from 2D domain objects.
 
file  WlzCopy.c
 Functions to make 'deep' copies of objects.
 
file  WlzFreeSpace.c
 Functions for freeing objects and their components.
 
file  WlzMakeCompound.c
 Makes compound objects.
 
file  WlzMakeIntervalValues.c
 Makes an interval values table.
 
file  WlzMakeStructs.c
 Functions for allocating woolz structures.
 
file  WlzTiledValues.c
 Functions construct and convert tiled objects.
 

Functions

WlzObjectWlzAssignObject (WlzObject *obj, WlzErrorNum *dstErr)
 Assign an object (increment it's linkcount) by first checking for NULL, then the value of linkcount, before incrementing the linkcount. If used concientiously, assignment should avoid memory errors. More...
 
WlzCompoundArrayWlzAssignCompoundArray (WlzCompoundArray *obj, WlzErrorNum *dstErr)
 Assign a compound array (increment it's linkcount) by first checking for NULL, then the value of linkcount, before incrementing the linkcount. If used concientiously, assignment should avoid memory errors. More...
 
WlzDomain WlzAssignDomain (WlzDomain domain, WlzErrorNum *dstErr)
 Assign a domain by incrementing it's linkcount. More...
 
WlzValues WlzAssignValues (WlzValues values, WlzErrorNum *dstErr)
 Assign a values by incrementing it's linkcount. More...
 
WlzProperty WlzAssignProperty (WlzProperty property, WlzErrorNum *dstErr)
 Assign a property by incrementing it's linkcount. More...
 
WlzAffineTransformWlzAssignAffineTransform (WlzAffineTransform *trans, WlzErrorNum *dstErr)
 Assign an affine transform by incrementing it's linkcount. More...
 
WlzTransform WlzAssignTransform (WlzTransform t, WlzErrorNum *dstErr)
 Assign a transform by incrementing it's linkcount. More...
 
WlzThreeDViewStructWlzAssign3DViewStruct (WlzThreeDViewStruct *viewStr, WlzErrorNum *dstErr)
 Assign an woolz 3D view structure by incrementing it's linkcount. More...
 
WlzBoundListWlzAssignBoundList (WlzBoundList *blist, WlzErrorNum *dstErr)
 Assign a boundary list by incrementing it's linkcount. More...
 
WlzPolygonDomainWlzAssignPolygonDomain (WlzPolygonDomain *poly, WlzErrorNum *dstErr)
 Assign a polygon domain by incrementing it's linkcount. More...
 
WlzGMModelWlzAssignGMModel (WlzGMModel *model, WlzErrorNum *dstErr)
 Assign a geometric model by incrementing it's linkcount. More...
 
int WlzUnlink (int *linkcount, WlzErrorNum *dstErr)
 Unlink an object, domain or values by decrementing and testing it's linkcount. More...
 
WlzBSplineWlzMakeBSpline (WlzObjectType type, int order, int maxKnots, WlzErrorNum *dstErr)
 Creates a new B-spline domain. This can be freed using using WlzFreeDomain(). More...
 
WlzErrorNum WlzFreeBSpline (WlzBSpline *bs)
 Frees a B-spline domain. More...
 
WlzBSplineWlzBSplineCopy (WlzBSpline *srcBS, WlzErrorNum *dstErr)
 Copies a B-spline domain. More...
 
WlzObjectWlzBuildObj3U (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, WlzUByte *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with WlzUByte values. More...
 
WlzObjectWlzBuildObj3S (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, short *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with short values. More...
 
WlzObjectWlzBuildObj3I (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, int *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with int values. More...
 
WlzObjectWlzBuildObj3F (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, float *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with float values. More...
 
WlzObjectWlzBuildObj3D (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, double *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with double values. More...
 
WlzObjectWlzBuildObj3R (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, int bufSz, WlzUInt *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with RGBA values. More...
 
WlzObjectWlzBuildObj3B (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, WlzGreyType gType, int bufSz, char *buf, WlzErrorNum *dstErr)
 Wrapper for WlzBuildObj3() with buffer passed as bytes. More...
 
WlzObjectWlzBuildObj3 (WlzObject *cObj, WlzIVertex3 og, WlzIVertex2 sz, WlzGreyType gType, int bufSz, WlzGreyP bufP, WlzErrorNum *dstErr)
 Creates a new or adds to an existing 3D spatial domain object using a rectangular buffer of values to a single plane of the given current object (which may be NULL or empty if the object is to be created). The returned object will share domains and values of planes other than the given plane with the current object. More...
 
WlzObjectWlzConstruct3DObjFromFile (int nFileStr, char **fileStr, int plane1, float xSz, float ySz, float zSz, WlzErrorNum *dstErr)
 Constructs a 3D domain object from 2D domain objects read from the given files. Each file is read in turn and added to the 3D object. An empty plane can be specified by setting the file string to NULL. Either all or none of the 2D objects must have values. When the 2D objects have values then the background value of the first 2D object is set to be the background value of the 3D object. More...
 
WlzObjectWlzConstruct3DObjFromObj (int nObjs, WlzObject **objs, int plane1, float xSz, float ySz, float zSz, WlzErrorNum *dstErr)
 Constructs a 3D domain object from 2D domain objects. Each 2D object is assigned in turn to the 3D object no domains or values are copied. An empty can be specified by setting the 2D object to NULL. Either all or none of the 2D objects must have values. When the 2D objects have values then the background value of the first 2D object is set to be the background value of the 3D object. More...
 
WlzObjectWlzCopyObject (WlzObject *inObj, WlzErrorNum *dstErr)
 Copies a Woolz object together with it's domain, values and properties and then returns the copy. More...
 
WlzDomain WlzCopyDomain (WlzObjectType inObjType, WlzDomain inDom, WlzErrorNum *dstErr)
 Copies the given objects domain. More...
 
WlzValues WlzCopyValues (WlzObjectType inObjType, WlzValues inVal, WlzDomain inDom, WlzErrorNum *dstErr)
 Copies the given values. More...
 
WlzPropertyListWlzCopyPropertyList (WlzPropertyList *gList, WlzErrorNum *dstErr)
 Copies the given property list. More...
 
WlzIndexedValuesWlzCopyIndexedValues (WlzIndexedValues *inV, WlzErrorNum *dstErr)
 Copies the given indexed values. More...
 
WlzErrorNum WlzCopyObjectGreyValues (WlzObject *dObj, WlzObject *sObj)
 Copies the grey values of the source object to the destination object, overwriting the values of the destination object. More...
 
WlzErrorNum WlzFreeObj (WlzObject *obj)
 Free space allocated to a woolz object. More...
 
WlzErrorNum WlzFreeCompoundArray (WlzCompoundArray *obj)
 Free space allocated to a woolz compound array object. More...
 
WlzErrorNum WlzFreeIntervalDomain (WlzIntervalDomain *idom)
 Free an interval domain - convenience link to WlzFreeDomain() More...
 
WlzErrorNum WlzFreeHistogramDomain (WlzHistogramDomain *hist)
 Free a histogram domain. More...
 
WlzErrorNum WlzFreeDomain (WlzDomain domain)
 Free a domain structure of any type. All domain structures must have a type and linkcount. Most also have a freeptr by which, if set, all the space allocated can be freed, however there are some special cases. More...
 
WlzErrorNum WlzFreePlaneDomain (WlzPlaneDomain *planedm)
 Free a planedomain. More...
 
WlzErrorNum WlzFreeValueTb (WlzRagRValues *vdmn)
 Convenience routine to free a ragged rect valuetable. More...
 
WlzErrorNum WlzFreeValues (WlzValues values)
 Free a values structure, currently only WlzRagRValues and WlzRectValues DO NOT call this function with any other values structure types! More...
 
WlzErrorNum WlzFreeVoxelValueTb (WlzVoxelValues *voxtab)
 Free a voxel value table. More...
 
WlzErrorNum WlzFreePolyDmn (WlzPolygonDomain *poly)
 Free a polygon domain. More...
 
WlzErrorNum WlzFreeBoundList (WlzBoundList *b)
 Recursively free a boundary list. More...
 
WlzErrorNum WlzFree3DWarpTrans (Wlz3DWarpTrans *obj)
 Free a 3D warp transform. More...
 
WlzErrorNum WlzFreeContour (WlzContour *ctr)
 Free's a WlzContour data structure. More...
 
WlzErrorNum WlzFreeIndexedValues (WlzIndexedValues *ixv)
 Frees an indexed valuetable. More...
 
WlzErrorNum WlzFreePointValues (WlzPointValues *pv)
 Frees a points valuetable. More...
 
WlzLBTDomain2DWlzMakeLBTDomain2D (WlzObjectType type, int l1, int ll, int k1, int kl, WlzErrorNum *dstErr)
 Creates a linear binary tree domain without creating any nodes, leaving the nodes pointer NULL. Only the type, bounding box and depth are set. The depth \(d\) is set such that

\[ 2^d >= \max(k_l - k_1, l_l - l_1) + 1 \]

where \(k_1\), \(k_l\), \(l_1\) and \(l_l\) are the first column, last column, first line and last line respectively. More...

 
WlzLBTDomain3DWlzMakeLBTDomain3D (WlzObjectType type, int p1, int pl, int l1, int ll, int k1, int kl, WlzErrorNum *dstErr)
 Creates a linear binary tree domain without creating any nodes, leaving the nodes pointer NULL. Only the type, bounding box and depth are set. The depth \(d\) is set such that

\[ 2^d >= \max(p_l - p_1, k_l - k_1, l_l - l_1) + 1 \]

where \(k_1\), \(k_l\), \(l_1\) and \(l_l\) are the first column, last column, first line and last line respectively. More...

 
WlzErrorNum WlzFreeLBTDomain3D (WlzLBTDomain3D *lDom)
 Frees the given 3D linear binary tree domain. More...
 
WlzErrorNum WlzFreeLBTDomain2D (WlzLBTDomain2D *lDom)
 Frees the given 2D linear binary tree domain. More...
 
WlzCompoundArrayWlzMakeCompoundArray (WlzObjectType type, int mode, int n, WlzObject **ol, WlzObjectType otype, WlzErrorNum *dstErr)
 Makes a new Woolz compound array object. More...
 
WlzIntervalValuesWlzMakeIntervalValues (WlzObjectType type, WlzObject *obj, WlzPixelV bckgrnd, WlzErrorNum *dstErr)
 Make in interval values table to match the input object The table will have linkcount set to zero. More...
 
WlzIntervalDomainWlzMakeIntervalDomain (WlzObjectType type, int l1, int ll, int k1, int kl, WlzErrorNum *dstErr)
 Allocate space for an interval domain structure. If the type is WLZ_INTERVALDOMAIN_INTVL then allocate space for the interval line array and set the pointer. More...
 
WlzPlaneDomainWlzMakePlaneDomain (WlzObjectType type, int p1, int pl, int l1, int ll, int k1, int kl, WlzErrorNum *dstErr)
 Allocate space for a plane domain and the domain pointers. More...
 
WlzObjectWlzNewObjectValues (WlzObject *sObj, WlzObjectType tType, WlzPixelV bgdV, int setFG, WlzPixelV fgdV, WlzErrorNum *dstErr)
 Creaes a new object with the domain of the given object and a new values. More...
 
WlzVoxelValuesWlzNewValuesVox (WlzObject *sObj, WlzObjectType gTType, WlzPixelV bgdV, WlzErrorNum *dstErr)
 From the domain of the given source object a new voxel value table is created with the given grey type and background value. More...
 
WlzObjectWlzMakeMain (WlzObjectType type, WlzDomain domain, WlzValues values, WlzPropertyList *plist, WlzObject *assoc, WlzErrorNum *dstErr)
 Make a top-level woolz object assigning domain, values and other pointers as required . The type is checked. The domain is not checked for NULL although this should only apply to the WLZ_EMPTY_OBJ. More...
 
WlzRagRValuesWlzMakeValueTb (WlzObjectType type, int l1, int ll, int k1, WlzPixelV backgrnd, WlzObject *orig, WlzErrorNum *dstErr)
 Allocate and initialise space for a ragged-rectangle value table only. More...
 
WlzVoxelValuesWlzMakeVoxelValueTb (WlzObjectType type, int p1, int pl, WlzPixelV backgrnd, WlzObject *orig, WlzErrorNum *dstErr)
 Allocate space for a voxel table. More...
 
WlzRectValuesWlzMakeRectValueTb (WlzObjectType type, int line1, int lastln, int kol1, int width, WlzPixelV backgrnd, int *values, WlzErrorNum *dstErr)
 Make rectangular value table attaching values if set. Note the values pointer is just copied and will not be freed when the object is freed unless the freeptr is set using AlcFreePointerPush(). More...
 
WlzErrorNum WlzMakeInterval (int line, WlzIntervalDomain *idom, int nints, WlzInterval *intptr)
 Attach and interval pointer to a an interval domain in the appropriate place and set the number of intervals on the line. Note this procedure makes no checks on the arguments because it is often used in deeply nested loops. More...
 
WlzErrorNum WlzMakeValueLine (WlzRagRValues *vtb, int line, int k1, int kl, int *greyptr)
 Attach the grey values for a valueline within a ragged- rectangle value table. Not this procedure does not check the input arguments because it is often at the core of nested loops. More...
 
WlzPointValuesWlzNewPointValues (WlzObject *obj, int rank, int *dim, WlzGreyType vType, WlzErrorNum *dstErr)
 Makes a new point value table which covers the points of the given object. More...
 
WlzPointValuesWlzMakePointValues (size_t nP, int rank, int *dim, WlzGreyType vType, WlzErrorNum *dstErr)
 Makes a new point value table with space for the requested number of points. More...
 
WlzPolygonDomainWlzMakePolygonDomain (WlzObjectType type, int n, WlzIVertex2 *vertices, int maxv, int copy, WlzErrorNum *dstErr)
 Makes a polygon domain, allocating space and copying vertices as required acording to the copy flag. The polygon domain must be freed when longer required using WlzFreePolyDmn(). More...
 
WlzBoundListWlzMakeBoundList (WlzObjectType type, int wrap, WlzPolygonDomain *poly, WlzErrorNum *dstErr)
 Allocate space and initialise a boundlist structure. More...
 
WlzIVertex2WlzMakeIVertex (int nverts, WlzErrorNum *dstErr)
 Make an integer vertex array. More...
 
WlzObjectWlzMakeRect (int line1, int lastln, int kol1, int lastkl, WlzGreyType pixeltype, int *grey_values, WlzPixelV backgrnd, WlzPropertyList *plist, WlzObject *assoc_obj, WlzErrorNum *dstErr)
 Make a top-level rectangular object, setting values if non-NULL, uses WlzMakeRectValueTb() to assign values which by default will not be freed when the object is freed. The freeptr needs to be explicitly set by the calling procedure. This is a convenience procedure calling WlzMakeIntervalDomain() then WlzMakeRectValueTb() then WlzMakeMain(). More...
 
WlzObjectWlzNewObjectValueTable (WlzObject *gObj, WlzPixelV bgdV, WlzErrorNum *dstErr)
 Creates a new Woolz object using the given object's domain and a new value table, but uses the grey values of the given object's value table. More...
 
WlzObjectWlzMakeCuboid (int plane1, int lastpl, int line1, int lastln, int kol1, int lastkl, WlzGreyType pixType, WlzPixelV bgdV, WlzPropertyList *plist, WlzObject *assocObj, WlzErrorNum *dstErr)
 Creates a 3D domain object with values, for which the domain is a cuboid and the values are of the given type and initialized to have value zero. More...
 
WlzHistogramDomainWlzMakeHistogramDomain (WlzObjectType type, int maxBins, WlzErrorNum *dstErr)
 Allocates space for a histogram domain with the space for the given maximum number of bins of the appropriate type. More...
 
WlzObjectWlzMakeEmpty (WlzErrorNum *dstErr)
 Convenience procedure to make a top-level empty object. More...
 
WlzObjectWlzMakeHistogram (WlzObjectType type, int maxBins, WlzErrorNum *dstErr)
 Convenience procedure to make a top-level object with a histogram domain. More...
 
WlzObjectWlzNewGrey (WlzObject *iobj, WlzErrorNum *dstErr)
 Make a top-level object with the same domain as iobj (pointer copied and linkcount incremented) and new valuetable with values copied from iobj. If iobj has no valuetable then the returned object will have no value- table. This allows a copy of a 2D grey-value object. More...
 
WlzRagRValuesWlzNewValueTb (WlzObject *obj, WlzObjectType type, WlzPixelV backgrnd, WlzErrorNum *dstErr)
 Create a value table of required type with the same size and shape as the domain of obj. This must be of type WLZ_2D_DOMAINOBJ. More...
 
WlzIntervalDomainWlzNewIDomain (WlzObjectType outDomType, WlzIntervalDomain *inDom, WlzErrorNum *dstErr)
 Make a copy of an intervaldomain. More...
 
WlzContourWlzMakeContour (WlzErrorNum *dstErr)
 Makes a new contour data structure. More...
 
WlzIndexedValuesWlzMakeIndexedValues (WlzObject *obj, int rank, int *dim, WlzGreyType vType, WlzValueAttach attach, WlzErrorNum *dstErr)
 Makes a new indexed value table. More...
 
WlzErrorNum WlzExtendIndexedValues (WlzIndexedValues *ixv, size_t n)
 Extends the given indexed value table. This is just a wrapper for AlcVectorExtend(). More...
 
WlzTiledValuesWlzMakeTiledValues (int dim, int vRank, WlzErrorNum *dstErr)
 Allocates a new tiled value table, but without allocating any indices or tiles. More...
 
WlzErrorNum WlzFreeTiledValues (WlzTiledValues *tVal)
 Frees a tiled value table. More...
 
WlzTiledValuesWlzNewTiledValues (WlzTiledValues *gVal, WlzPixelV bgdV, WlzErrorNum *dstErr)
 Creates a new tiled values table which shares both the grey value tiles and indexing with the given tiled values. This is done by using the original_table field. More...
 
WlzObjectWlzMakeTiledValuesFromObj (WlzObject *gObj, size_t tileSz, int copyValues, WlzGreyType gType, unsigned int vRank, unsigned int *vDim, WlzPixelV bgdV, WlzErrorNum *dstErr)
 Creates a tiled object from the given object. More...
 
WlzErrorNum WlzMakeTiledValuesTiles (WlzTiledValues *tVal)
 Allocates tiles without a memory mapped file for the tiles values and sets background value within the tiles. More...
 
WlzTiledValueBufferWlzMakeTiledValueBuffer (WlzTiledValues *tVal, WlzErrorNum *dstErr)
 Makes a new tiled values buffer for the given tiled values table. More...
 
void WlzFreeTiledValueBuffer (WlzTiledValueBuffer *tBuf)
 Frees the given tiled values buffer including it's line buffer. More...
 
WlzObjectWlzMakeTiledValuesObj2D (WlzObject *gObj, size_t tileSz, int setTiles, WlzGreyType gType, unsigned int vRank, unsigned int *vDim, WlzPixelV bgdV, WlzErrorNum *dstErr)
 Creates a 2D domain object which has the same domain as the given 2D domain object but a tiled value table. More...
 
WlzObjectWlzMakeTiledValuesObj3D (WlzObject *gObj, size_t tileSz, int setTiles, WlzGreyType gType, unsigned int vRank, unsigned int *vDim, WlzPixelV bgdV, WlzErrorNum *dstErr)
 Creates a 3D domain object which has the same domain as the given 3D domain object but a tiled value table. More...
 

Detailed Description

Function Documentation

◆ WlzAssignObject()

WlzObject* WlzAssignObject ( WlzObject obj,
WlzErrorNum dstErr 
)

Assign an object (increment it's linkcount) by first checking for NULL, then the value of linkcount, before incrementing the linkcount. If used concientiously, assignment should avoid memory errors.

Returns
Given object with incremented linkcount or NULL on error.
Parameters
objGiven object.
dstErrDestination error pointer, may be NULL.

References _WlzObject::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_OBJECT_NULL.

Referenced by Wlz3DSectionOcc(), Wlz3DSectionSegmentObject(), Wlz3DViewTransformBitmap(), WlzAssignCompoundArray(), WlzBoundaryDomain(), WlzBoundaryToPolyObjArray(), WlzBSplineToDomain(), WlzCannyDeriche(), WlzCMeshDispToField(), WlzCMeshFromObj2D(), WlzCMeshFromObj3D(), WlzCMeshIntersectDom2D5(), WlzCMeshTransformManyObjAsIdx(), WlzConComThreshold(), WlzCopyValues(), WlzDGTensorFeatures(), WlzDistanceTransform(), WlzDomainFill3D(), WlzDomainNearby(), WlzGauss2(), WlzGetPatchTree(), WlzGetProjectionFromObject(), WlzGreyModGradient(), WlzGreySetValue(), WlzImageArithmetic(), WlzIndexObjFromCompound(), WlzIndexObjToCompound(), WlzInit3DViewStruct(), WlzInteriority(), WlzInteriorityN(), WlzLabel3D(), WlzLaplacian(), WlzLineSkeleton(), WlzLineSkeletonSegment(), WlzMakeCompoundArray(), WlzMakeMain(), WlzMakePatchTree(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzObjToConvexHull(), WlzOffsetDist(), WlzPatchTreeToObject(), WlzPointsFromDomObj(), WlzPolyToObj(), WlzProj3DToSection(), WlzRegCCorObjs(), WlzRegConCalcRCC(), WlzRegisterPatchTreeBF(), WlzRGBAMultiThreshold(), WlzScalarFeatures2D(), WlzSepTrans(), WlzSobel(), WlzSplitObj(), and WlzXORDom().

◆ WlzAssignCompoundArray()

WlzCompoundArray* WlzAssignCompoundArray ( WlzCompoundArray obj,
WlzErrorNum dstErr 
)

Assign a compound array (increment it's linkcount) by first checking for NULL, then the value of linkcount, before incrementing the linkcount. If used concientiously, assignment should avoid memory errors.

Returns
Given compound array with incremented linkcount or NULL on error.
Parameters
objGiven compound array.
dstErrDestination error pointer, may be NULL.

References WlzAssignObject().

◆ WlzAssignDomain()

◆ WlzAssignValues()

◆ WlzAssignProperty()

WlzProperty WlzAssignProperty ( WlzProperty  property,
WlzErrorNum dstErr 
)

Assign a property by incrementing it's linkcount.

Returns
Given property with incremented linkcount or the core property set to NULL on error.
Parameters
propertyGiven property.
dstErrDestination error pointer, may be NULL.

References _WlzProperty::core, _WlzCoreProperty::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_PROPERTY_NULL.

◆ WlzAssignAffineTransform()

WlzAffineTransform* WlzAssignAffineTransform ( WlzAffineTransform trans,
WlzErrorNum dstErr 
)

Assign an affine transform by incrementing it's linkcount.

Returns
Given affine transform with incremented linkcount or NULL on error.
Parameters
transGiven affine transform.
dstErrDestination error pointer, may be NULL.

References _WlzAffineTransform::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_OBJECT_NULL.

Referenced by WlzMake3DViewStruct(), WlzMake3DViewStructCopy(), and WlzMatchICPCtr().

◆ WlzAssignTransform()

WlzTransform WlzAssignTransform ( WlzTransform  t,
WlzErrorNum dstErr 
)

Assign a transform by incrementing it's linkcount.

Returns
Given transform with incremented linkcount or NULL on error.
Parameters
tGiven transform.
dstErrDestination error pointer, may be NULL.

References _WlzTransform::core, _WlzCoreTransform::linkcount, WLZ_ERR_LINKCOUNT_DATA, and WLZ_ERR_NONE.

◆ WlzAssign3DViewStruct()

WlzThreeDViewStruct* WlzAssign3DViewStruct ( WlzThreeDViewStruct viewStr,
WlzErrorNum dstErr 
)

Assign an woolz 3D view structure by incrementing it's linkcount.

Returns
Given 3D view structure with incremented linkcount or NULL on error.
Parameters
viewStrGiven 3D view structure.
dstErrDestination error pointer, may be NULL.

References _WlzThreeDViewStruct::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_OBJECT_NULL.

◆ WlzAssignBoundList()

WlzBoundList* WlzAssignBoundList ( WlzBoundList blist,
WlzErrorNum dstErr 
)

Assign a boundary list by incrementing it's linkcount.

Returns
Given boundary list with incremented linkcount or NULL on error.
Parameters
blistGiven boundary list.
dstErrDestination error pointer, may be NULL.

References _WlzBoundList::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_OBJECT_NULL.

Referenced by WlzBoundDecimate(), WlzBoundSmooth(), and WlzConvertBoundType().

◆ WlzAssignPolygonDomain()

WlzPolygonDomain* WlzAssignPolygonDomain ( WlzPolygonDomain poly,
WlzErrorNum dstErr 
)

Assign a polygon domain by incrementing it's linkcount.

Returns
Given polygon domain with incremented linkcount or NULL on error.
Parameters
polyGiven boundary list.
dstErrDestination error pointer, may be NULL.

References _WlzPolygonDomain::linkcount, WLZ_ERR_LINKCOUNT_DATA, WLZ_ERR_NONE, and WLZ_ERR_OBJECT_NULL.

Referenced by WlzBoundDecimate(), WlzBoundSmooth(), WlzConvertBoundType(), and WlzMakeBoundList().

◆ WlzAssignGMModel()

WlzGMModel* WlzAssignGMModel ( WlzGMModel model,
WlzErrorNum dstErr 
)

Assign a geometric model by incrementing it's linkcount.

Returns
Given geometric model with incremented linkcount or NULL on error.
Parameters
modelGiven geometric model.
dstErrDestination error pointer, may be NULL.

References _WlzGMModel::linkcount, WLZ_ERR_LINKCOUNT_DATA, and WLZ_ERR_NONE.

Referenced by WlzAffineTransformContour(), WlzAffineTransformGMModel(), WlzBasisFnTransformContour(), WlzCMeshToContour(), WlzContourGrdObj2D(), WlzCopyDomain(), and WlzShiftDomain().

◆ WlzUnlink()

◆ WlzMakeBSpline()

WlzBSpline* WlzMakeBSpline ( WlzObjectType  type,
int  order,
int  maxKnots,
WlzErrorNum dstErr 
)

Creates a new B-spline domain. This can be freed using using WlzFreeDomain().

Returns
New Woolz B-spline domain or NULL on error.
Parameters
typeType of B-spline domain: Must be either WLZ_BSPLINE_C2D or WLZ_BSPLINE_C3D.
orderMust be in the range [1-5].
maxKnotsMaximum number of knots per dimension.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), _WlzBSpline::coefficients, _WlzBSpline::knots, _WlzBSpline::maxKnots, _WlzBSpline::order, _WlzBSpline::type, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_BSPLINE_ORDER_MAX, WLZ_BSPLINE_ORDER_MIN, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

Referenced by WlzBSplineCopy(), and WlzBSplineFromVertices().

◆ WlzFreeBSpline()

WlzErrorNum WlzFreeBSpline ( WlzBSpline bs)

Frees a B-spline domain.

Returns
Woolz error code.
Parameters
bsGiven B-spline domain.

References AlcFree(), _WlzBSpline::linkcount, WLZ_ERR_NONE, and WlzUnlink().

Referenced by WlzAffineTransformBSpline(), and WlzFreeObj().

◆ WlzBSplineCopy()

WlzBSpline* WlzBSplineCopy ( WlzBSpline srcBS,
WlzErrorNum dstErr 
)

Copies a B-spline domain.

Returns
New B-spline domain or NULL on error.
Parameters
srcBSGiven source B-spline domain.
dstErrDestination error pointer, may be NULL.

References _WlzBSpline::coefficients, _WlzBSpline::knots, _WlzBSpline::maxKnots, _WlzBSpline::nKnots, _WlzBSpline::order, _WlzBSpline::type, WLZ_BSPLINE_C2D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzMakeBSpline(), and WlzValueCopyDoubleToDouble().

Referenced by WlzAffineTransformBSpline(), and WlzCopyDomain().

◆ WlzBuildObj3U()

WlzObject* WlzBuildObj3U ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
WlzUByte buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with WlzUByte values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::ubp, WLZ_GREY_UBYTE, and WlzBuildObj3().

◆ WlzBuildObj3S()

WlzObject* WlzBuildObj3S ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
short *  buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with short values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::shp, WLZ_GREY_SHORT, and WlzBuildObj3().

◆ WlzBuildObj3I()

WlzObject* WlzBuildObj3I ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
int *  buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with int values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::inp, WLZ_GREY_INT, and WlzBuildObj3().

◆ WlzBuildObj3F()

WlzObject* WlzBuildObj3F ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
float *  buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with float values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::flp, WLZ_GREY_FLOAT, and WlzBuildObj3().

◆ WlzBuildObj3D()

WlzObject* WlzBuildObj3D ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
double *  buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with double values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::dbp, WLZ_GREY_DOUBLE, and WlzBuildObj3().

◆ WlzBuildObj3R()

WlzObject* WlzBuildObj3R ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
int  bufSz,
WlzUInt buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with RGBA values.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::rgbp, WLZ_GREY_RGBA, and WlzBuildObj3().

◆ WlzBuildObj3B()

WlzObject* WlzBuildObj3B ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
WlzGreyType  gType,
int  bufSz,
char *  buf,
WlzErrorNum dstErr 
)

Wrapper for WlzBuildObj3() with buffer passed as bytes.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
gTypeThe grey type.
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY * sizeof(<gType>))).
bufGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References _WlzGreyP::ubp, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WlzBuildObj3(), and WlzGreySize().

◆ WlzBuildObj3()

WlzObject* WlzBuildObj3 ( WlzObject cObj,
WlzIVertex3  og,
WlzIVertex2  sz,
WlzGreyType  gType,
int  bufSz,
WlzGreyP  bufP,
WlzErrorNum dstErr 
)

Creates a new or adds to an existing 3D spatial domain object using a rectangular buffer of values to a single plane of the given current object (which may be NULL or empty if the object is to be created). The returned object will share domains and values of planes other than the given plane with the current object.

Returns
New Woolz object.
Parameters
cObjGiven current object.
ogOrigin of rectangular buffer.
szBuffer size (note 2D).
gTypeGrey type which must be consistent with the current object (if it is valid) and the buffer of values.
bufSzNumber of values in the buffer (ie sz.vtX * sz.vtY).
bufPGiven buffer of values.
dstErrDestination error pointer, may be NULL.

References ALG_MAX, ALG_MIN, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyV::inv, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_GREY_ERROR, WLZ_GREY_INT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzGetBackground(), WlzGreyTypeFromObj(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzBuildObj3B(), WlzBuildObj3D(), WlzBuildObj3F(), WlzBuildObj3I(), WlzBuildObj3R(), WlzBuildObj3S(), and WlzBuildObj3U().

◆ WlzConstruct3DObjFromFile()

WlzObject* WlzConstruct3DObjFromFile ( int  nFileStr,
char **  fileStr,
int  plane1,
float  xSz,
float  ySz,
float  zSz,
WlzErrorNum dstErr 
)

Constructs a 3D domain object from 2D domain objects read from the given files. Each file is read in turn and added to the 3D object. An empty plane can be specified by setting the file string to NULL. Either all or none of the 2D objects must have values. When the 2D objects have values then the background value of the first 2D object is set to be the background value of the 3D object.

Returns
New 3D object.
Parameters
nFileStrNumber of file strings.
fileStrFile strings.
plane1The plane coordinate of the first 2D object.
xSzColumn voxel size.
ySzLine voxel size.
zSzPlane voxel size.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::p, _WlzObject::type, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_READ_EOF, WLZ_ERR_VALUES_NULL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeObj(), WlzFreeValues(), WlzGetBackground(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzReadObj(), and WlzStandardPlaneDomain().

◆ WlzConstruct3DObjFromObj()

WlzObject* WlzConstruct3DObjFromObj ( int  nObjs,
WlzObject **  objs,
int  plane1,
float  xSz,
float  ySz,
float  zSz,
WlzErrorNum dstErr 
)

Constructs a 3D domain object from 2D domain objects. Each 2D object is assigned in turn to the 3D object no domains or values are copied. An empty can be specified by setting the 2D object to NULL. Either all or none of the 2D objects must have values. When the 2D objects have values then the background value of the first 2D object is set to be the background value of the 3D object.

Returns
New 3D object.
Parameters
nObjsNumber of objects.
objsThe 2D objects, the first of which MUST not be NULL.
plane1The plane coordinate of the first 2D object.
xSzColumn voxel size.
ySzLine voxel size.
zSzPlane voxel size.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::p, _WlzObject::type, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeValues(), WlzGetBackground(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), and WlzStandardPlaneDomain().

◆ WlzCopyObject()

WlzObject* WlzCopyObject ( WlzObject inObj,
WlzErrorNum dstErr 
)

◆ WlzCopyDomain()

WlzDomain WlzCopyDomain ( WlzObjectType  inObjType,
WlzDomain  inDom,
WlzErrorNum dstErr 
)

Copies the given objects domain.

Returns
Copied domain, NULL on error.
Parameters
inObjTypeType of given domain's parent object.
inDomDomain to be copied.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::b, _WlzLUTDomain::bin1, _WlzHistogramDomain::binSize, _WlzHistogramDomain::binValues, _WlzDomain::bs, _WlzDomain::cm2, _WlzDomain::cm2d5, _WlzDomain::cm3, _WlzDomain::core, _WlzDomain::ctr, _WlzDomain::cvh2, _WlzDomain::cvh3, _WlzPlaneDomain::domains, _WlzBoundList::down, _WlzDomain::hist, _WlzDomain::i, _WlzPlaneDomain::kol1, _WlzLUTDomain::lastbin, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzDomain::lut, _WlzHistogramDomain::maxBins, _WlzPolygonDomain::maxvertices, _WlzContour::model, _WlzHistogramDomain::nBins, _WlzBoundList::next, _WlzPolygonDomain::nvertices, _WlzHistogramDomain::origin, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzDomain::poly, _WlzBoundList::poly, _WlzDomain::t, _WlzCoreDomain::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzPolygonDomain::type, _WlzBoundList::type, _WlzHistogramDomain::type, _WlzPlaneDomain::voxel_size, _WlzDomain::vs3d, _WlzPolygonDomain::vtx, _WlzConvHullDomain2::vtxType, _WlzConvHullDomain3::vtxType, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_3D_POLYGON, WLZ_3D_VIEW_STRUCT, WLZ_3D_WARP_TRANS, WLZ_AFFINE_TRANS, WLZ_BOUNDLIST, WLZ_CMESH_2D, WLZ_CMESH_2D5, WLZ_CMESH_3D, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_COMPOUND_LIST_1, WLZ_COMPOUND_LIST_2, WLZ_CONTOUR, WLZ_CONV_HULL, WLZ_CONVHULL_DOMAIN_2D, WLZ_CONVHULL_DOMAIN_3D, WLZ_CONVOLVE_FLOAT, WLZ_CONVOLVE_INT, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_UNIMPLEMENTED, WLZ_FMATCHOBJ, WLZ_GREY_DOUBLE, WLZ_GREY_INT, WLZ_HISTOGRAM, WLZ_HISTOGRAMDOMAIN_INT, WLZ_LUT, WLZ_PROPERTY_OBJ, WLZ_RECTANGLE, WLZ_SPLINE, WLZ_TEXT, WLZ_TRANS_OBJ, WLZ_WARP_TRANS, WlzAffineTransformCopy(), WlzAssignDomain(), WlzAssignGMModel(), WlzBSplineCopy(), WlzCMeshCopy2D(), WlzCMeshCopy2D5(), WlzCMeshCopy3D(), WlzConvexHullCopy2(), WlzConvexHullCopy3(), WlzFreeBoundList(), WlzFreeDomain(), WlzFreePolyDmn(), WlzGMModelCopy(), WlzMake3DViewStructCopy(), WlzMakeBoundList(), WlzMakeContour(), WlzMakeHistogramDomain(), WlzMakeLUTDomain(), WlzMakePlaneDomain(), WlzMakePolygonDomain(), WlzNewIDomain(), WlzValueCopyGreyToGrey(), and _WlzBoundList::wrap.

Referenced by WlzCopyObject(), WlzDiffDomain3d(), and WlzUnion3d().

◆ WlzCopyValues()

◆ WlzCopyPropertyList()

WlzPropertyList* WlzCopyPropertyList ( WlzPropertyList gList,
WlzErrorNum dstErr 
)

Copies the given property list.

Returns
Copied property list.
    A new property list is created with a zero link count
    and a linked list for the properties. Each property of
    given list is then copied and assigned to the new list.
    The order of the properties in the new list is the same
    as that in the given list, although a property that
    occurs more than once in the given list will have many
    copies created.
Parameters
gListGiven property list.
dstErrDestination error pointer, may be NULL.

References _WlzProperty::core, _AlcDLPItem::entry, _AlcDLPList::head, _WlzPropertyList::list, _WlzProperty::simple, _WlzCoreProperty::type, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PROPERTY_NULL, WLZ_PROPERTY_SIMPLE, and WlzMakePropertyList().

Referenced by WlzCopyObject().

◆ WlzCopyIndexedValues()

◆ WlzCopyObjectGreyValues()

WlzErrorNum WlzCopyObjectGreyValues ( WlzObject dObj,
WlzObject sObj 
)

Copies the grey values of the source object to the destination object, overwriting the values of the destination object.

Returns
Woolz error code.
Parameters
dObjDestination object.
sObjSource object.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, and WLZ_ERR_VALUES_NULL.

Referenced by WlzMakeTiledValuesObj2D(), and WlzMakeTiledValuesObj3D().

◆ WlzFreeObj()

WlzErrorNum WlzFreeObj ( WlzObject obj)

Free space allocated to a woolz object.

Returns
Error number, values: WLZ_ERR_NONE, WLZ_ERR_MEM_FREE
Parameters
objObject to be freed.
Source:
WlzFreeSpace.c

References AlcFree(), _WlzObject::assoc, _WlzDomain::b, _WlzDomain::bs, _WlzDomain::cm2, _WlzDomain::cm2d5, _WlzDomain::cm3, _WlzValues::core, _WlzDomain::core, _WlzDomain::ctr, _WlzDomain::cvh2, _WlzDomain::cvh3, _WlzObject::domain, _WlzDomain::hist, _WlzDomain::i, _WlzObject::linkcount, _WlzIntervalDomain::linkcount, _WlzPlaneDomain::linkcount, _WlzCoreValues::linkcount, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzValues::obj, _WlzDomain::p, _WlzObject::plist, _WlzDomain::poly, _WlzValues::pts, _WlzDomain::pts, _WlzDomain::r, _WlzValues::t, _WlzDomain::t, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzValues::v, _WlzObject::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_AFFINE_TRANS, WLZ_BOUNDLIST, WLZ_CMESH_2D, WLZ_CMESH_2D5, WLZ_CMESH_3D, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_CONTOUR, WLZ_CONV_HULL, WLZ_CONVHULL_DOMAIN_2D, WLZ_CONVHULL_DOMAIN_3D, WLZ_DBG, WLZ_DBG_ALLOC, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_FREE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_TAB_TILED, WLZ_HISTOGRAM, WLZ_LUT, WLZ_POINTS, WLZ_PROPERTY_OBJ, WLZ_RECTANGLE, WLZ_SPLINE, WLZ_TRANS_OBJ, WlzCMeshFree2D(), WlzCMeshFree2D5(), WlzCMeshFree3D(), WlzFreeAffineTransform(), WlzFreeBoundList(), WlzFreeBSpline(), WlzFreeContour(), WlzFreeConvexHullDomain2(), WlzFreeConvexHullDomain3(), WlzFreeDomain(), WlzFreeIndexedValues(), WlzFreeLUTValues(), WlzFreePlaneDomain(), WlzFreePointValues(), WlzFreePolyDmn(), WlzFreePropertyList(), WlzFreeTiledValues(), WlzFreeValueTb(), WlzFreeVoxelValueTb(), WlzGreyTableIsTiled(), WlzUnlink(), and _WlzValues::x.

Referenced by Wlz2DContains(), Wlz3DSectionOcc(), Wlz3DSectionSegmentObject(), Wlz3DViewTransformBitmap(), WlzBasisFnInvertMakeCMeshTr2D(), WlzBasisFnInvertMakeCMeshTr3D(), WlzBasisFnMakeCMeshTr2D(), WlzBasisFnMakeCMeshTr3D(), WlzBasisFnTransformRandom(), WlzBoundaryDomain(), WlzBoundaryToObj(), WlzBoundTo8Bound(), WlzBoundToObj(), WlzBSplineToDomain(), WlzCannyDeriche(), WlzCCorS2D(), WlzClipObjToBox2D(), WlzClipObjToBox3D(), WlzCMeshCompSurfMapToDomain(), WlzCMeshComputeCurvatures(), WlzCMeshComputeCurvaturesFromNodNorm(), WlzCMeshComputeNormalsElm(), WlzCMeshComputeNormalsIxv2D5(), WlzCMeshComputeNormalsNod(), WlzCMeshDispToField(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), WlzCMeshFlatten2D5(), WlzCMeshFromObj2D(), WlzCMeshFromObj3D(), WlzCMeshIntersectDom2D5(), WlzCMeshSetDispFromField(), WlzCMeshTransformFromObj(), WlzCMeshTransformManyObjAsIdx(), WlzConstruct3DObjFromFile(), WlzContourRBFBndObj3D(), WlzCopyValues(), WlzDbgObjWrite(), WlzDGTensorFeatures(), WlzDGTensorSDFeature(), WlzDiffDomain(), WlzDiffDomain3d(), WlzDistanceTransform(), WlzDomainFill(), WlzDomainFill3D(), WlzDomainNearby(), WlzDomainOccupancy(), WlzEffReadObjJpeg(), WlzEffWriteObjBmp2D(), WlzEffWriteObjJpeg(), WlzEffWriteObjPnm2D(), WlzEffWriteObjTxt(), WlzExplode3D(), WlzFillBlankPlanes(), WlzFree3DViewStruct(), WlzFreeCompoundArray(), WlzFreePatchTree(), WlzFreeTransform(), WlzFromArray1D(), WlzGauss2(), WlzGaussFilter(), WlzGaussNoise(), WlzGetMaskedSectionFromObject(), WlzGetPatchTree(), WlzGetPatchTreeToDepth(), WlzGetProjectionFromObject(), WlzGreyMeanDifference(), WlzGreyModGradient(), WlzGreyScale(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreyShift(), WlzHyThreshold(), WlzIndexObjFromCompound(), WlzIndexObjToCompound(), WlzInit3DViewStruct(), WlzIntersect3d(), WlzIntersectN(), WlzIterateWSpFree(), WlzLabel3D(), WlzLaplacian(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzLineSkeleton(), WlzLineSkeletonSegment(), WlzLUTGreyTransformNew(), WlzMakeCuboidObject(), WlzMakeMarkers(), WlzMakeSphereObject(), WlzMakeStdStructElement(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMarkerLattice(), WlzNewGrey(), WlzNewObjectValues(), WlzNewValuesVox(), WlzNObjGreyStats(), WlzObjToBoundary(), WlzObjToConvexHull(), WlzOffsetDist(), WlzPatchTreeToObject(), WlzPointsFromDomObj(), WlzPointsToDomObj(), WlzPolygonToObj(), WlzProj3DToSection(), WlzRegICPObjsGrd(), WlzRGBAGreyScale(), WlzRGBAGreyStats(), WlzRGBAImageArithmetic(), WlzRGBAModGradient(), WlzRGBAMultiThreshold(), WlzRGBAScalarBinaryOp(), WlzScalarBinaryOp2(), WlzScalarFeatures2D(), WlzScalarMulAdd(), WlzSepTrans(), WlzSetBackground(), WlzSobel(), WlzSplitMontageObj(), WlzSplitObj(), WlzTensorSmooth(), WlzToArray1D(), WlzUnion3d(), WlzUnionN(), WlzVerifyObject(), WlzVerticesFromObj3I(), WlzVerticesFromObjBnd3I(), WlzVolume(), and WlzXORDom().

◆ WlzFreeCompoundArray()

WlzErrorNum WlzFreeCompoundArray ( WlzCompoundArray obj)

Free space allocated to a woolz compound array object.

Returns
Error number, values: WLZ_ERR_NONE, WLZ_ERR_MEM_FREE
Parameters
objCompound array object to be freed.

References WlzFreeObj().

◆ WlzFreeIntervalDomain()

WlzErrorNum WlzFreeIntervalDomain ( WlzIntervalDomain idom)

Free an interval domain - convenience link to WlzFreeDomain()

Returns
Error number, values: from WlzFreeDomain().
Parameters
idominterval domain pointer to be freed.
Source:
WlzFreeSpace.c

References _WlzDomain::i, and WlzFreeDomain().

Referenced by Wlz3DSectionSegmentObject(), WlzDiffDomain(), WlzIntersectN(), WlzMakeCircleObject(), WlzNewIDomain(), WlzProfileLineIDom(), WlzStandardPlaneDomain(), and WlzUnionN().

◆ WlzFreeHistogramDomain()

WlzErrorNum WlzFreeHistogramDomain ( WlzHistogramDomain hist)

Free a histogram domain.

Returns
Error number, values: from WlzFreeDomain().
Parameters
histHistogram domain to be freed.
Source:
WlzFreeSpace.c

References _WlzDomain::hist, and WlzFreeDomain().

Referenced by WlzBasisFnFree().

◆ WlzFreeDomain()

◆ WlzFreePlaneDomain()

◆ WlzFreeValueTb()

WlzErrorNum WlzFreeValueTb ( WlzRagRValues vdmn)

Convenience routine to free a ragged rect valuetable.

Returns
Error number, values: WLZ_ERR_NONE and from WlzFreeValues().
Parameters
vdmnValue domain to be freed.
Source:
WlzFreeSpace.c

References _WlzValues::v, WLZ_ERR_NONE, and WlzFreeValues().

Referenced by WlzFreeObj(), WlzIndexObjFromCompound(), WlzLUTTransformObj(), WlzMakeTiledValuesObj2D(), WlzNewValueTb(), and WlzStandardPlaneDomain().

◆ WlzFreeValues()

WlzErrorNum WlzFreeValues ( WlzValues  values)

Free a values structure, currently only WlzRagRValues and WlzRectValues DO NOT call this function with any other values structure types!

Returns
Error number, values: WLZ_ERR_NONE, WLZ_ERR_VALUES_DATA.
Parameters
valuesValues union to be freed.
Source:
WlzFreeSpace.c

References AlcFree(), AlcFreeStackFree(), _WlzRagRValues::freeptr, _WlzRagRValues::linkcount, _WlzRagRValues::original_table, _WlzValues::v, WLZ_ERR_NONE, WLZ_ERR_VALUES_DATA, and WlzUnlink().

Referenced by WlzCMeshIntersectDom2D5(), WlzConstruct3DObjFromFile(), WlzConstruct3DObjFromObj(), WlzCopyObject(), WlzCopyValues(), WlzFreeValueTb(), WlzFreeVoxelValueTb(), WlzFromArray1D(), WlzMakeCuboid(), WlzMakeIntervalValues(), WlzMakeRect(), WlzShiftObject(), and WlzShiftValues().

◆ WlzFreeVoxelValueTb()

◆ WlzFreePolyDmn()

WlzErrorNum WlzFreePolyDmn ( WlzPolygonDomain poly)

Free a polygon domain.

Returns
Error number, values: WLZ_ERR_NONE and from WlzUnlink().
Parameters
polyPolygon domain to be freed.
Source:
WlzFreeSpace.c

References AlcFree(), _WlzPolygonDomain::linkcount, WLZ_ERR_NONE, and WlzUnlink().

Referenced by WlzBasisFnTransformPoly2(), WlzBoundaryToPolyObjArray(), WlzCMeshCompSurfMapToDomain(), WlzConvertPolyType(), WlzCopyDomain(), WlzFreeBoundList(), WlzFreeObj(), WlzFreePlaneDomain(), WlzPolySmooth(), and WlzShiftDomain().

◆ WlzFreeBoundList()

WlzErrorNum WlzFreeBoundList ( WlzBoundList b)

Recursively free a boundary list.

Returns
Error number, values: WLZ_ERR_NONE and from WlzUnlink().
Parameters
bBoundary list structure to be freed (note this will call WlzFreeBoundList recursively).
Source:
WlzFreeSpace.c

References AlcFree(), _WlzBoundList::down, _WlzBoundList::linkcount, _WlzBoundList::next, _WlzBoundList::poly, WLZ_ERR_NONE, WlzFreePolyDmn(), and WlzUnlink().

Referenced by WlzBasisFnTransformBoundList(), WlzBoundDecimate(), WlzBoundSmooth(), WlzConvertBoundType(), WlzCopyDomain(), WlzDomainFill(), WlzFreeObj(), WlzFreePlaneDomain(), and WlzShiftDomain().

◆ WlzFree3DWarpTrans()

WlzErrorNum WlzFree3DWarpTrans ( Wlz3DWarpTrans obj)

Free a 3D warp transform.

Returns
Error number, values: WLZ_ERR_NONE and from WlzFreePlaneDomain().
Parameters
obj3D warp transform object to be freed.
Source:
WlzFreeSpace.c

References AlcFree(), _Wlz3DWarpTrans::intptdoms, _Wlz3DWarpTrans::pdom, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WlzFreePlaneDomain().

◆ WlzFreeContour()

WlzErrorNum WlzFreeContour ( WlzContour ctr)

Free's a WlzContour data structure.

Returns
Error number, values: WLZ_ERR_NONE, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE and from WlzUnlink().
Parameters
ctrContour to be freed.
Source:
WlzFreeSpace.c

References AlcFree(), _WlzGMModel::linkcount, _WlzContour::linkcount, _WlzContour::model, _WlzContour::type, WLZ_CONTOUR, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WlzGMModelFree(), and WlzUnlink().

Referenced by WlzAffineTransformContour(), WlzBasisFnTransformContour(), WlzCMeshToContour(), and WlzFreeObj().

◆ WlzFreeIndexedValues()

◆ WlzFreePointValues()

WlzErrorNum WlzFreePointValues ( WlzPointValues pv)

◆ WlzMakeLBTDomain2D()

WlzLBTDomain2D* WlzMakeLBTDomain2D ( WlzObjectType  type,
int  l1,
int  ll,
int  k1,
int  kl,
WlzErrorNum dstErr 
)

Creates a linear binary tree domain without creating any nodes, leaving the nodes pointer NULL. Only the type, bounding box and depth are set. The depth \(d\) is set such that

\[ 2^d >= \max(k_l - k_1, l_l - l_1) + 1 \]

where \(k_1\), \(k_l\), \(l_1\) and \(l_l\) are the first column, last column, first line and last line respectively.

Returns
New 2D linear binary tree domain.
Parameters
typeType of domain, which must be WLZ_LBTDOMAIN_2D.
l1First line.
lllast line.
k1First column.
klLast column.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlgBitNextPowerOfTwo(), _WlzLBTDomain2D::depth, _WlzLBTDomain2D::kol1, _WlzLBTDomain2D::lastkl, _WlzLBTDomain2D::lastln, _WlzLBTDomain2D::line1, _WlzLBTDomain2D::type, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_LBTDOMAIN_2D, and WLZ_MAX.

Referenced by WlzLBTDomain2DFromIDomain().

◆ WlzMakeLBTDomain3D()

WlzLBTDomain3D* WlzMakeLBTDomain3D ( WlzObjectType  type,
int  p1,
int  pl,
int  l1,
int  ll,
int  k1,
int  kl,
WlzErrorNum dstErr 
)

Creates a linear binary tree domain without creating any nodes, leaving the nodes pointer NULL. Only the type, bounding box and depth are set. The depth \(d\) is set such that

\[ 2^d >= \max(p_l - p_1, k_l - k_1, l_l - l_1) + 1 \]

where \(k_1\), \(k_l\), \(l_1\) and \(l_l\) are the first column, last column, first line and last line respectively.

Returns
New 3D linear binary tree domain.
Parameters
typeType of domain, which must be WLZ_LBTDOMAIN_3D.
p1First plane.
plLast plane.
l1First line.
llLast line.
k1First column.
klLast column.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlgBitNextPowerOfTwo(), _WlzLBTDomain3D::depth, _WlzLBTDomain3D::kol1, _WlzLBTDomain3D::lastkl, _WlzLBTDomain3D::lastln, _WlzLBTDomain3D::lastpl, _WlzLBTDomain3D::line1, _WlzLBTDomain3D::plane1, _WlzLBTDomain3D::type, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_LBTDOMAIN_3D, and WLZ_MAX.

Referenced by WlzLBTDomain3DFromPDomain().

◆ WlzFreeLBTDomain3D()

WlzErrorNum WlzFreeLBTDomain3D ( WlzLBTDomain3D lDom)

Frees the given 3D linear binary tree domain.

Returns
Woolz error code.
Parameters
lDomGiven LBT domain.

References _WlzDomain::l3, WLZ_ERR_NONE, and WlzFreeDomain().

Referenced by WlzCMeshFromObj3D().

◆ WlzFreeLBTDomain2D()

WlzErrorNum WlzFreeLBTDomain2D ( WlzLBTDomain2D lDom)

Frees the given 2D linear binary tree domain.

Returns
Woolz error code.
Parameters
lDomGiven LBT domain.

References _WlzDomain::l2, WLZ_ERR_NONE, and WlzFreeDomain().

Referenced by WlzCMeshFromObj2D().

◆ WlzMakeCompoundArray()

WlzCompoundArray* WlzMakeCompoundArray ( WlzObjectType  type,
int  mode,
int  n,
WlzObject **  ol,
WlzObjectType  otype,
WlzErrorNum dstErr 
)

Makes a new Woolz compound array object.

Returns
New Woolz compound array object.
Parameters
typeType of compound array which should be either WLZ_COMPOUND_ARR_1 or WLZ_COMPOUND_ARR_2.
modeAction to be performed, which may have the values:
  • 1: Allocate an empty array with space for n objects.
  • 2: Array members are given in the input object list, the list linked.
  • 3: Array members are given in the input object list, objects assigned.
nNumber of objects.
olInput object list.
otypeWoolz object type if objects are type checked.
dstErrDestination pointer for error number, may be NULL.

References AlcCalloc(), _WlzCompoundArray::linkcount, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzCompoundArray::otype, _WlzCompoundArray::type, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, and WlzAssignObject().

Referenced by WlzCMeshDispToField(), WlzDGTensorFeatures(), WlzDistAllNearest(), WlzEffReadObjTiff(), WlzGreyModGradient(), WlzIndexObjToCompound(), WlzLabel3D(), WlzRGBAGreyScale(), WlzRGBAImageArithmetic(), WlzScalarMulAdd(), and WlzSepTrans().

◆ WlzMakeIntervalValues()

WlzIntervalValues* WlzMakeIntervalValues ( WlzObjectType  type,
WlzObject obj,
WlzPixelV  bckgrnd,
WlzErrorNum dstErr 
)

Make in interval values table to match the input object The table will have linkcount set to zero.

Returns
New interval values table.
Parameters
typeRequired table type.
objInput object.
bckgrndValues table background value.
dstErrError return.
Constraints
The woolz object type must resolve to WLZ_GREY_TAB_INTL using WlzGreyTableTypeToTableType()or an error will be reported and NULL returned. For historical reasons the type encodes the table type as well as the grey-value type.
Source:
WlzMakeIntervalValues.c

References AlcCalloc(), AlcFreeStackPush(), _WlzIntervalValues::bckgrnd, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzIntervalValues::freeptr, _WlzValues::i, _WlzDomain::i, _WlzGreyP::inp, _WlzIntervalDomain::kol1, _WlzIntervalValues::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalValues::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzIntervalValues::line1, _WlzIntervalValues::linkcount, _WlzValueIntervalLine::nintvs, _WlzIntervalWSpace::nwlpos, _WlzIntervalValues::original_table, _WlzGreyP::rgbp, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzObject::type, _WlzIntervalValues::type, _WlzGreyP::ubp, _WlzValueLine::values, _WlzIntervalValues::vil, _WlzValueLine::vkol1, _WlzValueLine::vlastkl, _WlzValueIntervalLine::vtbint, _WlzIntervalValues::width, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RASTERDIR_ILIC, WlzArea(), WlzFreeValues(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), WlzInitRasterScan(), WlzIntervalCount(), and WlzNextInterval().

Referenced by WlzBSplineToDomain(), WlzDomainFill3D(), and WlzNewValueTb().

◆ WlzMakeIntervalDomain()

WlzIntervalDomain* WlzMakeIntervalDomain ( WlzObjectType  type,
int  l1,
int  ll,
int  k1,
int  kl,
WlzErrorNum dstErr 
)

Allocate space for an interval domain structure. If the type is WLZ_INTERVALDOMAIN_INTVL then allocate space for the interval line array and set the pointer.

Returns
Pointer to allocated interval domain.
Parameters
typeRequired interval domain type.
l1First line
llLast line.
k1First column
klLast column
dstErrerror return values: WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_MEM_ALLOC
Source:
WlzMakeStructs.c

References AlcCalloc(), AlcMalloc(), _WlzIntervalDomain::freeptr, _WlzIntervalDomain::intvlines, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalDomain::linkcount, _WlzIntervalDomain::type, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_INTERVALDOMAIN_INTVL, and WLZ_INTERVALDOMAIN_RECT.

Referenced by Wlz3DSectionSegmentObject(), WlzClipObjToBox2D(), WlzDiffDomain(), WlzErosion4(), WlzFillBlankPlanes(), WlzGetProjectionFromObject(), WlzIntersectN(), WlzMakeCircleObject(), WlzMakeCuboid(), WlzMakeQuadrilateral(), WlzMakeRect(), WlzMakeRectangleObject(), WlzNewIDomain(), WlzProfileLineIDom(), and WlzUnionN().

◆ WlzMakePlaneDomain()

◆ WlzNewObjectValues()

WlzObject* WlzNewObjectValues ( WlzObject sObj,
WlzObjectType  tType,
WlzPixelV  bgdV,
int  setFG,
WlzPixelV  fgdV,
WlzErrorNum dstErr 
)

Creaes a new object with the domain of the given object and a new values.

Returns
New object or NULL on error.
    This function conveniently wraps up WlzNewValueTb(),
    WlzNewValuesVox(), WlzMakeMain() and WlzGreySetValue().
Parameters
sObjGiven object.
tTypeGrey table type.
bgdVBackground value.
setFGSet forground value if non zero.
fgdVForeground value to be set.
dstErrDestinaition error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzValues::v, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzFreeObj(), WlzGreySetValue(), WlzMakeMain(), WlzNewValuesVox(), and WlzNewValueTb().

Referenced by WlzDomainOccupancy(), WlzLineSkeleton(), WlzLineSkeletonSegment(), WlzNObjGreyStats(), WlzSetBackGroundNewObj(), and WlzTensorGetComponent().

◆ WlzNewValuesVox()

WlzVoxelValues* WlzNewValuesVox ( WlzObject sObj,
WlzObjectType  gTType,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

◆ WlzMakeMain()

WlzObject* WlzMakeMain ( WlzObjectType  type,
WlzDomain  domain,
WlzValues  values,
WlzPropertyList plist,
WlzObject assoc,
WlzErrorNum dstErr 
)

Make a top-level woolz object assigning domain, values and other pointers as required . The type is checked. The domain is not checked for NULL although this should only apply to the WLZ_EMPTY_OBJ.

Returns
Pointer to object structure.
Parameters
typeObject type.
domainDomain to be assigned using WlzAssignDomain()
valuesValues to be attached using WlzAssignValues()
plistProperty list attached using WlzAssignPropertyList()
assocAssociated Object attached using WlzAssignObject().
dstErrerror return values: WLZ_ERR_NONE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_PARAM_DATA snd error values from WlzAssign procedures.
Source:
WlzMakeStructs.c

References AlcFree(), AlcMalloc(), _WlzObject::assoc, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::linkcount, _WlzCoreDomain::linkcount, _WlzCoreValues::linkcount, _WlzObject::plist, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_3D_POLYGON, WLZ_3D_VIEW_STRUCT, WLZ_3D_WARP_TRANS, WLZ_AFFINE_TRANS, WLZ_BOUNDLIST, WLZ_CMESH_2D, WLZ_CMESH_2D5, WLZ_CMESH_3D, WLZ_CMESH_TRANS, WLZ_CONTOUR, WLZ_CONV_HULL, WLZ_DBG, WLZ_DBG_ALLOC, WLZ_DBG_LVL_1, WLZ_EMPTY_OBJ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_HISTOGRAM, WLZ_LUT, WLZ_MESH_TRANS, WLZ_POINTS, WLZ_PROPERTY_OBJ, WLZ_RECTANGLE, WLZ_SPLINE, WLZ_TRANS_OBJ, WLZ_WARP_TRANS, WlzAssignDomain(), WlzAssignObject(), WlzAssignPropertyList(), and WlzAssignValues().

Referenced by Wlz3DSectionSegmentObject(), WlzBasisFnInvertMakeCMeshTr2D(), WlzBasisFnInvertMakeCMeshTr3D(), WlzBasisFnMakeCMeshTr2D(), WlzBasisFnMakeCMeshTr3D(), WlzBasisFnTransformObj(), WlzBasisFnTransformRandom(), WlzBoundaryToObj(), WlzBoundaryToPolyObjArray(), WlzBSplineToDomain(), WlzBuildObj3(), WlzCannyDeriche(), WlzClipObjToBox2D(), WlzClipObjToBox3D(), WlzCMeshComputeCurvaturesFromNodNorm(), WlzCMeshComputeNormalsElm(), WlzCMeshComputeNormalsIxv2D5(), WlzCMeshComputeNormalsNod(), WlzCMeshCurvToImage(), WlzCMeshDispToField(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), WlzCMeshExpValues(), WlzCMeshFlatten2D5(), WlzCMeshIntersectDom2D5(), WlzCMeshMeshMeshProduct(), WlzCMeshSetDispFromField(), WlzCMeshToContour(), WlzCMeshTransformFromObj(), WlzConstruct3DObjFromFile(), WlzConstruct3DObjFromObj(), WlzConvertVtx(), WlzCopyObject(), WlzCopyScaleCMeshValue(), WlzCopyValues(), WlzCutObjToValBox3D(), WlzDGTensorPDFeature(), WlzDGTensorSDFeature(), WlzDiffDomain(), WlzDiffDomain3d(), WlzDistAllNearest(), WlzDistanceTransform(), WlzDomainFill(), WlzDomainFill3D(), WlzErosion4(), WlzExplode3D(), WlzFillBlankPlanes(), WlzFromArray1D(), WlzGaussNoise(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGreyMeanDifference(), WlzGreyModGradient(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreyTransfer(), WlzHyThreshold(), WlzIndexObjFromCompound(), WlzIndexObjToCompound(), WlzIndexToRGBA(), WlzIntersect3d(), WlzIntersectN(), WlzIntRescaleObj(), WlzLabel3D(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzLineSkeleton(), WlzLineSkeletonSegment(), WlzLUTTransformObj(), WlzMakeCircleObject(), WlzMakeCuboid(), WlzMakeCuboidObject(), WlzMakeEmpty(), WlzMakeHistogram(), WlzMakeLUTObject(), WlzMakeQuadrilateral(), WlzMakeRect(), WlzMakeRectangleObject(), WlzMakeSphereObject(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMarkerLattice(), WlzNewGrey(), WlzNewObjectValues(), WlzNewValuesVox(), WlzNMSuppress(), WlzObjToBoundary(), WlzObjToConvexHull(), WlzPatchTreeToObject(), WlzPointsFromDomObj(), WlzPolygonToObj(), WlzPolyTo8Polygon(), WlzProjectObjToPlane(), WlzReadObj(), WlzRegConCalcRCC(), WlzRegICPObjsGrd(), WlzRGBAModGradient(), WlzRGBAMultiThreshold(), WlzSampleObjPoint3D(), WlzScalarBinaryOp2(), WlzSepTrans(), WlzSetBackground(), WlzShiftObject(), WlzToArray1D(), WlzUnion3d(), WlzUnionN(), WlzVerifyObject(), WlzVerticesFromObj3I(), and WlzVolume().

◆ WlzMakeValueTb()

WlzRagRValues* WlzMakeValueTb ( WlzObjectType  type,
int  l1,
int  ll,
int  k1,
WlzPixelV  backgrnd,
WlzObject orig,
WlzErrorNum dstErr 
)

Allocate and initialise space for a ragged-rectangle value table only.

Returns
Pointer to a ragged rectangle values table.
Parameters
typeValues structure type. Must be a correct type as given by WlzGreyValueTableType() with table_type = WLZ_GREY_TAB_RAGR.
l1First line.
llLast line.
k1First column.
backgrndBackground pixel value
origOriginal object holding the grey-value data.
dstErrError return values: WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_LINE_DATA, WLZ_ERR_MEM_ALLOC
Source:
WlzMakeStructs.c

References AlcCalloc(), AlcFree(), _WlzRagRValues::bckgrnd, _WlzValues::core, _WlzRagRValues::freeptr, _WlzRagRValues::kol1, _WlzRagRValues::lastln, _WlzRagRValues::line1, _WlzRagRValues::linkcount, _WlzRagRValues::original_table, _WlzRagRValues::type, _WlzRagRValues::vtblines, _WlzRagRValues::width, WLZ_ERR_LINE_DATA, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_UBYTE, WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), and WlzValueConvertPixel().

Referenced by WlzNewValueTb(), and WlzShiftValues().

◆ WlzMakeVoxelValueTb()

WlzVoxelValues* WlzMakeVoxelValueTb ( WlzObjectType  type,
int  p1,
int  pl,
WlzPixelV  backgrnd,
WlzObject orig,
WlzErrorNum dstErr 
)

◆ WlzMakeRectValueTb()

WlzRectValues* WlzMakeRectValueTb ( WlzObjectType  type,
int  line1,
int  lastln,
int  kol1,
int  width,
WlzPixelV  backgrnd,
int *  values,
WlzErrorNum dstErr 
)

Make rectangular value table attaching values if set. Note the values pointer is just copied and will not be freed when the object is freed unless the freeptr is set using AlcFreePointerPush().

Returns
Pointer to a rectangular value table.
Parameters
typeValue table type. Must be a valid table type e.g. as returned by WlzGreyValueTableType() with table_type = WLZ_GREY_TAB_RECT.
line1First line
lastlnLast line.
kol1First column
widthWidth
backgrndBackground pixel value.
valuesPointer to array of pixel values.
dstErrError return values: WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_MEM_ALLOC
Source:
WlzMakeStructs.c

References AlcFree(), AlcMalloc(), _WlzRectValues::bckgrnd, _WlzValues::core, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzRectValues::kol1, _WlzRectValues::lastln, _WlzRectValues::line1, _WlzRectValues::linkcount, _WlzRectValues::original_table, _WlzRectValues::type, _WlzRectValues::values, _WlzRectValues::width, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_UBYTE, WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), and WlzValueConvertPixel().

Referenced by WlzFromArray1D(), WlzMakeCuboid(), WlzMakeRect(), WlzNewValueTb(), and WlzShiftValues().

◆ WlzMakeInterval()

WlzErrorNum WlzMakeInterval ( int  line,
WlzIntervalDomain idom,
int  nints,
WlzInterval intptr 
)

Attach and interval pointer to a an interval domain in the appropriate place and set the number of intervals on the line. Note this procedure makes no checks on the arguments because it is often used in deeply nested loops.

Returns
Woolz error, values: WLZ_ERR_NONE
Parameters
lineLine on which the interval array is to be attached.
idomPointer to the interval domain to hold the intervals.
nintsNumber of intervals in the array.
intptrPointer to the set of intervals.
Source:
WlzMakeStructs.c

References _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, and WLZ_ERR_NONE.

Referenced by Wlz3DSectionSegmentObject(), WlzClipObjToBox2D(), WlzDiffDomain(), WlzIntersectN(), WlzMakeCircleObject(), WlzMakeQuadrilateral(), WlzNewIDomain(), WlzSkStrip4(), and WlzUnionN().

◆ WlzMakeValueLine()

WlzErrorNum WlzMakeValueLine ( WlzRagRValues vtb,
int  line,
int  k1,
int  kl,
int *  greyptr 
)

Attach the grey values for a valueline within a ragged- rectangle value table. Not this procedure does not check the input arguments because it is often at the core of nested loops.

Returns
Woolz error, values: WLZ_ERR_NONE.
Parameters
vtbPointer to a ragged rectangle value table.
lineLine for the values to be set.
k1First column of grey interval.
klLast column of grey interval.
greyptrGrey values pointer cast type int *.
Source:
WlzMakeStructs.c

References _WlzGreyP::inp, _WlzRagRValues::kol1, _WlzRagRValues::line1, _WlzValueLine::values, _WlzValueLine::vkol1, _WlzValueLine::vlastkl, _WlzRagRValues::vtblines, and WLZ_ERR_NONE.

Referenced by WlzNewValueTb().

◆ WlzNewPointValues()

WlzPointValues* WlzNewPointValues ( WlzObject obj,
int  rank,
int *  dim,
WlzGreyType  vType,
WlzErrorNum dstErr 
)

Makes a new point value table which covers the points of the given object.

Returns
New point value table or NULL on error.
Parameters
objGiven object, the domain of which is used to determine the value allocation. This must have type WLZ_POINTS.
rankThe rank of the individual values.
dimThe dimensions of individual indexed values.
vTypeThe type of the data in the individual values.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzPoints::nPoints, _WlzDomain::pts, _WlzObject::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_POINTS, and WlzMakePointValues().

◆ WlzMakePointValues()

WlzPointValues* WlzMakePointValues ( size_t  nP,
int  rank,
int *  dim,
WlzGreyType  vType,
WlzErrorNum dstErr 
)

Makes a new point value table with space for the requested number of points.

Returns
New point value table or NULL on error.
Parameters
nPNumber of points to allocate space for.
rankThe rank of the individual values.
dimThe dimensions of individual indexed values.
vTypeThe type of the data in the individual values.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlcMalloc(), _WlzPointValues::dim, _WlzPointValues::maxPoints, _WlzPointValues::pSz, _WlzPointValues::rank, _WlzPointValues::type, _WlzGreyP::v, _WlzPointValues::values, _WlzPointValues::vType, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_POINT_VALUES, WlzFreePointValues(), and WlzGreySize().

Referenced by WlzDGTensorPDFeature(), WlzNewPointValues(), and WlzPointValuesFromDomObj().

◆ WlzMakePolygonDomain()

WlzPolygonDomain* WlzMakePolygonDomain ( WlzObjectType  type,
int  n,
WlzIVertex2 vertices,
int  maxv,
int  copy,
WlzErrorNum dstErr 
)

Makes a polygon domain, allocating space and copying vertices as required acording to the copy flag. The polygon domain must be freed when longer required using WlzFreePolyDmn().

Returns
Pointer to the initialised polygon domain.
Parameters
typeRequired type of the polygon domain; WLZ_POLYGON_INT, WLZ_POLYGON_FLOAT or WLZ_POLYGON_DOUBLE.
nNumber of vertices, required if vertices pointer is not NULL.
verticesVertices pointer, either an array of vertices or NULL. Although this is of type WlzIVertex2 *, the vertex type must match the polygon type (eg WlzDVertex2 * for WLZ_POLYGON_DOUBLE). Vertices should be passed by casting the vertex pointer to WlzIVertex2 * if required.
maxvSize of the vertex array, ie the maximum number of vertices that the polygon domain may hold.
copyCopy flag:
  • vertices == NULL, copy=0 - no vertex space allocated
  • vertices != NULL, copy=0 - just plant the pointer
  • vertices == NULL, copy=1 - allocate space for maxv vertices
  • vertices != NULL, copy=1 - allocate space and copy
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), _WlzPolygonDomain::linkcount, _WlzPolygonDomain::maxvertices, _WlzPolygonDomain::nvertices, _WlzPolygonDomain::type, _WlzPolygonDomain::vtx, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_POLYGON_DOUBLE, WLZ_POLYGON_FLOAT, and WLZ_POLYGON_INT.

Referenced by WlzBasisFnTransformPoly2(), WlzConvertPolyType(), WlzCopyDomain(), WlzPolyDecimate(), WlzPolyEquispace(), WlzPolyReverse(), WlzPolyTo8Polygon(), and WlzShiftDomain().

◆ WlzMakeBoundList()

WlzBoundList* WlzMakeBoundList ( WlzObjectType  type,
int  wrap,
WlzPolygonDomain poly,
WlzErrorNum dstErr 
)

Allocate space and initialise a boundlist structure.

Returns
Pointer to a BoundList structure.
Parameters
typeBoundList type, one of: WLZ_BOUNDLIST_PIECE or WLZ_BOUNDLIST_HOLE.
wrapnumber of vertices by which the polygon is "wrapped" ie number of vertices overlapping at the beginning and end.
polypolygon for this boundary structure
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_MEM_ALLOC.
Source:
WlzMakeStructs.c

References AlcFree(), AlcMalloc(), _WlzBoundList::down, _WlzBoundList::freeptr, _WlzBoundList::linkcount, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, _WlzBoundList::up, WLZ_BOUNDLIST_HOLE, WLZ_BOUNDLIST_PIECE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WlzAssignPolygonDomain(), and _WlzBoundList::wrap.

Referenced by WlzBoundDecimate(), WlzBoundSmooth(), WlzBoundTo8Bound(), WlzConvertBoundType(), WlzCopyDomain(), WlzObjToBoundary(), and WlzShiftDomain().

◆ WlzMakeIVertex()

WlzIVertex2* WlzMakeIVertex ( int  nverts,
WlzErrorNum dstErr 
)

Make an integer vertex array.

Returns
Pointer to the array of vertex structures.
Parameters
nvertsNumber of vertices.
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_MEM_ALLOC.
Source:
WlzMakeStructs.c

References AlcMalloc(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

◆ WlzMakeRect()

WlzObject* WlzMakeRect ( int  line1,
int  lastln,
int  kol1,
int  lastkl,
WlzGreyType  pixeltype,
int *  grey_values,
WlzPixelV  backgrnd,
WlzPropertyList plist,
WlzObject assoc_obj,
WlzErrorNum dstErr 
)

Make a top-level rectangular object, setting values if non-NULL, uses WlzMakeRectValueTb() to assign values which by default will not be freed when the object is freed. The freeptr needs to be explicitly set by the calling procedure. This is a convenience procedure calling WlzMakeIntervalDomain() then WlzMakeRectValueTb() then WlzMakeMain().

Returns
Pointer to the top-level object.
Parameters
line1First line.
lastlnLast line
kol1First column
lastkllast column
pixeltypePixel type for the grey values. If WLZ_GREY_ERROR is given then no values are created.
grey_valuesPointer to the grey values array.
backgrndBackground pixel value.
plistProperty list to be attached.
assoc_objAssociated object.
dstErrError return, values: WLZ_ERR_NONE and valuea from WlzMakeRectValueTb() and WlzMakeMain().
Source:
WlzMakeStructs.c

References _WlzValues::core, _WlzDomain::i, _WlzValues::r, WLZ_2D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_GREY_ERROR, WLZ_GREY_TAB_RECT, WLZ_INTERVALDOMAIN_RECT, WlzFreeDomain(), WlzFreeValues(), WlzGreyValueTableType(), WlzMakeIntervalDomain(), WlzMakeMain(), and WlzMakeRectValueTb().

Referenced by WlzBSplineToDomain(), WlzEffReadObjJpeg(), and WlzFromArray1D().

◆ WlzNewObjectValueTable()

WlzObject* WlzNewObjectValueTable ( WlzObject gObj,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

Creates a new Woolz object using the given object's domain and a new value table, but uses the grey values of the given object's value table.

Returns
New Woolz object.
Parameters
gObjGiven object.
bgdVRequired background value.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_VALUES_NULL.

Referenced by WlzSetBackGroundNewObj().

◆ WlzMakeCuboid()

WlzObject* WlzMakeCuboid ( int  plane1,
int  lastpl,
int  line1,
int  lastln,
int  kol1,
int  lastkl,
WlzGreyType  pixType,
WlzPixelV  bgdV,
WlzPropertyList plist,
WlzObject assocObj,
WlzErrorNum dstErr 
)

Creates a 3D domain object with values, for which the domain is a cuboid and the values are of the given type and initialized to have value zero.

Returns
New 3D domain object with values or NULL on error.
Parameters
plane1First plane.
lastplLast plane.
line1First line.
lastlnLast line.
kol1First column.
lastklLast column.
pixTypePixel type for the grey values. If WLZ_GREY_ERROR is given then no values are created.
bgdVBackground pixel value.
plistProperty list to be attached.
assocObjAssociated object.
dstErrDestination error pointer, may be NULL.

References ALC_ER_NONE, AlcCalloc(), AlcFree(), AlcFreeStackPush(), _WlzValues::core, _WlzDomain::core, _WlzPlaneDomain::domains, _WlzRectValues::freeptr, _WlzDomain::i, _WlzDomain::p, _WlzValues::r, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_3D_DOMAINOBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_GREY_ERROR, WLZ_GREY_TAB_RECT, WLZ_INTERVALDOMAIN_RECT, WLZ_NULL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeValues(), WlzGreySize(), WlzGreyValueTableType(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeRectValueTb(), and WlzMakeVoxelValueTb().

Referenced by WlzBSplineToDomain(), and WlzFromArray1D().

◆ WlzMakeHistogramDomain()

WlzHistogramDomain* WlzMakeHistogramDomain ( WlzObjectType  type,
int  maxBins,
WlzErrorNum dstErr 
)

Allocates space for a histogram domain with the space for the given maximum number of bins of the appropriate type.

Returns
Pointer to object, NULL on error.
Parameters
typehistogram type, one of: WLZ_HISTOGRAMDOMAIN_INT or WLZ_HISTOGRAMDOMAIN_FLOAT
maxBinsMaximum number of histogram bins.
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_MEM_ALLOC.
Source:
WlzMakeStructs.c

References ALC_ER_NONE, AlcCalloc(), AlcFree(), AlcFreeStackPush(), _WlzHistogramDomain::binValues, _WlzGreyP::dbp, _WlzHistogramDomain::freeptr, _WlzGreyP::inp, _WlzHistogramDomain::maxBins, _WlzHistogramDomain::type, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_HISTOGRAMDOMAIN_FLOAT, and WLZ_HISTOGRAMDOMAIN_INT.

Referenced by WlzCopyDomain(), and WlzMakeHistogram().

◆ WlzMakeEmpty()

◆ WlzMakeHistogram()

WlzObject* WlzMakeHistogram ( WlzObjectType  type,
int  maxBins,
WlzErrorNum dstErr 
)

Convenience procedure to make a top-level object with a histogram domain.

Returns
Pointer to a Histogram object, NULL on error.
Parameters
typeType of the histogram domain, one of: WLZ_HISTOGRAMDOMAIN_INT or WLZ_HISTOGRAMDOMAIN_FLOAT.
maxBinsMaximum number of histogram bins.
dstErrError return, values: from WlzMakeHistogramDomain() and WlzMakeMain().
Source:
WlzMakeStructs.c

References _WlzValues::core, _WlzDomain::hist, WLZ_ERR_NONE, WLZ_HISTOGRAM, WlzMakeHistogramDomain(), and WlzMakeMain().

◆ WlzNewGrey()

WlzObject* WlzNewGrey ( WlzObject iobj,
WlzErrorNum dstErr 
)

Make a top-level object with the same domain as iobj (pointer copied and linkcount incremented) and new valuetable with values copied from iobj. If iobj has no valuetable then the returned object will have no value- table. This allows a copy of a 2D grey-value object.

Returns
Pointer to the top-level object, NULL on error.
Parameters
iobjInput object which defines the domain and grey values for which the new grey table will be defined.
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE and errors from WlzNewValueTb(), WlzMakeMain(), WlzInitGreyScan() and WlzNextGreyInterval().
Source:
WlzMakeStructs.c

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzIntervalWSpace::lftpos, _WlzGreyWSpace::pixeltype, _WlzObject::plist, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzValues::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WlzFreeObj(), WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeEmpty(), WlzMakeMain(), WlzNewValueTb(), and WlzNextGreyInterval().

Referenced by WlzCopyValues(), WlzGreyDitherObj(), and WlzSeqPar().

◆ WlzNewValueTb()

WlzRagRValues* WlzNewValueTb ( WlzObject obj,
WlzObjectType  type,
WlzPixelV  backgrnd,
WlzErrorNum dstErr 
)

Create a value table of required type with the same size and shape as the domain of obj. This must be of type WLZ_2D_DOMAINOBJ.

Returns
Pointer to new ragged-rectangle value table structure.
Parameters
objGiven object in which the domain defines minimum coverage of the new value table.
typeValue table type.
backgrndBackground pixel value.
dstErrDestination error pointer, may be NULL.

References AlcFreeStackPush(), AlcMalloc(), _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyV::flv, _WlzRagRValues::freeptr, _WlzRectValues::freeptr, _WlzValues::i, _WlzDomain::i, _WlzGreyP::inp, _WlzIntervalWSpace::intrmn, _WlzGreyV::inv, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzRectValues::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzRectValues::line1, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::nwlpos, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzValues::v, _WlzRectValues::values, _WlzRagRValues::width, _WlzRectValues::width, WLZ_2D_DOMAINOBJ, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_UBYTE, WLZ_RASTERDIR_ILIC, WlzFreeValueTb(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), WlzInitRasterScan(), WlzLineArea(), WlzMakeIntervalValues(), WlzMakeRectValueTb(), WlzMakeValueLine(), WlzMakeValueTb(), and WlzNextInterval().

Referenced by WlzCMeshCurvToImage(), WlzCMeshIntersectDom2D5(), WlzDistanceTransform(), WlzFillBlankPlanes(), WlzGetProjectionFromObject(), WlzGreyTransfer(), WlzIndexObjFromCompound(), WlzIntersectN(), WlzLBTMakeNodeIndexObj2D(), WlzLUTTransformObj(), WlzMakeTiledValuesObj2D(), WlzNewGrey(), WlzNewObjectValues(), WlzNewValuesVox(), WlzRGBAModGradient(), WlzScalarBinaryOp2(), and WlzUnionN().

◆ WlzNewIDomain()

WlzIntervalDomain* WlzNewIDomain ( WlzObjectType  outDomType,
WlzIntervalDomain inDom,
WlzErrorNum dstErr 
)

Make a copy of an intervaldomain.

Returns
Pointer to the new interval domain.
Parameters
outDomTypeInterval domain type, one of: WLZ_INTERVALDOMAIN_INTVL or WLZ_INTERVALDOMAIN_RECT.
inDomInput domain to be copied.
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC or errors from WlzMakeInterval(), WlzMakeIntervalDomain().
Source:
WlzMakeStructs.c

References AlcFreeStackPush(), AlcMalloc(), _WlzIntervalDomain::freeptr, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, _WlzIntervalDomain::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WlzFreeIntervalDomain(), WlzMakeInterval(), and WlzMakeIntervalDomain().

Referenced by WlzCopyDomain(), WlzFillBlankPlanes(), and WlzShiftDomain().

◆ WlzMakeContour()

WlzContour* WlzMakeContour ( WlzErrorNum dstErr)

Makes a new contour data structure.

Returns
Pointer to a WLZContour object.
Parameters
dstErrError return, values: WLZ_ERR_NONE, WLZ_ERR_MEM_ALLOC.
Source:
WlzMakeStructs.c

References AlcCalloc(), _WlzContour::type, WLZ_CONTOUR, WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.

Referenced by WlzAffineTransformContour(), WlzBasisFnTransformContour(), WlzCMeshToContour(), WlzContourGrdObj2D(), WlzCopyDomain(), and WlzShiftDomain().

◆ WlzMakeIndexedValues()

WlzIndexedValues* WlzMakeIndexedValues ( WlzObject obj,
int  rank,
int *  dim,
WlzGreyType  vType,
WlzValueAttach  attach,
WlzErrorNum dstErr 
)

Makes a new indexed value table.

Returns
New index value table or NULL on error.
Parameters
objGiven object, the domain of which is used to determine the value allocation.
rankThe rank of the individual values.
dimThe dimensions of individual indexed values.
vTypeThe type of the data in the individual values.
attachSpecifies what the values are to be attached to.
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlcMalloc(), AlcVectorNew(), _WlzIndexedValues::attach, _AlcVector::blkCnt, _AlcVector::blkSz, _WlzDomain::cm2, _WlzDomain::cm2d5, _WlzDomain::cm3, _WlzDomain::core, _WlzIndexedValues::dim, _WlzObject::domain, _WlzCMeshRes::elm, _WlzCMeshRes::nod, _WlzIndexedValues::rank, _WlzCMesh2D::res, _WlzCMesh2D5::res, _WlzCMesh3D::res, _WlzCoreDomain::type, _WlzIndexedValues::type, _WlzIndexedValues::values, _WlzCMeshEntRes::vec, _WlzIndexedValues::vType, WLZ_CMESH_2D, WLZ_CMESH_2D5, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_INDEXED_VALUES, WLZ_VALUE_ATTACH_ELM, WLZ_VALUE_ATTACH_NOD, WlzFreeIndexedValues(), and WlzGreySize().

Referenced by WlzBasisFnInvertMakeCMeshTr2D(), WlzBasisFnInvertMakeCMeshTr3D(), WlzBasisFnMakeCMeshTr2D(), WlzBasisFnMakeCMeshTr3D(), WlzCMeshComputeCurvaturesFromNodNorm(), WlzCMeshComputeNormalsElm(), WlzCMeshComputeNormalsIxv2D5(), WlzCMeshComputeNormalsNod(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), WlzCMeshMeshMeshProduct(), WlzCMeshSetDispFromField(), WlzCMeshTransformFromObj(), WlzCopyObject(), and WlzCopyScaleCMeshValue().

◆ WlzExtendIndexedValues()

WlzErrorNum WlzExtendIndexedValues ( WlzIndexedValues ixv,
size_t  n 
)

Extends the given indexed value table. This is just a wrapper for AlcVectorExtend().

Returns
Woolz error code.
Parameters
ixvGiven indexed values.
nNumber of values to extend to.

References ALC_ER_NONE, AlcVectorExtend(), _WlzIndexedValues::values, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, and WLZ_ERR_VALUES_NULL.

◆ WlzMakeTiledValues()

WlzTiledValues* WlzMakeTiledValues ( int  dim,
int  vRank,
WlzErrorNum dstErr 
)

Allocates a new tiled value table, but without allocating any indices or tiles.

Returns
New tiled values.
Parameters
dimDimension.
vRankRank of the individual values, zero for scalar values, one for vector values etc....
dstErrDestination error pointer, may be NULL.

References AlcCalloc(), AlcFree(), _WlzTiledValues::dim, _WlzTiledValues::fd, _WlzTiledValues::nIdx, _WlzTiledValues::type, _WlzTiledValues::vDim, _WlzTiledValues::vRank, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_INT, WLZ_GREY_TAB_TILED, and WLZ_GREY_TABLE_TYPE.

Referenced by WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), and WlzNewTiledValues().

◆ WlzFreeTiledValues()

◆ WlzNewTiledValues()

WlzTiledValues* WlzNewTiledValues ( WlzTiledValues gVal,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

Creates a new tiled values table which shares both the grey value tiles and indexing with the given tiled values. This is done by using the original_table field.

Returns
New tiled values or NULL on error.
Parameters
gValThe given tiled values.
bgdVBackground value for the new values.
dstErrDestination error pointer, may be NULL.

References _WlzTiledValues::bckgrnd, _WlzTiledValues::dim, _WlzTiledValues::fd, _WlzTiledValues::indices, _WlzTiledValues::kol1, _WlzTiledValues::lastkl, _WlzTiledValues::lastln, _WlzTiledValues::lastpl, _WlzTiledValues::line1, _WlzTiledValues::nIdx, _WlzTiledValues::numTiles, _WlzTiledValues::original_table, _WlzTiledValues::plane1, _WlzValues::t, _WlzTiledValues::tileOffset, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzTiledValues::type, _WlzGreyP::v, _WlzTiledValues::vDim, _WlzTiledValues::vpe, _WlzTiledValues::vRank, WLZ_ERR_NONE, WLZ_ERR_VALUES_NULL, WlzAssignValues(), WlzFreeTiledValues(), and WlzMakeTiledValues().

◆ WlzMakeTiledValuesFromObj()

WlzObject* WlzMakeTiledValuesFromObj ( WlzObject gObj,
size_t  tileSz,
int  copyValues,
WlzGreyType  gType,
unsigned int  vRank,
unsigned int *  vDim,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

Creates a tiled object from the given object.

Returns
New tiled object or NULL on error.
            The tile size specifies the number of values that the
            tiles will contain and must be an integral power of two.
            The actual size in bytes of the tiles will vary with
            grey type.
Parameters
gObjGiven object which must have an appropriate type for a tiled object. The valid types are currently WLZ_2D_DOMAINOBJ and WLZ_3D_DOMAINOBJ objects with values.
tileSzThe required tile size.
copyValuesNon zero if the grey values should be copied to the tiled object.
gTypeRequired grey type for values table.
vRankRank of the individual values, zero for scalar values, one for vector values etc....
vDimArray of size vRank with individual value dimensions, not used if vRank is zero.
bgdVrequired background value.
dstErrDestination error pointer, may be NULL.

References _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzMakeTiledValuesObj2D(), and WlzMakeTiledValuesObj3D().

Referenced by WlzFromArray1D().

◆ WlzMakeTiledValuesTiles()

◆ WlzMakeTiledValueBuffer()

◆ WlzFreeTiledValueBuffer()

void WlzFreeTiledValueBuffer ( WlzTiledValueBuffer tBuf)

Frees the given tiled values buffer including it's line buffer.

Parameters
tBufGiven tiled values, may be NULL.

References AlcFree(), _WlzTiledValueBuffer::lnbuf, and _WlzGreyP::v.

Referenced by WlzEndGreyScan().

◆ WlzMakeTiledValuesObj2D()

WlzObject* WlzMakeTiledValuesObj2D ( WlzObject gObj,
size_t  tileSz,
int  setTiles,
WlzGreyType  gType,
unsigned int  vRank,
unsigned int *  vDim,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

Creates a 2D domain object which has the same domain as the given 2D domain object but a tiled value table.

Returns
New tiled object or NULL on error.
            The tile size specifies the number of values that the
            tiles will contain and must be an integral power of two.
            The actual size in bytes of the tiles will vary with
            grey type.

            If the given object must have valid values but the
            tiles these are copied to are not allocated if the
            setTiles flag is not set.
Parameters
gObjGiven object known to be valid.
tileSzThe required tile size.
setTilesFlag which must be set for the tiles to be allocated and their values set.
gTypeRequired grey type for values table.
vRankRank of the individual values, zero for scalar values, one for vector values etc....
vDimArray of size vRank with individual value dimensions, not used if vRank is zero.
bgdVrequired background value.
dstErrDestination error pointer, may be NULL.

References AlcFree(), AlgBitNextPowerOfTwo(), _WlzTiledValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzTiledValues::dim, _WlzObject::domain, _WlzDomain::i, _WlzTiledValues::indices, _WlzGreyV::inv, _WlzIntervalDomain::kol1, _WlzTiledValues::kol1, _WlzIntervalDomain::lastkl, _WlzTiledValues::lastkl, _WlzIntervalDomain::lastln, _WlzTiledValues::lastln, _WlzIntervalDomain::line1, _WlzTiledValues::line1, _WlzTiledValues::nIdx, _WlzTiledValues::numTiles, _WlzValues::t, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzPixelV::type, _WlzObject::type, _WlzTiledValues::type, _WlzGreyP::v, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzTiledValues::vDim, _WlzTiledValues::vpe, _WlzTiledValues::vRank, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_TILED, WLZ_INTERPOLATION_NEAREST, WLZ_TRANSFORM_2D_AFFINE, WlzAffineTransformObj(), WlzAffineTransformScaleSet(), WlzAssignObject(), WlzCopyObjectGreyValues(), WlzFreeDomain(), WlzFreeObj(), WlzFreeValueTb(), WlzGreySetHilbertRankValues(), WlzGreySetIncValues(), WlzGreyValueTableType(), WlzMakeAffineTransform(), WlzMakeMain(), WlzMakeRectangleObject(), WlzMakeTiledValues(), WlzMakeTiledValuesTiles(), WlzNewValueTb(), WlzShiftDomain(), WlzStructDilation(), WlzTiledValuesValPerElm(), WlzToArray2D(), and WlzValueConvertPixel().

Referenced by WlzMakeTiledValuesFromObj().

◆ WlzMakeTiledValuesObj3D()

WlzObject* WlzMakeTiledValuesObj3D ( WlzObject gObj,
size_t  tileSz,
int  setTiles,
WlzGreyType  gType,
unsigned int  vRank,
unsigned int *  vDim,
WlzPixelV  bgdV,
WlzErrorNum dstErr 
)

Creates a 3D domain object which has the same domain as the given 3D domain object but a tiled value table.

Returns
New tiled object or NULL on error.
            The tile size specifies the number of values that the
            tiles will contain and must be an integral power of two.
            The actual size in bytes of the tiles will vary with
            grey type.
Parameters
gObjGiven object known to be valid.
tileSzThe required tile size.
setTilesFlag which must be set for the tiles to be allocated and their values set.
gTypeRequired grey type for values table.
vRankRank of the individual values, zero for scalar values, one for vector values etc....
vDimArray of size vRank with individual value dimensions, not used if vRank is zero.
bgdVrequired background value.
dstErrDestination error pointer, may be NULL.

References AlcFree(), AlgBitNextPowerOfTwo(), _WlzTiledValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzTiledValues::dim, _WlzObject::domain, _WlzTiledValues::indices, _WlzGreyV::inv, _WlzPlaneDomain::kol1, _WlzTiledValues::kol1, _WlzPlaneDomain::lastkl, _WlzTiledValues::lastkl, _WlzPlaneDomain::lastln, _WlzTiledValues::lastln, _WlzPlaneDomain::lastpl, _WlzTiledValues::lastpl, _WlzPlaneDomain::line1, _WlzTiledValues::line1, _WlzTiledValues::nIdx, _WlzTiledValues::numTiles, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzTiledValues::plane1, _WlzValues::t, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzPixelV::type, _WlzObject::type, _WlzTiledValues::type, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzTiledValues::vDim, _WlzValues::vox, _WlzTiledValues::vpe, _WlzTiledValues::vRank, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_TILED, WLZ_INTERPOLATION_NEAREST, WLZ_TRANSFORM_3D_AFFINE, WlzAffineTransformObj(), WlzAffineTransformScaleSet(), WlzAssignObject(), WlzCopyObjectGreyValues(), WlzFreeAffineTransform(), WlzFreeDomain(), WlzFreeObj(), WlzFreeVoxelValueTb(), WlzGreySetHilbertRankValues(), WlzGreySetIncValues(), WlzGreyValueTableType(), WlzMakeAffineTransform(), WlzMakeCuboidObject(), WlzMakeMain(), WlzMakeTiledValues(), WlzMakeTiledValuesTiles(), WlzNewValuesVox(), WlzShiftDomain(), WlzStructDilation(), WlzTiledValuesValPerElm(), WlzToArray3D(), and WlzValueConvertPixel().

Referenced by WlzDGTensorSDFeature(), and WlzMakeTiledValuesFromObj().