|
WlzObject * | WlzDilation (WlzObject *obj, WlzConnectType connectivity, WlzErrorNum *dstErr) |
| Dilate the given object using the given connectivity type. Since the dilated object is bigger than the original, the size of the valuetable may be smaller than the dilated object. User has to take fully responsibility for using grey value of dilated object. More...
|
|
WlzCompoundArray * | WlzDistAllNearest (WlzObject *gForObj, WlzObject *gRefObj, WlzDistanceType dFn, WlzObject **dstDstObj, WlzErrorNum *dstErr) |
| Computes the nearest points in a reference domain at all points in a foreground domain and (optionally) the distance of the reference domain points from their nearest points within the reference domain. The returned compound array object has integer reference point coordinates with column (x), line (y) and for 3D objects plane (z) having indices 0, 1 and 2 respectively. Distances are correct for the given distance function and are not normalised to remove over estimates with respect to constrained Euclidean distance. The intersection of the foreground and reference object is be used to ensure that the reference object is within the foreground object. More...
|
|
WlzObject * | WlzDistanceTransform (WlzObject *forObj, WlzObject *refObj, WlzDistanceType dFn, double dParam, double dMax, WlzErrorNum *dstErr) |
| Computes the distance of every pixel/voxel in the foreground object from the reference object. More...
|
|
WlzObject * | WlzDomainNearby3D (WlzObject *refObj, int nPos, WlzDVertex3 *pos, WlzDistanceType dFn, double dMax, WlzErrorNum *dstErr) |
| This function is just a wrapper for WlzDomainNearby(). More...
|
|
WlzObject * | WlzDomainNearby (WlzObject *refObj, int nPos, WlzVertexP pos, WlzDistanceType dFn, double dMax, WlzErrorNum *dstErr) |
| Computes a new domain in which all pixels/voxels are nearby given location(s) and within the reference domain. More...
|
|
WlzObject * | WlzErosion (WlzObject *obj, WlzConnectType connectivity, WlzErrorNum *dstErr) |
| Calculates the morphological erosion of a woolz object with a structuring element defined by the connectivity. More...
|
|
WlzObject * | WlzErosion4 (WlzObject *obj, WlzErrorNum *dstErr) |
| 4-connected erosion of a woolz domain object.2D objects only.This should not really be publicly accessible, but is present for historical reasons. Therefore the prototype does not appear in WlzProto.h. WlzErosion should be used to access 4-connected erosion. More...
|
|
WlzObject * | WlzMakeSpecialStructElement (WlzSpecialStructElmType eType, int elmIndex, WlzErrorNum *dstErr) |
| Return a pointer to a specific requested "special" structuring element. These are inherited from the original woolz library with rather cryptic names. See detail for more explanation of the elements and the additional parameters. More...
|
|
WlzObject * | WlzMakeSinglePixelObject (WlzObjectType oType, int k, int l, int p, WlzErrorNum *dstErr) |
| Make a single pixel/voxel object at the specified coordinate position. More...
|
|
WlzObject * | WlzMakeCircleObject (double radius, double x, double y, WlzErrorNum *dstErr) |
| Generate a discretised circle domain centered at (x,y). More...
|
|
WlzObject * | WlzMakeRectangleObject (double radiusX, double radiusY, double x, double y, WlzErrorNum *dstErr) |
| Generate a rectangular object centered at (x,y) with half-width radiusX and half-height radius Y. More...
|
|
WlzObject * | WlzMakeSphereObject (WlzObjectType oType, double radius, double x, double y, double z, WlzErrorNum *dstErr) |
| Make a spherical domain object. More...
|
|
WlzObject * | WlzMakeCuboidObject (WlzObjectType oType, double radiusX, double radiusY, double radiusZ, double x, double y, double z, WlzErrorNum *dstErr) |
| Generate a cuboid object centered at (x,y,z). More...
|
|
WlzObject * | WlzMakeQuadrilateral (double x0, double y0, double x1, double y1, double x2, double y2, double x3, double y3, WlzErrorNum *dstErr) |
| Generate 2D interval domain object corresponding to the arbitrarily oriented quadrilateral with the given ordered vertex coordinates. The ordering is such that the vertices allow the rectangle to be drawn by line segments conecting v[i] to v[(i + 1)%4], with i \(\in\) [0-3]. More...
|
|
WlzObject * | WlzMakeStdStructElement (WlzObjectType oType, WlzDistanceType dType, double radius, WlzErrorNum *dstErr) |
| Makes a standard structure element - basicaly a sphere but with the appropriate connectivity or distance metric. More...
|
|
WlzObject * | WlzStructDilation (WlzObject *obj, WlzObject *structElm, WlzErrorNum *dstErr) |
| Dilate an object with respect to the given structuring element. This is defined as the domain obtained as the union of the SE placed at every pixel of the input domain. More...
|
|
WlzObject * | WlzStructErosion (WlzObject *obj, WlzObject *structElm, WlzErrorNum *dstErr) |
| Performs erosion using a structuring element. More...
|
|
Computes the nearest points in a reference domain at all points in a foreground domain and (optionally) the distance of the reference domain points from their nearest points within the reference domain. The returned compound array object has integer reference point coordinates with column (x), line (y) and for 3D objects plane (z) having indices 0, 1 and 2 respectively. Distances are correct for the given distance function and are not normalised to remove over estimates with respect to constrained Euclidean distance. The intersection of the foreground and reference object is be used to ensure that the reference object is within the foreground object.
- Returns
- A Woolz compound array object or NULL on error.
- Parameters
-
gForObj | Given foreground object. |
gRefObj | Given reference object. |
dFn | Distance function which must be appropriate to the dimension of the foreground and reference objects. |
dstDstObj | Destination distance object pointer for the (float) distance values, may be NULL. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzGreyV::inv, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, WLZ_0_CONNECTED, WLZ_18_CONNECTED, WLZ_18_DISTANCE, WLZ_26_CONNECTED, WLZ_26_DISTANCE, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_4_DISTANCE, WLZ_6_CONNECTED, WLZ_6_DISTANCE, WLZ_8_CONNECTED, WLZ_8_DISTANCE, WLZ_COMPOUND_ARR_1, 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_OCTAGONAL_DISTANCE, WlzGreyValueTableType(), WlzIntersect2(), WlzMakeCompoundArray(), and WlzMakeMain().
Computes the distance of every pixel/voxel in the foreground object from the reference object.
- Returns
- Distance object which shares the given foreground object's domain and has integer distance values, null on error.
A distance transform maps all position within a forground domain to their distances from a reference domain. The distance transforms implemented within this function use efficient morphological primitives.
Given two domains, \(\Omega_r\) the reference domain and \(\Omega_f\) the domain specifying the region of interest, a domain with a thin shell \(\Omega_i\) is iteratively expanded from it's initial domain corresponding to the reference domain \(\Omega_r\). At each iteration \(\Omega_i\) is dilated and clipped by it's intersection with \(\Omega_f\) until \(\Omega_i\) becomes the null domain \(\emptyset\). At each iteration the current distance is recorded in a value table which covers the domain \(\Omega_f\).
An octagonal distance scheme may be used in which the distance metric is alternated between 4 and 8 connected for 2D and 6 and 26 connectivities in 3D. See: G. Borgefors. "Distance Transformations in Arbitrary
Dimensions" CVGIP 27:321-345, 1984.
An approximate Euclidean distance transform may be computed
by: Scaling the given foreground and reference objects using
the given approximation scale parameter, dilating the
reference domain using a sphere with a radius having the same
value as the scale parameter and then finaly sampling the
scaled distances.
- Parameters
-
forObj | Foreground object. |
refObj | Reference object. |
dFn | Distance function which must be appropriate to the dimension of the foreground and reference objects. |
dParam | Parameter required for distance function. Currently only WLZ_APX_EUCLIDEAN_DISTANCE requires a parameter. In this case the parameter is the approximation scale. |
dMax | Maximum distance before itteration stops, <= 0 implies an infinite maximum distance. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyV::inv, _WlzDomain::p, _WlzDomain::pts, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzValues::v, _WlzVoxelValues::values, _WlzValues::vox, WLZ_0_CONNECTED, WLZ_18_CONNECTED, WLZ_18_DISTANCE, WLZ_26_CONNECTED, WLZ_26_DISTANCE, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_4_DISTANCE, WLZ_6_CONNECTED, WLZ_6_DISTANCE, WLZ_8_CONNECTED, WLZ_8_DISTANCE, WLZ_APX_EUCLIDEAN_DISTANCE, WLZ_ERR_CONNECTIVITY_TYPE, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_UNIMPLEMENTED, WLZ_EUCLIDEAN_DISTANCE, WLZ_GREY_DOUBLE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_INTERPOLATION_NEAREST, WLZ_OCTAGONAL_DISTANCE, WLZ_POINTS, WLZ_TRANSFORM_2D_AFFINE, WLZ_TRANSFORM_3D_AFFINE, WLZ_VOXELVALUETABLE_GREY, WlzAffineTransformFromScale(), WlzAffineTransformObj(), WlzAssignObject(), WlzAssignValues(), WlzDiffDomain(), WlzDilation(), WlzFreeAffineTransform(), WlzFreeObj(), WlzGreySetValue(), WlzGreyValueTableType(), WlzIntersect2(), WlzIntersectN(), WlzIsEmpty(), WlzMakeMain(), WlzMakeSphereObject(), WlzMakeVoxelValueTb(), WlzNewValuesVox(), WlzNewValueTb(), WlzPointsToDomObj(), and WlzStructDilation().
Referenced by WlzDomainNearby(), WlzLineSkeleton(), WlzLineSkeletonSegment(), and WlzOffsetDist().
Computes a new domain in which all pixels/voxels are nearby given location(s) and within the reference domain.
- Returns
- A new domain in which all pixels/voxels are nearby the given location(s). The object returned will either be of the same type as the reference object or an empty object if (all) the given location(s) are outside of the reference object's domain. On error a NULL pointer will be returned.
- Parameters
-
refObj | Reference object which must be of type WLZ_EMPTY_OBJ, WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ. |
nPos | Number of locations. |
pos | Locations which are either of type WlzDVertex2 if the given object is of type WLZ_2D_DOMAINOBJ or WlzDVertex3 if the given object is of type WLZ_3D_DOMAINOBJ. |
dFn | The connectivity to use when establishing distance. This must be one of:
-
WLZ_OCTAGONAL_DISTANCE
-
WLZ_4_DISTANCE
-
WLZ_6_DISTANCE
-
WLZ_8_DISTANCE
-
WLZ_18_DISTANCE
-
WLZ_26_DISTANCE
Distances must be appropriate for the given object type although all are acceptable for an empty object. |
dMax | Maximum distance for a pixel/voxel to be considered nearby. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlcFree(), _WlzDomain::core, _WlzVertexP::d2, _WlzVertexP::d3, _WlzObject::domain, _WlzDomain::i, _WlzGreyV::inv, _WlzDomain::p, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_18_DISTANCE, WLZ_26_DISTANCE, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_DISTANCE, WLZ_6_DISTANCE, WLZ_8_DISTANCE, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_INT, WLZ_OCTAGONAL_DISTANCE, WLZ_THRESH_HIGH, WLZ_VTX_2_NINT, WLZ_VTX_3_NINT, WLZ_VTX_3_ZERO, WlzAssignObject(), WlzDistanceTransform(), WlzFreeObj(), WlzInsideDomain2D(), WlzInsideDomain3D(), WlzMakeEmpty(), WlzMakeSinglePixelObject(), WlzThreshold(), WlzUnion2(), and WlzUnionN().
Referenced by WlzDomainNearby3D().
WlzObject* WlzMakeQuadrilateral |
( |
double |
x0, |
|
|
double |
y0, |
|
|
double |
x1, |
|
|
double |
y1, |
|
|
double |
x2, |
|
|
double |
y2, |
|
|
double |
x3, |
|
|
double |
y3, |
|
|
WlzErrorNum * |
dstErr |
|
) |
| |
Generate 2D interval domain object corresponding to the arbitrarily oriented quadrilateral with the given ordered vertex coordinates. The ordering is such that the vertices allow the rectangle to be drawn by line segments conecting v[i] to v[(i + 1)%4], with i \(\in\) [0-3].
- Returns
- Object with quadrilateral domain.
- Parameters
-
x0 | Column coordinate of the first vertex. |
y0 | Row coordinate of the first vertex. |
x1 | Column coordinate of the second vertex. |
y1 | Row coordinate of the second vertex. |
x2 | Column coordinate of the third vertex. |
y2 | Row coordinate of the third vertex. |
x3 | Column coordinate of the forth vertex. |
y3 | Row coordinate of the forth vertex. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlcFreeStackPush(), _WlzValues::core, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzInterval::iright, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_INTERVALDOMAIN_INTVL, WlzFreeDomain(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakeSinglePixelObject(), WlzRasterLineSetItv2D(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.