Woolz Image Processing
Version 1.7.5
|
Files | |
file | WlzDilation.c |
Functions for dilating objects with spatial domains. | |
file | WlzDistTransform.c |
Distance transform functions which calculate the distance of every pixel/voxel in a foreground object from a reference object. | |
file | WlzDomainNearby.c |
Functions for computing the portion of a domain which is nearby (all pixels/voxels less than a given distance from) given locations. | |
file | WlzErosion.c |
Morphological erosion of domain objects. | |
file | WlzErosion4.c |
Performs 4-connected erosion on domain objects. | |
file | WlzStdStructElements.c |
Standard structuring elements in 2D and 3D. | |
file | WlzStructDilation.c |
Performs dilation using a structuring element. | |
file | WlzStructErosion.c |
Performs erosion using a structuring element. | |
Enumerations | |
enum | _WlzSpecialStructElmType { WLZ_SPEC_STRUCT_ELM_H4, WLZ_SPEC_STRUCT_ELM_EX4, WLZ_SPEC_STRUCT_ELM_A8, WLZ_SPEC_STRUCT_ELM_H6, WLZ_SPEC_STRUCT_ELM_H5, WLZ_SPEC_STRUCT_ELM_H7, WLZ_SPEC_STRUCT_ELM_A3, WLZ_SPEC_STRUCT_ELM_E1, WLZ_SPEC_STRUCT_ELM_E2, WLZ_SPEC_STRUCT_ELM_V2 } |
Special structuring elements for morphological operations. Typedef: WlzSpecialStructElmType. More... | |
Functions | |
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... | |
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... | |
Special structuring elements for morphological operations. Typedef: WlzSpecialStructElmType.
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.
obj | Given object. |
connectivity | Required type of conectivity. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzIntervalLine::nintvs, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_18_CONNECTED, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_6_CONNECTED, WLZ_8_CONNECTED, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_CONNECTIVITY_TYPE, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_MAX, WLZ_MIN, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignObject(), WlzFreeDomain(), WlzFreeObj(), WlzIDomMaxItvLn(), WlzIntervalCount(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzStandardPlaneDomain(), and WlzUnionN().
Referenced by WlzContourGrdObj2D(), WlzDistanceTransform(), WlzHyThreshold(), WlzLabel3D(), WlzMakeStdStructElement(), and WlzRegConCalcRCC().
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.
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.
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_LINEAR, 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(), WlzInteriority(), WlzOffsetDist(), and WlzRegConCalcRCC().
WlzObject* WlzDomainNearby3D | ( | WlzObject * | refObj, |
int | nPos, | ||
WlzDVertex3 * | pos, | ||
WlzDistanceType | dFn, | ||
double | dMax, | ||
WlzErrorNum * | dstErr | ||
) |
This function is just a wrapper for WlzDomainNearby().
refObj | Reference object which must be of type WLZ_EMPTY_OBJ or WLZ_3D_DOMAINOBJ. |
nPos | Number of locations. |
pos | 3D locations. |
dFn | The connectivity to use when establishing distance. This must be one of:
|
dMax | Maximum distance for a pixel/voxel to be considered nearby. |
dstErr | Destination error pointer, may be NULL. |
References _WlzVertexP::d3, and WlzDomainNearby().
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.
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:
|
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* WlzErosion | ( | WlzObject * | obj, |
WlzConnectType | connectivity, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates the morphological erosion of a woolz object with a structuring element defined by the connectivity.
obj | Object to be eroded, must be a 2D or 3D domain object (including a WlzTransObj). |
connectivity | Type of connectivity. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzIntervalLine::nintvs, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_18_CONNECTED, WLZ_26_CONNECTED, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_4_CONNECTED, WLZ_6_CONNECTED, WLZ_8_CONNECTED, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_CONNECTIVITY_TYPE, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_MAX, WLZ_MIN, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignObject(), WlzErosion4(), WlzFreeDomain(), WlzFreeObj(), WlzIDomMaxItvLn(), WlzIntersectN(), WlzIntervalCount(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), and WlzStandardPlaneDomain().
Referenced by WlzBoundaryDomain(), WlzBoundToObj(), WlzContourRBFBndObj3D(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzThinToPoints(), and WlzVerticesFromObjBnd3I().
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.
obj | Input object. |
dstErr | Error return. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, _WlzObject::type, _WlzIntervalDomain::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_MAX, WLZ_MIN, WLZ_TRANS_OBJ, WlzFreeDomain(), WlzIDomMaxItvLn(), WlzIntervalCount(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), and WlzMakeMain().
Referenced by WlzErosion().
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.
WLZ_SPEC_STRUCT_ELM_H4 | 2D SE, origin - centre: |
| |||||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_EX4 | 2D SE, origin - centre: |
| |||||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_A8 | 2D SE, origin - centre: |
| |||||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_H6 elmIndex = 0,1,2 | 2D SE, origin - centre: |
|
|
| |||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_H6 elmIndex = 3,4,5 | 2D SE, origin - centre: |
|
|
| |||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_H5 elmIndex = 0,1,2,3 | 2D SE, origin - centre: |
|
|
|
| ||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_H7 elmIndex = 0,1,2,3 | 2D SE, origin - centre: |
|
|
|
| ||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_A3 elmIndex = 0,1,2,3 | 2D SE, origin - centre: |
|
|
|
| ||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_E1 | 2D SE, origin - left:/td> |
| |||||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_E2 | 2D SE, origin - centre: |
| |||||||||||||||||||||||||||||||||||||||
WLZ_SPEC_STRUCT_ELM_V2 | 2D SE, origin - centre: |
|
eType | Enumerated type of the requested special element. |
elmIndex | Additional parameter for a particular element if required (see details). |
dstErr | Destination error pointer, may be NULL. |
References AlcFreeStackPush(), AlcMalloc(), _WlzDomain::core, _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalLine::nintvs, _WlzDomain::p, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_SPEC_STRUCT_ELM_A3, WLZ_SPEC_STRUCT_ELM_A8, WLZ_SPEC_STRUCT_ELM_E1, WLZ_SPEC_STRUCT_ELM_E2, WLZ_SPEC_STRUCT_ELM_EX4, WLZ_SPEC_STRUCT_ELM_H4, WLZ_SPEC_STRUCT_ELM_H5, WLZ_SPEC_STRUCT_ELM_H6, WLZ_SPEC_STRUCT_ELM_H7, WLZ_SPEC_STRUCT_ELM_V2, WlzAssignDomain(), WlzFreePlaneDomain(), WlzMakeIntervalDomain(), and WlzMakePlaneDomain().
WlzObject* WlzMakeSinglePixelObject | ( | WlzObjectType | oType, |
int | k, | ||
int | l, | ||
int | p, | ||
WlzErrorNum * | dstErr | ||
) |
Make a single pixel/voxel object at the specified coordinate position.
oType | Object type - WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ . |
k | Column (x) coordinate. |
l | Line (y) coordinate. |
p | Plane (z) coordinate. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, WLZ_ERR_NONE, WlzFreeDomain(), and WlzMakeMain().
Referenced by WlzDomainNearby(), WlzMakeCircleObject(), WlzMakeMarkers(), WlzMakeQuadrilateral(), WlzMakeRectangleObject(), WlzMakeStdStructElement(), and WlzPointsToDomObj().
WlzObject* WlzMakeCircleObject | ( | double | radius, |
double | x, | ||
double | y, | ||
WlzErrorNum * | dstErr | ||
) |
Generate a discretised circle domain centered at (x,y).
radius | Circle radius. |
x | Column/x coordinate of the circle centre. |
y | Row/y coordinate of the circle centre. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlcFreeStackPush(), _WlzValues::core, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzInterval::iright, WLZ_2D_DOMAINOBJ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_INTERVALDOMAIN_INTVL, WLZ_NINT, WlzFreeIntervalDomain(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakeSinglePixelObject(), and WlzStandardIntervalDomain().
Referenced by WlzCMeshFromObj2D(), WlzDrawDomainObj(), WlzMakeSphereObject(), and WlzMeshFromObjBox().
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.
radiusX | Column half-width of rectangle |
radiusY | Line (y) half-width of rectangle |
x | Column (x) rectangle centre. |
y | Line (y) rectangle centre. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::i, WLZ_2D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_INTERVALDOMAIN_RECT, WLZ_NINT, WlzMakeIntervalDomain(), WlzMakeMain(), and WlzMakeSinglePixelObject().
Referenced by WlzCMeshFromObj2D(), WlzMakeCuboidObject(), WlzMakeTiledValuesObj2D(), and WlzPointsFromDomObj().
WlzObject* WlzMakeSphereObject | ( | WlzObjectType | oType, |
double | radius, | ||
double | x, | ||
double | y, | ||
double | z, | ||
WlzErrorNum * | dstErr | ||
) |
Make a spherical domain object.
oType | Object type - make a circle if 2D. |
radius | Sphere radius |
x | Column (x) centre. |
y | Line (y) centre. |
z | Plane (x) centre. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::p, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_NINT, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzMakeCircleObject(), WlzMakeMain(), WlzMakePlaneDomain(), and WlzStandardPlaneDomain().
Referenced by WlzConComThreshold(), WlzContourRBFBndObj3D(), WlzDistanceTransform(), WlzMakeMarkers(), WlzMakeStdStructElement(), WlzOffsetDist(), WlzPointsToDomObj(), and WlzRegConCalcRCC().
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).
oType | Object type use WlzMakerectangleObject() if 2D. |
radiusX | Cuboid half-width (x) |
radiusY | Cuboid half-height (y). |
radiusZ | Cuboid half-depth (z). |
x | Column (x) centre. |
y | Line (y) centre. |
z | Plane (z) centre. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::p, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_NINT, WLZ_PLANEDOMAIN_DOMAIN, WlzAssignDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeRectangleObject(), and WlzStandardPlaneDomain().
Referenced by WlzCMeshFromObj3D(), WlzMakeTiledValuesObj3D(), and WlzPointsFromDomObj().
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].
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.
Referenced by WlzDrawDomainObj().
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.
oType | Object type - WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ . |
dType | Distance metric. |
radius | Sphere radius. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_18_DISTANCE, WLZ_26_DISTANCE, WLZ_4_CONNECTED, WLZ_4_DISTANCE, WLZ_6_DISTANCE, WLZ_8_CONNECTED, WLZ_8_DISTANCE, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_TYPE, WLZ_EUCLIDEAN_DISTANCE, WLZ_NINT, WLZ_OCTAGONAL_DISTANCE, WlzDilation(), WlzFreeObj(), WlzMakeEmpty(), WlzMakeSinglePixelObject(), and WlzMakeSphereObject().
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.
obj | Input object to be dilated |
structElm | Structuring element. |
dstErr | Error return. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzIntervalLine::nintvs, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignObject(), WlzFreeDomain(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzIDomMaxItvLn(), WlzIntervalCount(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzNewIDomain(), WlzStandardPlaneDomain(), and WlzUnionN().
Referenced by WlzCMeshFromObj2D(), WlzCMeshFromObj3D(), WlzContourRBFBndObj3D(), WlzDistanceTransform(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzMeshFromObjBox(), WlzOffsetDist(), and WlzRegConCalcRCC().
WlzObject* WlzStructErosion | ( | WlzObject * | obj, |
WlzObject * | structElm, | ||
WlzErrorNum * | dstErr | ||
) |
Performs erosion using a structuring element.
obj | Given object to be eroded. |
structElm | Structuring element. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzIntervalDomain::freeptr, _WlzDomain::i, _WlzInterval::ileft, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzIntervalLine::nintvs, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzIntervalDomain::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignObject(), WlzFreeDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzIDomMaxItvLn(), WlzIntersectN(), WlzIntervalCount(), WlzMakeEmpty(), WlzMakeInterval(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzNewIDomain(), WlzStandardIntervalDomain(), and WlzStandardPlaneDomain().
Referenced by WlzContourRBFBndObj3D(), and WlzPointsFromDomObj().