Woolz Image Processing
Version 1.8.3
|
Files | |
file | WlzArea.c |
Computes the area of an object. | |
file | WlzBoundingBox.c |
Functions for computing the axis aligned bounding box of objects. | |
file | WlzBSpline.c |
Functions to create and compute B-spline domain objects. | |
file | WlzCCor.c |
Computes the cross correlation of two objects. | |
file | WlzCentrality.c |
Functions for computing the centrality of a feature domain with respect to a boundary domain. See WlzCentrality(). | |
file | WlzCentreOfMass.c |
Computes the centre of mass of objects. | |
file | WlzDistMetric.c |
Functions to compute the Hausdorff distance, mean nearest neighbour and the median nearest neighbour distances between two datasets. | |
file | WlzGreyExtremum.c |
Finds the location of extremum values within an object. | |
file | WlzGreyStats.c |
Calculates simple statistics about an object's grey values. | |
file | WlzGreyValueMixing_s.c |
Functions to mix the grey values of two woolz object and produce a new object using \[ o = (1 - x) o_1 + x o_2 \] . | |
file | WlzInteriority.c |
Functions to compute an interiority scores. | |
file | WlzLineArea.c |
Computes the line area of an object. | |
file | WlzLineSkeleton.c |
Functions to compute the line skeleton of an object's domain. | |
file | WlzNMSuppress.c |
A non-maximal supression filter, which constructs a new domain object using a Canny-like non-maximal suppression algorithm. The domain is the non-maximally suppressed domain and the values are the encoded gradient direction. | |
file | WlzNObjGreyStats.c |
Calculates statistics for grey values across the objects of the given compound object. | |
file | WlzOccupancy.c |
Functions for computing the occupancy of domains. | |
file | WlzOffsetDist.c |
Functions to compute offset distance objects. | |
file | WlzPoints.c |
Functions for handling point domains. | |
file | WlzRGBAGreyStats.c |
Calculates simple quick statistics for a domain object with RGBA values. | |
file | WlzSampleValuesAndCoords.c |
Extracts values and coordinates from a Woolz object with grey values using a sampoling function. | |
file | WlzScalarFeatures.c |
Functions for extracting scalar features from objects. | |
file | WlzTensor.c |
Functions which derive and manipulate tensor quantities. | |
file | WlzThinToPoints.c |
Functions for extracting point locations by thinnning. | |
file | WlzVerticies.c |
Functions for extracting vertices from objects represented by vertices, eg polylines, boundlists and contours. | |
Data Structures | |
struct | _WlzLSDomEnt |
A queue entry holding a domain object (which still has a line skeleton segment to be determined) along with source and destination line skeleton segment end points. For use with AlcHeap(). Typedef: WlzLSDomEnt. More... | |
struct | _WlzLSNod |
A node entry in a node queue data structure used when computing a line skeleton segment. Typedef: WlzLSNod. More... | |
struct | _WlzLSNodQueue |
A queue of line segment nodes together with a table for accessing them by coordinate value. The slots of the hash table are allocated at creation of the queue and the queue/table entries are allocated in blocks. More... | |
struct | _WlzPoints |
An array of either 2D or 3D points which may have either integral of floating point values. Possible types are: WLZ_POINTS_2I, WLZ_POINTS_2D, WLZ_POINTS_3I and WLZ_POINTS_3D. Typedef: WlzPoints. More... | |
struct | _WlzBSpline |
Spline based line curves in either 2 or 3D. Possible types are: WLZ_BSPLINE_C2D or WLZ_BSPLINE_C3D. Typedef: WlzBSpline. More... | |
struct | _WlzRect |
An integer rectangle domain. Side from (l[0],k[0]) to (l[1],k[1]) is a long side. The vertices are cyclic. Typedef: WlzIRect. More... | |
struct | _WlzFRect |
A single precision floating point rectangle domain. Side from (l[0],k[0]) to (l[1],k[1]) is a long side. The vertices are cyclic. Typedef: WlzFRect. More... | |
Macros | |
#define | WLZ_DGTENSOR_FEATURE_MASK(F) (((F)>0)?(1<<((F)-1)):(0)) |
Bit mask generator for features of Jacobian deformation gradient tensors. More... | |
Enumerations | |
enum | _WlzLSNodState { WLZLS_NOD_NEW = 0, WLZLS_NOD_OPEN = 1, WLZLS_NOD_CLOSED = 2 } |
State of a node when computing a line skeleton segment. Typedef: WlzLSNodState. More... | |
enum | _WlzScalarFeatureType { WLZ_SCALARFEATURE_VALUE, WLZ_SCALARFEATURE_GRADIENT } |
Scalar features of objects. More... | |
enum | _WlzDGTensorFeatureType { WLZ_DGTENSOR_FEATURE_NONE = 0, WLZ_DGTENSOR_FEATURE_DETJAC = 1, WLZ_DGTENSOR_FEATURE_EIGENVEC = 2, WLZ_DGTENSOR_FEATURE_EIGENVAL = 3, WLZ_DGTENSOR_FEATURE_LIMIT = 4 } |
Features of Jacobian deformation gradient tensors. More... | |
Functions | |
WlzLong | WlzArea (WlzObject *obj, WlzErrorNum *dstErr) |
Computes the area of an object. More... | |
WlzIBox2 | WlzBoundingBox2I (WlzObject *inObj, WlzErrorNum *dstErr) |
Computes the 2D integer axis aligned bounding box of the given object. More... | |
WlzDBox2 | WlzBoundingBox2D (WlzObject *inObj, WlzErrorNum *dstErr) |
Computes the 2D double precision axis aligned bounding box of the given object. More... | |
WlzIBox3 | WlzBoundingBox3I (WlzObject *inObj, WlzErrorNum *dstErr) |
Computes the integer 3D axis aligned bounding box of the given object. More... | |
WlzDBox3 | WlzBoundingBox3D (WlzObject *inObj, WlzErrorNum *dstErr) |
Computes the double precision 3D axis aligned bounding box of the given object. More... | |
WlzDBox3 | WlzBoundingBoxGModel3D (WlzGMModel *model, WlzErrorNum *dstErr) |
Computes the 3D axis aligned bounding box of the 3D geometric model. It is an error if the model is not a 3D model. More... | |
WlzDBox2 | WlzBoundingBoxGModel2D (WlzGMModel *model, WlzErrorNum *dstErr) |
Computes the 2D axis aligned bounding box of the 2D geometric model. It is an error if the model is not a 2D model. More... | |
WlzIBox2 | WlzBoundingBox2DTo2I (WlzDBox2 bBox2D) |
Converts a 2D double precision bounding box to an integer bounding box. There is no checking done for underflows or overflows. More... | |
WlzDBox2 | WlzBoundingBox2ITo2D (WlzIBox2 bBox2I) |
Converts a 2D integer bounding box to an double precision bounding box. More... | |
WlzIBox3 | WlzBoundingBox3DTo3I (WlzDBox3 bBox3D) |
Converts a 3D double precision bounding box to an integer bounding box. There is no checking done for underflows or overflows. More... | |
WlzDBox3 | WlzBoundingBox3ITo3D (WlzIBox3 bBox3I) |
Converts a 3D integer bounding box to an double precision bounding box. More... | |
WlzFBox3 | WlzBoundingBox3DTo3F (WlzDBox3 bBox3D) |
Converts a 3D double bounding box to a single precision bounding box. More... | |
WlzDBox3 | WlzBoundingBox3FTo3D (WlzFBox3 bBox3F) |
Converts a 3D single bounding box to a double precision bounding box. More... | |
WlzIBox2 | WlzBoundingBoxUnion2I (WlzIBox2 box0, WlzIBox2 box1) |
Computes the 2D integer bounding box which encloses the given pair of bounding boxes. More... | |
WlzFBox2 | WlzBoundingBoxUnion2F (WlzFBox2 box0, WlzFBox2 box1) |
Computes the 2D single precision bounding box which encloses the given pair of bounding boxes. More... | |
WlzDBox2 | WlzBoundingBoxUnion2D (WlzDBox2 box0, WlzDBox2 box1) |
Computes the 2D double precision bounding box which encloses the given pair of bounding boxes. More... | |
WlzIBox3 | WlzBoundingBoxUnion3I (WlzIBox3 box0, WlzIBox3 box1) |
Computes the 3D integer bounding box which encloses the given pair of bounding boxes. More... | |
WlzFBox3 | WlzBoundingBoxUnion3F (WlzFBox3 box0, WlzFBox3 box1) |
Computes the 3D single precision bounding box which encloses the given pair of bounding boxes. More... | |
WlzDBox3 | WlzBoundingBoxUnion3D (WlzDBox3 box0, WlzDBox3 box1) |
Computes the 3D double precision bounding box which encloses the given pair of bounding boxes. More... | |
WlzBSpline * | WlzBSplineFromObj (WlzObject *gObj, int order, int closed, double sm, WlzErrorNum *dstErr) |
Creates a new B-spline domain from the given object. More... | |
WlzPoints * | WlzBSplineEvalPoints (WlzBSpline *bs, int n, int deriv, WlzErrorNum *dstErr) |
Creates a new Woolz points domain bt evaluating the given B-spline at equal intervals along the parametrised curve. More... | |
WlzBSpline * | WlzBSplineFromVertices (WlzVertexType vType, int nV, WlzVertexP vtx, int k, int periodic, double sm, WlzErrorNum *dstErr) |
Creates a new B-spline domain by fitting a B-spline to the given vertices. More... | |
WlzErrorNum | WlzBSplineEval (WlzBSpline *bs, int n, double *x, int deriv, WlzVertexP eval) |
Evaluates a B-spline at a specified number of points. More... | |
WlzObject * | WlzBSplineToDomain (WlzBSpline *bs, double tB, double tE, int paramVal, WlzErrorNum *dstErr) |
Makes a new interval or plane domain object corresponding to the evaluation of the given B-spline in the given parametric coordinate range. The returned object may have pixel/voxels which are disconnected unless dilated by 1. More... | |
WlzErrorNum | WlzBSplineEvalSP (WlzBSpline *bs, double x, int deriv, WlzVertexP eval) |
Evaluates a B-spline at a single specified point. More... | |
WlzErrorNum | WlzBSplineTangent (WlzBSpline *bs, int n, double *x, WlzVertexP dstPos, WlzVertexP dstTnt) |
Compute the (optional) position and (optional) tangent to the B-spline at points along the path of it's curve. More... | |
WlzObject * | WlzBSplineCut (WlzObject *iObj, WlzBSpline *bs, int cutOrthog, int noGrey, int radius, double tB, double tE, WlzDVertex3 up, WlzInterpolationType interp, WlzErrorNum *dstErr) |
Cuts regions from a spatial domain using a B-spline to define the region cut. The region may be the domain of the B-spline or planes orthogonal to the B-spline. More... | |
double | WlzBSplineDistance (WlzBSpline *bs, double tg, double dg, double sz, double sy, double sx, double tol, WlzErrorNum *dstErr) |
Computes the parametric coordinate which is the given distance from the given origin parametric coordinate. This function uses a binary search to find the parametric cordinate for the given distance from the start calling WlzBSplineLength(). Coordinates outside of the spline domain are clamped to the range of the spline domain [0.0-1.0]. More... | |
double | WlzBSplineLength (WlzBSpline *bs, double tB, double tE, double sz, double sy, double sx, WlzErrorNum *dstErr) |
Computes the length of a path along a spline's curve between a pair of parametric coordinates. Given a parametric curve \(c(t)\) then the length \(l\) of a segment on that curve between \(t_a\) and \(t_b\) is given by \[ l = \int_{t_a}^{t_b}\sqrt{ {\acute{x} s_x}^2 + {\acute{y} s_y}^2 + \ldots}dt \] where \(\acute{x}, \acute{y}, \ldots\) are the first derivatives of coordinates \(x, y, \ldots\) with respect to \(t\). Step sizes ( \(s_x, s_y, \ldots\)) allow lengths to be computed for an domain with non-unit pixel/voxel size. Because the integral is an elliptic integral, then Legendre- Gauss quadrature is used for numerical integration with each spline segment integrated using it's own points and weights. More... | |
double | WlzCCorS2D (WlzObject *obj0, WlzObject *obj1, int unionFlg, int normFlg, WlzErrorNum *dstErr) |
Computes the cross correlation of the two given 2D spatial domain objects in the spatial domain. The algorithm used by this function is not an efficient unless a single cross correlation value is required. More... | |
double | WlzCentrality (WlzObject *fObj, WlzObject *bObj, int nRay, int binFlg, double *dstMaxR, WlzErrorNum *dstErr) |
Computes the centrality of a feature domain with respect to a boundary domain. The boundary domain must enclose the feature domain. More... | |
WlzDVertex2 | WlzCentreOfMass2D (WlzObject *srcObj, int binObjFlag, double *dstMass, WlzErrorNum *dstErr) |
Calculates the centre of mass of a Woolz object. If the given object does not have grey values or the binary object flag is set (ie non zero) then every pixel or vertex within the object's domain has the same mass. More... | |
WlzDVertex3 | WlzCentreOfMass3D (WlzObject *srcObj, int binObjFlag, double *dstMass, WlzErrorNum *dstErr) |
Calculates the centre of mass of a Woolz object. If the given object does not have grey values or the binary object flag is set (ie non zero) then every pixel or vertex within the objects domain has the same mass. More... | |
WlzDVertex2 | WlzCentreOfMassVtx2D (int nVtx, WlzDVertex2 *vtx) |
Computes the centre of mass of a vector of 2D vertices. More... | |
WlzDVertex3 | WlzCentreOfMassVtx3D (int nVtx, WlzDVertex3 *vtx) |
Computes the centre of mass of a vector of 3D vertices. More... | |
WlzErrorNum | WlzDistMetricGM (WlzGMModel *model0, WlzGMModel *model1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the vertices of the given geometric models. See WlzDistMetricVertex2D() for details of the metrics. More... | |
WlzErrorNum | WlzDistMetricDirGM (WlzGMModel *model0, WlzGMModel *model1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the vertices of the given geometric models. See WlzDistMetricDirVertex2D() for details of the metrics. More... | |
WlzErrorNum | WlzDistMetricVertex2D (int n0, WlzDVertex2 *vx0, int n1, WlzDVertex2 *vx1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. Each of these distance measures is the maximum of the two possible directed measures: \[ D = \max{(d(A,B), d(B,A))} \] Where \(D\) is a non-directed distance metric and \(d\) is the associated directed distance metric. \(A\) and \(B\) are the two datasets. More... | |
WlzErrorNum | WlzDistMetricVertex3D (int n0, WlzDVertex3 *vx0, int n1, WlzDVertex3 *vx1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. See WlzDistMetricVertex2D() for an explaination of the distance metrics. More... | |
WlzErrorNum | WlzDistMetricDirVertex2D (int n0, WlzDVertex2 *vx0, int n1, WlzDVertex2 *vx1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum mean neighbour distances between the given sets of vertices. The directed Hausdorff distance metric is: \[ \max_{a \in A}{\min_{b \in B}{\|a - b\|}} \] The directed mean nearest neighbour distance metric is: \[ \frac{1}{n_a} \sum_{a \in A}{\min_{b \in B}{\|a - b\|}} \] Likewise the directed median nearest neighbour distance metric is: \[ \mathrm{median}_{a \in A}{\min_{b \in B}{\|a - b\|}} \] Where \(A\) and \(B\) are the two datasets. More... | |
WlzErrorNum | WlzDistMetricDirVertex3D (int n0, WlzDVertex3 *vx0, int n1, WlzDVertex3 *vx1, double *dstDistH, double *dstDistM, double *dstDistN, double *dstDistI) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. See WlzDistMetricDirVertex2D() for an explaination of the distance metrics. More... | |
WlzDVertex3 * | WlzGeometryTrackUpAndDown_s (int numberOfPixelsZ, int startTrackingFile, int numberOfFilesDownOrUp, double disForInAndOutGuid, double disForInAndOut, unsigned char **TwoDImageFilesNameList, int numOf2DWlzFiles, int downOrUp, int sectionLength_N, int subSubSectionLength_L, int numberOfSampleP_k, char *surfacePointFileName, char *surfaceInPointFileName, char *surfaceOutPointFileName, int startShell, int endShell, int startSection, int endSection, double minDis, WlzErrorNum *dstErr) |
Track a curved path through a set of geometric model shells. More... | |
WlzIVertex3 | WlzGreyExtremumPos (WlzObject *gObj, int isMax, WlzPixelV *dstVal, WlzErrorNum *dstErr) |
Finds the position of an extremum value within the given object. More... | |
WlzObject * | WlzGreyExtremumObj (WlzObject *gObj, int isMax, WlzErrorNum *dstErr) |
Finds the sub-domain of the given object with the extremum value. More... | |
size_t | WlzGreySize (WlzGreyType gType) |
Given a grey type, computes the number of bytes required to to store a single grey value of that type. Note the grey type WLZ_GREY_BIT is able to store multiple values in a single byte but one byte is required to store a single bit. More... | |
int | WlzGreyStats (WlzObject *srcObj, WlzGreyType *dstGType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev, WlzErrorNum *dstErr) |
Calculates simple quick statistics for given 2D or 3D domain object with grey values. Pointers provided for results may be NULL without causing an error. More... | |
WlzObject * | WlzGreyValueMixing_s (WlzObject *sObj, WlzObject *tObj, double xmiddle, WlzErrorNum *dstErr) |
calculate the distance map of a woolz obj More... | |
double * | WlzInteriorityN (WlzObject *refObj, int nTstObj, WlzObject **tstObjs, WlzErrorNum *dstErr) |
Computes an interiority score for each test object with respect to the reference object. See WlzInteriority(). This function computes the distance transform for the reference domain once and then uses this for each of the test domains. If not NULL the returned array of scores should be freed using AlcFree(). More... | |
double | WlzInteriority (WlzObject *refObj, WlzObject *tstObj, WlzErrorNum *dstErr) |
Computes an interiority score for the test object with respect to the reference object. The interiority score is the mean distance of those elements of the intersection of the reference and test object from the boundary of the reference object, ie: \[ s = t \cap r b = t \neg t^- i = \frac{1}{|s|} \sum_{s}{D(b, s)} \] where \(t\) is a test object, \(t^-\) is the eroded test object, \(|x|\) is the cardinality of \(x\) and \(D\) is the distance operator. More... | |
int | WlzLineArea (WlzObject *obj, WlzErrorNum *dstErr) |
Calculate the line-area of an object defined as the sum of the line segments bounded by the left hand end of the first interval in a line and the right hand end of the last interval in that line. More... | |
WlzObject * | WlzLineSkeleton (WlzObject *gObj, WlzErrorNum *dstErr) |
Computes and returns the line skeleton of the given object's domain. More... | |
WlzObject * | WlzLineSkeletonSegment (WlzObject *gObj, WlzObjectType rObjType, WlzIVertex3 p0, WlzIVertex3 p1, WlzErrorNum *dstErr) |
Computes and returns the line skeleton segment between to given points in the given object's domain. This function is unlikely to be symetric so swapping the two points will probably give a different path. More... | |
WlzObject * | WlzMakeMarkers (WlzVertexType vType, int nVtx, WlzVertexP vtx, WlzMarkerType mType, int mSz, WlzErrorNum *dstErr) |
Constructs a domain from the union of marker domains with a marker domain at each of the given vertex positions. More... | |
WlzObject * | WlzMarkerLattice (WlzObject *gObj, WlzMarkerType mType, int mSz, int mSep, WlzErrorNum *dstErr) |
Creates a new domain object that is a formed from a lattice of markers covering the given domain. More... | |
WlzPoints * | WlzMakePoints (WlzObjectType type, int nVtx, WlzVertexP vtxP, int maxVtx, WlzErrorNum *dstErr) |
Creates a new point domain. A point domain consists of an array of vertices which are treated as seperate points. More... | |
WlzErrorNum | WlzNObjGreyStats (WlzObject *gObj, int mean, int stddev, int *dstN, WlzObject **dstMinObj, WlzObject **dstMaxObj, WlzObject **dstSumObj, WlzObject **dstSSqObj) |
Computes a collection of objects from the object (which should be a compound array object). The computed objects all have the intersection of the given object domains as their domain and WLZ_GREY_DOUBLE values for the minimum, maximum, sum and sum of squares of the given grey values at each pixel/voxel within the intersection domain. Returned objects will have name properties set to: min, max, sum, ssq, mean and stddev as appropriate. More... | |
WlzErrorNum | Wlz3DSectionOcc (WlzObject *obj, WlzThreeDViewStruct *vs, double sep, double *dstFirst, double *dstLast, int *dstArraySizeOcc, int **dstArrayOcc) |
Computes an array of integers which correspond to a line through the given object's domain perpendicular to the plane defined by the given view structure. At each point along the line the occupancy area or number of domains intersecting the plane is computed. When the given object is a 3D spatial domain object then areas are computed and when it is a compound array then the occupancy (number of domains) is computed. More... | |
WlzObject * | WlzDomainOccupancy (WlzObject *gObj, WlzErrorNum *dstErr) |
Computes a new Woolz domain object which has the domain of the given object (union of domains if the object is a compound array) and a value table with integer values representing the number of domains present. More... | |
WlzObject * | WlzOffsetDist (WlzObject *obj0, WlzObject *obj1, int maxDist, WlzErrorNum *dstErr) |
Computes an object with domain and values that are the set of minimum distances between the two given objects. An equidistant boundary is computed between the domains of the two given objects, within maxDist of each object's domain and within the convex hull of the union of the two given object's domains. This function will probably only be useful where one of the objects tends to track the other. More... | |
WlzObject * | WlzPointsToDomObj (WlzPoints *pnt, double scale, WlzErrorNum *dstErr) |
Creates a domain object which coresponds to the union of the given points. More... | |
WlzPoints * | WlzPointsFromDomObj (WlzObject *gvnObj, double dMin, int useFloatingPoint, int voxelScaling, int useGrey, double gMin, double gMax, double gGam, WlzErrorNum *dstErr) |
Finds points which are within the given opjects domain and are seperated by at least the given minimum distance. If the given object's grey values are used, then the probability of a point being placed is proportional to: \[ \left\{ \begin{array}{ll} 0.0 & g_i < g_{min} \\ frac{(g_i - g_{min})^\gamma}{g_{max} - g_{min}} & g_i > g_{min} \end{array} \right. \] . More... | |
WlzPointValues * | WlzPointValuesFromDomObj (WlzPoints *pdm, WlzObject *domObj, WlzErrorNum *dstErr) |
Creates a new point values using the given points domain and domain object with values. Values are sampled from the domain object using the locations of the points in the points domain. More... | |
WlzObject * | WlzPointsToMarkers (WlzPoints *pts, WlzMarkerType mType, int mSz, WlzErrorNum *dstErr) |
Constructs a domain from the union of marker domains with a marker domain at each of the given point positions. More... | |
WlzPoints * | WlzPointsDither (WlzPoints *gPts, WlzDVertex3 dSz, WlzObject *resObj, WlzErrorNum *dstErr) |
Dithers the vertices of the given points by adding a random displacement within the range -d to +d, where d is the given dither size. More... | |
WlzVertexType | WlzPointsVertexType (WlzObjectType pType, WlzErrorNum *dstErr) |
Gets the points domain vertex type. More... | |
int | WlzRGBAGreyStats (WlzObject *srcObj, WlzRGBAColorSpace colSpc, WlzGreyType *dstGType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev, WlzErrorNum *dstErr) |
Calculates simple quick statistics for the domain object with RGBA values. Each component has its statictics computed and entered into the four double[4] arrays. More... | |
WlzErrorNum | WlzSampleValuesAndCoords (WlzObject *obj, WlzGreyType *dstGType, int *dstNVal, WlzGreyP *dstValP, WlzVertexP *dstCoords, WlzSampleFn samFn, int samFac) |
Allocates buffers for both the grey values and the coordinates of the grey values in the given object. On return these buffers contain the sampled object values and the coordinates of the values. More... | |
WlzErrorNum | WlzScalarFeatures2D (WlzObject *obj, int *dstNFeat, WlzIVertex2 **dstFeat, WlzScalarFeatureType fType, WlzThresholdType thrHL, WlzPixelV thrV, double filterV, double minDist) |
Finds scalar features within the given object. Where the feature values are all either above or below the given threshold value, depending on the value of thrHL, and the features have the given minimum seperation distance. More... | |
WlzObject * | WlzDGTensorFeatures (WlzObject *mObj, unsigned int features, int points, double dMin, WlzDVertex3 dither, WlzDVertex3 smooth, int voxScaling, WlzErrorNum *dstErr) |
Computes features of a deformation gradient tensor field and creates a compound object, each element of which is a required feature of the given deformation gradient field object. The feature object may be either a points object or a spatial domain object as required. See WlzDGTensorSDFeature() which this function calls to compute the feature objects. More... | |
WlzObject * | WlzDGTensorSDFeature (WlzObject *mObj, WlzDomain fDom, WlzDGTensorFeatureType feat, WlzDVertex3 smooth, WlzErrorNum *dstErr) |
Computes a feature of a deformation gradient tensor field throughout the given 3D spatial domain. This function assumes all input parameters to be valid, when this is not certain use WlzDGTensorFeatures(). The returned object will have it's name property set to an appropriate name for the required feature: WLZ_DGTENSOR_FEATURE_DETJAC ("jacobian"), WLZ_DGTENSOR_FEATURE_EIGENVEC ("eigen vectors") or WLZ_DGTENSOR_FEATURE_EIGENVAL ("eigen values"). More... | |
WlzObject * | WlzDGTensorPDFeature (WlzObject *mObj, WlzDomain fDom, WlzDGTensorFeatureType feat, WlzErrorNum *dstErr) |
Computes a feature of a deformation gradient tensor field throughout the given 3D points domain. This function assumes all input parameters to be valid, when this is not certain use WlzDGTensorFeatures(). More... | |
WlzErrorNum | WlzTensorSmooth (WlzObject *obj, WlzDVertex3 smooth) |
Smooths the (possibly) non-scalar features of the given object in place by applying a Gaussian filter with the given sigma values (sigma value <~ 0.0 implies no filtering in the corresponding direction. More... | |
WlzObject * | WlzTensorGetComponent (WlzObject *tObj, int cpt, WlzErrorNum *dstErr) |
Extracts a single value component from a (possibly) non-scalar object and creates an object with a non-tiled value table which is returned. This function may also be used to convert a tiled value object to a non-tiled value object. More... | |
WlzErrorNum | WlzTensorSetComponent (WlzObject *tObj, WlzObject *fObj, int cpt) |
Sets a single value component in a (possibly) non-scalar object using scalar values of the second given object. More... | |
WlzObject * | WlzCMeshDGTensor (WlzObject *cObj, int invert, WlzErrorNum *dstErr) |
Given a conforming mesh transform this function computes the displacement gradient tensor for each of it's valid elements. Given displacement \(\vec{u}(\vec{r})\) with position vector \(\vec{r}\) which maps a point from a space \(\vec{x}\) to a space \(\vec{u}\) the displacement gradient tensor is defined in 3D as \[ { \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} u_{i,j} = \left [ \begin{array}{ccc} \pd{u_0}{x_0} & \pd{u_0}{x_1} & \pd{u_0}{x_2} \\ \pd{u_1}{x_0} & \pd{u_1}{x_1} & \pd{u_1}{x_2} \\ \pd{u_2}{x_0} & \pd{u_2}{x_1} & \pd{u_2}{x_2} \end{array} \right] } \] with \[ \Delta r_i = u_{ij} r_j \] where \(\vec{u} = \left[u_0, u_1, u_2\right]^T\) and \(\Delta \vec{r} = \left[x_0, x_1, x_2\right]^T\). The displacement gradient tensor matrix is just the rotation and independent scaling part of the affine transform that displaces the element. More... | |
WlzObject * | WlzCMeshDGTensorAtPts (WlzObject *cObj, int invert, WlzDVertex3 sd, int dither, WlzErrorNum *dstErr) |
Given a conforming mesh transform this function computes the displacement gradient tensor at regular cartesian grid sample points throughout the mesh. The tensor values at the sample points are computed at each point by computing an iverse distance weighted least squares general affine transform for the ring of nodes surrounding the closest node. See WlzCMeshDGTensor() for the description of the tensor. More... | |
WlzObject * | WlzCMeshStrainTensor (WlzObject *cObj, int invert, WlzErrorNum *dstErr) |
Given a conforming mesh transform this function computes the strain tensor for each of it's valid elements. This function uses WlzCMeshDGTensor() to compute the displacement gradient tensor and the derives the strain tensor \(e_{ij}\) from this using: \[ e_{ij} = \frac{1}{2} (u_{ij} + u_{ji}) \] . More... | |
WlzObject * | WlzCMeshStrainTensorAtPts (WlzObject *cObj, int invert, WlzDVertex3 sd, int dither, WlzErrorNum *dstErr) |
Given a conforming mesh transform this function computes the displacement gradient tensor at regular cartesian grid sample points throughout the mesh. The tensor values at the sample points are computed using WlzCMeshDGTensorAtPts(). The strain tensor is then computed from the displacement gradient tensor as for WlzCMeshStrainTensor(). More... | |
WlzObject * | WlzThinToPoints (WlzObject *gObj, int gThin, int gStart, int gInc, WlzErrorNum *dstErr) |
Extracts a points object in which the points are the centres of thinned regions of the input domain object. If the object has grey values and gThin is set then the object is erroded by successive thresholding while collecting all disconnected regions or if the object has no values the object is simply labeled to give a collection of disconnected regions. The disconnected regions are then eroded (morphologicaly) again collecting disconnected regions. More... | |
WlzVertexP | WlzVerticesFromObj (WlzObject *obj, WlzVertexP *dstNr, int *dstCnt, WlzVertexType *dstType, WlzErrorNum *dstErr) |
Allocates a buffer which it fills with the vertices from the given object. If the object is not one of the types that is represented by vertices, eg polylines, boundlists, contours ..., then this may result in a very large number of vertices, with for example one per voxel. Normals will only be allocated and set for objects represented by vertices, eg there will be no normals for voxel based objects. More... | |
WlzVertexP | WlzVerticesFromObjBnd (WlzObject *obj, int *dstCnt, WlzVertexType *dstType, WlzErrorNum *dstErr) |
Extracts all vertices that lie on the boundary of the given objects domain. More... | |
WlzErrorNum | WlzVerticesFromObjBnd2I (WlzObject *obj, int *dstNVtx, WlzIVertex2 **dstVtx) |
Extracts all vertices that lie on the boundary of the given 2D domain object's domain. More... | |
WlzErrorNum | WlzVerticesFromObjBnd3I (WlzObject *obj, int *dstNVtx, WlzIVertex3 **dstVtx) |
Extracts all vertices that lie on the boundary of the given 3D domain object's domain. More... | |
WlzErrorNum | WlzVerticesFromObj2I (WlzObject *obj, int *dstNVtx, WlzIVertex2 **dstVtx) |
Extracts all vertices that lie within the given 2D domain object's domain. More... | |
WlzErrorNum | WlzVerticesFromObj3I (WlzObject *obj, int *dstNVtx, WlzIVertex3 **dstVtx) |
Extracts all vertices that lie within the given 3D domain object's domain. More... | |
WlzVertexP | WlzVerticesFromGM (WlzGMModel *model, WlzVertexP *dstNr, int **dstVId, int *dstCnt, WlzVertexType *dstType, WlzErrorNum *dstErr) |
Allocates a buffer which it fills with the vertices from a geometric model. More... | |
WlzVertexP | WlzDVerticesFromGM (WlzGMModel *model, int *dstCnt, WlzVertexType *dstType, WlzErrorNum *dstErr) |
Allocates a buffer which it fills with either 2D or 3D double precission vertices from the geometric model. The indicies of the vertices in the buffer are the same as the indices of the vertices in the model. More... | |
size_t | WlzVertexSize (WlzVertexType type, WlzErrorNum *dstErr) |
Returns the size of the given vertex type. More... | |
int | WlzVertexDim (WlzVertexType type, WlzErrorNum *dstErr) |
Returns the dimension of the given vertex type. More... | |
WlzVertexP | WlzDVerticesFromCMesh (WlzCMeshP mesh, int *dstCnt, WlzVertexType *dstType, int skip, WlzErrorNum *dstErr) |
Allocates a buffer which it fills with either 2D or 3D double precission vertices from the conforming mesh. The indicies of the vertices in the buffer are the same as the indices of the vertices in the model unless the skip non-valid nodes flag is set.. More... | |
int | WlzVertexQSortFnI2 (void *p0, void *p1) |
Function for AlgSort() to sort WlzIVertex2 vertices so that they have increasing Y then X. More... | |
int | WlzVertexQSortFnI3 (void *p0, void *p1) |
Function for AlgSort() to sort WlzIVertex3 vertices so that they have increasing z then Y then X. More... | |
int | WlzVertexHeapSortIdxFnI2 (void *data, int *idx, int id0, int id1) |
Function for AlgHeapSortIdx() to sort WlzIVertex2 vertices so that they have increasing Y then X. More... | |
int | WlzVertexHeapSortIdxFnI3 (void *data, int *idx, int id0, int id1) |
Function for AlgHeapSortIdx() to sort WlzIVertex3 vertices so that they have increasing Z then Y then X. More... | |
int | WlzVertexHeapSortIdxFnD2 (void *data, int *idx, int id0, int id1) |
Function for AlgHeapSortIdx() to sort WlzDVertex2 vertices so that they have increasing Z then Y then X. More... | |
int | WlzVertexHeapSortIdxFnD3 (void *data, int *idx, int id0, int id1) |
Function for AlgHeapSortIdx() to sort WlzDVertex3 vertices so that they have increasing Z then Y then X. More... | |
AlcKDTTree * | WlzVerticesBuildTree (WlzVertexType vType, int nV, WlzVertexP vtx, int *shfBuf, WlzErrorNum *dstErr) |
Allocates and populates a k-D tree from the given vertices. The vertices are either WlzDVertex2 orWlzDVertex3. More... | |
#define WLZ_DGTENSOR_FEATURE_MASK | ( | F | ) | (((F)>0)?(1<<((F)-1)):(0)) |
Bit mask generator for features of Jacobian deformation gradient tensors.
Referenced by WlzDGTensorFeatures().
enum _WlzLSNodState |
State of a node when computing a line skeleton segment. Typedef: WlzLSNodState.
Enumerator | |
---|---|
WLZLS_NOD_NEW | New unused node. |
WLZLS_NOD_OPEN | Open node in frontier. |
WLZLS_NOD_CLOSED | Closed node which is no longer active. |
Features of Jacobian deformation gradient tensors.
WlzLong WlzArea | ( | WlzObject * | obj, |
WlzErrorNum * | dstErr | ||
) |
Computes the area of an object.
obj | Input object. |
dstErr | Destination error pointer, may be NULL. |
References _WlzIntervalWSpace::colrmn, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_RASTERDIR_ILIC, WlzInitRasterScan(), and WlzNextInterval().
Referenced by Wlz3DSectionOcc(), Wlz3DViewTransformObj(), WlzCCorS2D(), WlzMakeIntervalValues(), WlzSplitMontageObj(), WlzSplitObj(), WlzVerticesFromObj2I(), and WlzVolume().
WlzIBox2 WlzBoundingBox2I | ( | WlzObject * | inObj, |
WlzErrorNum * | dstErr | ||
) |
Computes the 2D integer axis aligned bounding box of the given object.
inObj | The given object. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_NONE, WlzBoundingBox3I(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, and _WlzIBox3::yMin.
Referenced by WlzMeshFromObjBox(), and WlzSplitMontageObj().
WlzDBox2 WlzBoundingBox2D | ( | WlzObject * | inObj, |
WlzErrorNum * | dstErr | ||
) |
Computes the 2D double precision axis aligned bounding box of the given object.
inObj | The given object. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_NONE, WlzBoundingBox3D(), _WlzDBox2::xMax, _WlzDBox3::xMax, _WlzDBox2::xMin, _WlzDBox3::xMin, _WlzDBox2::yMax, _WlzDBox3::yMax, _WlzDBox2::yMin, and _WlzDBox3::yMin.
WlzIBox3 WlzBoundingBox3I | ( | WlzObject * | inObj, |
WlzErrorNum * | dstErr | ||
) |
Computes the integer 3D axis aligned bounding box of the given object.
inObj | The given object. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_VALUES_NULL, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_TRANSFORM_2D_AFFINE, _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
Referenced by WlzBoundingBox2I(), WlzDomainFill3D(), WlzGreyValueMixing_s(), WlzRasterObj(), WlzSepFilter(), and WlzSplitMontageObj().
WlzDBox3 WlzBoundingBox3D | ( | WlzObject * | inObj, |
WlzErrorNum * | dstErr | ||
) |
Computes the double precision 3D axis aligned bounding box of the given object.
inObj | The given object. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_VALUES_NULL, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_TRANSFORM_2D_AFFINE, _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
Referenced by WlzBoundingBox2D().
WlzDBox3 WlzBoundingBoxGModel3D | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Computes the 3D axis aligned bounding box of the 3D geometric model. It is an error if the model is not a 3D model.
model | Given model. |
dstErr | Destination error pointer, may be NULL. |
References _WlzGMModel::child, _WlzGMShell::idx, _WlzGMShell::next, _WlzGMModel::type, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_3D, WLZ_GMMOD_3I, WLZ_GMMOD_3N, WlzGMShellGetGBB3D(), _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
Referenced by WlzGeoModelGridWSpSet3D().
WlzDBox2 WlzBoundingBoxGModel2D | ( | WlzGMModel * | model, |
WlzErrorNum * | dstErr | ||
) |
Computes the 2D axis aligned bounding box of the 2D geometric model. It is an error if the model is not a 2D model.
model | Given model. |
dstErr | Destination error pointer, may be NULL. |
References _WlzGMModel::child, _WlzGMShell::idx, _WlzGMShell::next, _WlzGMModel::type, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, WlzGMShellGetGBB2D(), _WlzDBox2::xMax, _WlzDBox2::xMin, _WlzDBox2::yMax, and _WlzDBox2::yMin.
Converts a 2D double precision bounding box to an integer bounding box. There is no checking done for underflows or overflows.
bBox2D | Double precision bounding box. |
References _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox2::yMin, and _WlzDBox2::yMin.
Converts a 2D integer bounding box to an double precision bounding box.
bBox2I | Double precision bounding box. |
References _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzIBox2::yMin, and _WlzDBox2::yMin.
Converts a 3D double precision bounding box to an integer bounding box. There is no checking done for underflows or overflows.
bBox3D | Double precision bounding box. |
References _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Converts a 3D integer bounding box to an double precision bounding box.
bBox3I | Integer bounding box. |
References _WlzIBox3::xMax, _WlzDBox3::xMax, _WlzIBox3::xMin, _WlzDBox3::xMin, _WlzIBox3::yMax, _WlzDBox3::yMax, _WlzIBox3::yMin, _WlzDBox3::yMin, _WlzIBox3::zMax, _WlzDBox3::zMax, _WlzIBox3::zMin, and _WlzDBox3::zMin.
Converts a 3D double bounding box to a single precision bounding box.
bBox3D | Double precision bounding box. |
References _WlzDBox3::xMax, _WlzFBox3::xMax, _WlzDBox3::xMin, _WlzFBox3::xMin, _WlzDBox3::yMax, _WlzFBox3::yMax, _WlzDBox3::yMin, _WlzFBox3::yMin, _WlzDBox3::zMax, _WlzFBox3::zMax, _WlzDBox3::zMin, and _WlzFBox3::zMin.
Converts a 3D single bounding box to a double precision bounding box.
bBox3F | Single precision bounding box. |
References _WlzDBox3::xMax, _WlzFBox3::xMax, _WlzDBox3::xMin, _WlzFBox3::xMin, _WlzDBox3::yMax, _WlzFBox3::yMax, _WlzDBox3::yMin, _WlzFBox3::yMin, _WlzDBox3::zMax, _WlzFBox3::zMax, _WlzDBox3::zMin, and _WlzFBox3::zMin.
Computes the 2D integer bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.
Computes the 2D single precision bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzFBox2::xMax, _WlzFBox2::xMin, _WlzFBox2::yMax, and _WlzFBox2::yMin.
Computes the 2D double precision bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzDBox2::xMax, _WlzDBox2::xMin, _WlzDBox2::yMax, and _WlzDBox2::yMin.
Computes the 3D integer bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
Computes the 3D single precision bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzFBox3::xMax, _WlzFBox3::xMin, _WlzFBox3::yMax, _WlzFBox3::yMin, _WlzFBox3::zMax, and _WlzFBox3::zMin.
Computes the 3D double precision bounding box which encloses the given pair of bounding boxes.
box0 | First bounding box. |
box1 | Second bounding box. |
References _WlzDBox3::xMax, _WlzDBox3::xMin, _WlzDBox3::yMax, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
WlzBSpline* WlzBSplineFromObj | ( | WlzObject * | gObj, |
int | order, | ||
int | closed, | ||
double | sm, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new B-spline domain from the given object.
gObj | Given object which can give a list of vertices via WlzVerticesFromObj(). The B-spline is fitted to all vertices. |
order | Must be in the range [1-5]. |
closed | If true a periodic B-spline will be computed. |
sm | Smoothing parameter, with value 0.0 for no smoothing. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), _WlzDomain::core, _WlzObject::domain, _WlzPoints::nPoints, _WlzPoints::points, _WlzDomain::pts, _WlzObject::type, _WlzPoints::type, _WlzVertexP::v, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_POINTS, WLZ_VERTEX_ERROR, WlzBSplineFromVertices(), WlzPointsVertexType(), and WlzVerticesFromObj().
WlzPoints* WlzBSplineEvalPoints | ( | WlzBSpline * | bs, |
int | n, | ||
int | deriv, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new Woolz points domain bt evaluating the given B-spline at equal intervals along the parametrised curve.
bs | Given B-spline domain. |
n | Number of points to be evaluated. |
deriv | Order of derivative, range [0- (WLZ_BSPLINE_ORDER_MAX - 1)]. |
dstErr | Destination error pointer, may be NULL. |
References _WlzBSpline::nKnots, _WlzPoints::nPoints, _WlzBSpline::order, _WlzPoints::points, _WlzDomain::pts, _WlzBSpline::type, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_NULL, WLZ_POINTS_2D, WLZ_POINTS_3D, WlzBSplineEval(), WlzFreeDomain(), and WlzMakePoints().
WlzBSpline* WlzBSplineFromVertices | ( | WlzVertexType | vType, |
int | nV, | ||
WlzVertexP | vtx, | ||
int | k, | ||
int | periodic, | ||
double | sm, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new B-spline domain by fitting a B-spline to the given vertices.
vType | Type of given vertices. |
nV | Number of given vertices. |
vtx | Given vertices. |
k | Spline order. |
periodic | If true a periodic B-spline will be computed. |
sm | Smoothing parameter, with value 0.0 for no smoothing. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlcFree(), AlcMalloc(), ALG_ERR_NONE, ALG_ERR_UNIMPLEMENTED, AlgBSplineNDFit(), _WlzDomain::bs, _WlzBSpline::coefficients, _WlzVertexP::d2, _WlzVertexP::d3, _WlzVertexP::f2, _WlzVertexP::f3, _WlzVertexP::i2, _WlzVertexP::i3, _WlzBSpline::knots, _WlzVertexP::l2, _WlzVertexP::l3, _WlzBSpline::nKnots, _WlzVertexP::v, _WlzLVertex2::vtX, _WlzIVertex2::vtX, _WlzFVertex2::vtX, _WlzDVertex2::vtX, _WlzLVertex3::vtX, _WlzIVertex3::vtX, _WlzFVertex3::vtX, _WlzDVertex3::vtX, _WlzLVertex2::vtY, _WlzIVertex2::vtY, _WlzFVertex2::vtY, _WlzDVertex2::vtY, _WlzLVertex3::vtY, _WlzIVertex3::vtY, _WlzFVertex3::vtY, _WlzDVertex3::vtY, _WlzLVertex3::vtZ, _WlzIVertex3::vtZ, _WlzFVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_BSPLINE_ORDER_MAX, WLZ_BSPLINE_ORDER_MIN, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_F2, WLZ_VERTEX_F3, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WLZ_VERTEX_L2, WLZ_VERTEX_L3, WlzErrorFromAlg(), WlzFreeDomain(), WlzMakeBSpline(), WlzValueCopyDoubleToDouble(), WlzValueSetDouble(), and WlzVertexDim().
Referenced by WlzBSplineFromObj().
WlzErrorNum WlzBSplineEval | ( | WlzBSpline * | bs, |
int | n, | ||
double * | x, | ||
int | deriv, | ||
WlzVertexP | eval | ||
) |
Evaluates a B-spline at a specified number of points.
bs | Given B-spline domain. |
n | Number of points at which to evaluate the B-spline. If zero evaluations are at the knots. |
x | If NULL then the evaluations will either be at the knots (n == 0) or at n equaly spaced points along the parametrised curve. If not NULL then x must be a pointer to n points along the parametrised curve (with a single number per points). |
deriv | Order of derivative, range [0- (WLZ_BSPLINE_ORDER_MAX - 1)]. |
eval | An array of n WlzDVertex2 or WlzDVertex3 vertices for the evaluation. |
References AlcFree(), AlcMalloc(), AlgBSplineDer(), AlgBSplineEval(), _WlzBSpline::coefficients, _WlzVertexP::d2, _WlzVertexP::d3, _WlzBSpline::knots, _WlzBSpline::nKnots, _WlzBSpline::order, _WlzBSpline::type, _WlzVertexP::v, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_BSPLINE_C2D, WLZ_BSPLINE_ORDER_MAX, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WlzErrorFromAlg(), and WlzValueCopyDoubleToDouble().
Referenced by WlzBSplineEvalPoints(), WlzBSplineEvalSP(), WlzBSplineLength(), WlzBSplineTangent(), and WlzBSplineToDomain().
WlzObject* WlzBSplineToDomain | ( | WlzBSpline * | bs, |
double | tB, | ||
double | tE, | ||
int | paramVal, | ||
WlzErrorNum * | dstErr | ||
) |
Makes a new interval or plane domain object corresponding to the evaluation of the given B-spline in the given parametric coordinate range. The returned object may have pixel/voxels which are disconnected unless dilated by 1.
bs | Given B-spline domain. |
tB | Begining of the parametric range. |
tE | End of the parametric range. |
paramVal | If non-zero the returned object will have values set to the B-spline parametric values. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlcFree(), AlcMalloc(), _WlzVertexP::d2, _WlzVertexP::d3, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyValueWSpace::gPtr, _WlzValues::i, _WlzGreyP::inp, _WlzPixelV::type, _WlzObject::type, _WlzBSpline::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzVertexP::v, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzValues::vox, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_TAB_INTL, WLZ_GREY_UBYTE, WLZ_THRESH_HIGH, WlzAssignObject(), WlzAssignValues(), WlzBSplineEval(), WlzBSplineLength(), WlzFreeObj(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzMakeCuboid(), WlzMakeIntervalValues(), WlzMakeMain(), WlzMakeRect(), WlzNewValuesVox(), WlzThreshold(), _WlzIBox2::xMax, _WlzDBox2::xMax, _WlzDBox3::xMax, _WlzIBox2::xMin, _WlzDBox2::xMin, _WlzDBox3::xMin, _WlzIBox2::yMax, _WlzDBox2::yMax, _WlzDBox3::yMax, _WlzIBox2::yMin, _WlzDBox2::yMin, _WlzDBox3::yMin, _WlzDBox3::zMax, and _WlzDBox3::zMin.
WlzErrorNum WlzBSplineEvalSP | ( | WlzBSpline * | bs, |
double | x, | ||
int | deriv, | ||
WlzVertexP | eval | ||
) |
Evaluates a B-spline at a single specified point.
bs | Given B-spline domain. |
x | Parametric coordinate of the point. |
deriv | Order of derivative, range [0- (WLZ_BSPLINE_ORDER_MAX - 1)]. |
eval | Destination pointer for a single WlzDVertex2 or WlzDVertex3 vertex following evaluation. |
References WlzBSplineEval().
WlzErrorNum WlzBSplineTangent | ( | WlzBSpline * | bs, |
int | n, | ||
double * | x, | ||
WlzVertexP | dstPos, | ||
WlzVertexP | dstTnt | ||
) |
Compute the (optional) position and (optional) tangent to the B-spline at points along the path of it's curve.
bs | Given B-spline domain. |
n | Number of parametric coordinates given. |
x | Given parametric coordinates at points along the B-spline curve. |
dstPos | Destination pointer for the n positions of the points, may be NULL. |
dstTnt | Destination pointer for the n unit tangent vector at the points, may be NULL. |
References _WlzVertexP::d2, _WlzVertexP::d3, _WlzBSpline::type, _WlzVertexP::v, WLZ_BSPLINE_C2D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOUBLE_DATA, WLZ_ERR_NONE, WLZ_VTX_2_LENGTH, WLZ_VTX_2_SCALE, WLZ_VTX_3_LENGTH, WLZ_VTX_3_SCALE, and WlzBSplineEval().
WlzObject* WlzBSplineCut | ( | WlzObject * | iObj, |
WlzBSpline * | bs, | ||
int | cutOrthog, | ||
int | noGrey, | ||
int | radius, | ||
double | tB, | ||
double | tE, | ||
WlzDVertex3 | up, | ||
WlzInterpolationType | interp, | ||
WlzErrorNum * | dstErr | ||
) |
Cuts regions from a spatial domain using a B-spline to define the region cut. The region may be the domain of the B-spline or planes orthogonal to the B-spline.
iObj | Object to be cut. |
bs | B-spline domain. |
cutOrthog | If non-zero cut orthogonal planes rather than the B-spline dilated by given radius. Cutting othogonal planes is only allowed for objects and B-splines in 3D. |
noGrey | If non-zero then don't fill the returned objects grey values (if they exist). |
radius | Radius of region cut, the orthogonal distance from the B-spline. If cutting the region of the dilated B-spline then this is it's dilation, otherwise if cutting orthogonal planes this is the radius of the sections. If zero then either just the pixels/voxels intersecting the B-spline or the entire (unclipped) orthogonal planes will be cut. |
tB | B-spline parametric coordinate at which to start the cut. |
tE | B-spline parametric coordinate at which to end the cut. |
up | Up vector, only used for orthogonal sectioning, see WlzBSplineCutOtg(). |
interp | Interpolation for cutting sections. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzCoreValues::type, _WlzBSpline::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_TYPE, and WLZ_VOXELVALUETABLE_GREY.
double WlzBSplineDistance | ( | WlzBSpline * | bs, |
double | tg, | ||
double | dg, | ||
double | sz, | ||
double | sy, | ||
double | sx, | ||
double | tol, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the parametric coordinate which is the given distance from the given origin parametric coordinate. This function uses a binary search to find the parametric cordinate for the given distance from the start calling WlzBSplineLength(). Coordinates outside of the spline domain are clamped to the range of the spline domain [0.0-1.0].
bs | Given B-spline domain. |
tg | Parametric coordinate of start. |
dg | Given signed distance, where negative distance vlues are from the given start towards the begining of the domain and positive values are towards the end. |
sz | Size of step in z. |
sy | Size of step in y. |
sx | Size of step in x. |
tol | Tolerance value. |
dstErr | Destination error pointer, may be NULL. |
References ALG_CLAMP, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, and WlzBSplineLength().
double WlzBSplineLength | ( | WlzBSpline * | bs, |
double | tB, | ||
double | tE, | ||
double | sz, | ||
double | sy, | ||
double | sx, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the length of a path along a spline's curve between a pair of parametric coordinates. Given a parametric curve \(c(t)\) then the length \(l\) of a segment on that curve between \(t_a\) and \(t_b\) is given by
\[ l = \int_{t_a}^{t_b}\sqrt{ {\acute{x} s_x}^2 + {\acute{y} s_y}^2 + \ldots}dt \]
where \(\acute{x}, \acute{y}, \ldots\) are the first derivatives of coordinates \(x, y, \ldots\) with respect to \(t\). Step sizes ( \(s_x, s_y, \ldots\)) allow lengths to be computed for an domain with non-unit pixel/voxel size. Because the integral is an elliptic integral, then Legendre- Gauss quadrature is used for numerical integration with each spline segment integrated using it's own points and weights.
bs | Given B-spline domain. |
tB | Parametric coordinate of start. |
tE | Parametric coordinate of end. |
sz | Size of step in z. |
sy | Size of step in y. |
sx | Size of step in x. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcMalloc(), AlgGaussLegendrePoints(), AlgGaussLegendreWeights(), _WlzVertexP::d2, _WlzVertex::d2, _WlzVertexP::d3, _WlzVertex::d3, _WlzBSpline::knots, _WlzBSpline::nKnots, _WlzBSpline::order, _WlzBSpline::type, _WlzVertexP::v, WLZ_BSPLINE_C2D, WLZ_BSPLINE_C3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_VTX_2_HAD, WLZ_VTX_2_LENGTH, WLZ_VTX_2_SET, WLZ_VTX_3_HAD, WLZ_VTX_3_LENGTH, WLZ_VTX_3_SET, and WlzBSplineEval().
Referenced by WlzBSplineDistance(), and WlzBSplineToDomain().
double WlzCCorS2D | ( | WlzObject * | obj0, |
WlzObject * | obj1, | ||
int | unionFlg, | ||
int | normFlg, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the cross correlation of the two given 2D spatial domain objects in the spatial domain. The algorithm used by this function is not an efficient unless a single cross correlation value is required.
obj0 | First object. Must have been assigned. |
obj1 | Second object. Must have been assigned. |
unionFlg | Computes the cross correlation value in the union of the two objects domains if non zero. The default is to use the intersection of the domains. |
normFlg | Normalise the cross-correlation value by dividing it by the area/volume over which it is computed if this flag is non-zero. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzObject::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RASTERDIR_ILIC, WlzArea(), WlzFreeObj(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzInitRasterScan(), WlzIntersect2(), WlzNextInterval(), and WlzUnion2().
double WlzCentrality | ( | WlzObject * | fObj, |
WlzObject * | bObj, | ||
int | nRay, | ||
int | binFlg, | ||
double * | dstMaxR, | ||
WlzErrorNum * | dstErr | ||
) |
Computes the centrality of a feature domain with respect to a boundary domain. The boundary domain must enclose the feature domain.
Rays are projected from the centre of mass of the boundary domain to it's boundary. The maximum value of this distance for a given angle \form#106 being \form#107. At each point in the feature domain intersected by the ray the currrent value of the centrality is updated. The distance from the centre of mass to each feature point is defined to be\(r_{i,j}\) and the mass at this point \(m_{i,j}\). The centrality of the feature domain \(\Omega_f\) with respect to the border domain \(Omega_b\) is defined to be
\[ c = \frac{\sum_{i,j}{m_{i,j}(R_i - r_{i,j})}} {\sum_{i,j}{m_{i,j}R}} \]
fObj | Feature domain object, \(Omega_f\). |
bObj | Boundary domain object, \(Omega_b\). |
nRay | Number of equally spaced rays projected from the centre of mass. |
binFlg | Treat as binary object if non-zero, with all masses having value 1.0. |
dstMaxR | Destination pointer for maximum boundary radius, may be NULL. |
dstErr | Destination 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, WLZ_ERR_OBJECT_TYPE, and WLZ_ERR_VALUES_NULL.
WlzDVertex2 WlzCentreOfMass2D | ( | WlzObject * | srcObj, |
int | binObjFlag, | ||
double * | dstMass, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates the centre of mass of a Woolz object. If the given object does not have grey values or the binary object flag is set (ie non zero) then every pixel or vertex within the object's domain has the same mass.
srcObj | Given object. |
binObjFlag | Binary object flag. |
dstMass | Destination pointer for mass, may be NULL if not required. |
dstErr | Destination pointer for error, may be NULL. |
References _WlzObject::type, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_TRANS_OBJ.
WlzDVertex3 WlzCentreOfMass3D | ( | WlzObject * | srcObj, |
int | binObjFlag, | ||
double * | dstMass, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates the centre of mass of a Woolz object. If the given object does not have grey values or the binary object flag is set (ie non zero) then every pixel or vertex within the objects domain has the same mass.
srcObj | Given object. |
binObjFlag | Binary object flag. |
dstMass | Destination pointer for mass, may be NULL if not required. |
dstErr | Destination pointer for error, may be NULL. |
References _WlzObject::type, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_TRANS_OBJ.
WlzDVertex2 WlzCentreOfMassVtx2D | ( | int | nVtx, |
WlzDVertex2 * | vtx | ||
) |
Computes the centre of mass of a vector of 2D vertices.
nVtx | Number of vertices. |
vtx | The vertices. |
References WLZ_VTX_2_ADD, WLZ_VTX_2_SCALE, and WLZ_VTX_2_ZERO.
WlzDVertex3 WlzCentreOfMassVtx3D | ( | int | nVtx, |
WlzDVertex3 * | vtx | ||
) |
Computes the centre of mass of a vector of 3D vertices.
nVtx | Number of vertices. |
vtx | The vertices. |
References WLZ_VTX_3_ADD, WLZ_VTX_3_SCALE, and WLZ_VTX_3_ZERO.
Referenced by WlzGeometryLSqOPlane().
WlzErrorNum WlzDistMetricGM | ( | WlzGMModel * | model0, |
WlzGMModel * | model1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the vertices of the given geometric models. See WlzDistMetricVertex2D() for details of the metrics.
model0 | First geometric model. |
model1 | Second geometric model. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References AlcFree(), _WlzGMModel::type, _WlzVertexP::v, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WlzDistMetricVertex2D(), WlzDistMetricVertex3D(), and WlzVerticesFromGM().
WlzErrorNum WlzDistMetricDirGM | ( | WlzGMModel * | model0, |
WlzGMModel * | model1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the vertices of the given geometric models. See WlzDistMetricDirVertex2D() for details of the metrics.
model0 | First geometric model. |
model1 | Second geometric model. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References AlcFree(), _WlzGMModel::type, _WlzVertexP::v, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WlzDistMetricDirVertex2D(), WlzDistMetricDirVertex3D(), and WlzVerticesFromGM().
WlzErrorNum WlzDistMetricVertex2D | ( | int | n0, |
WlzDVertex2 * | vx0, | ||
int | n1, | ||
WlzDVertex2 * | vx1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. Each of these distance measures is the maximum of the two possible directed measures:
\[ D = \max{(d(A,B), d(B,A))} \]
Where \(D\) is a non-directed distance metric and \(d\) is the associated directed distance metric. \(A\) and \(B\) are the two datasets.
n0 | Number of vertices in the first array. |
vx0 | First array of vertices. |
n1 | Number of vertices in the second array. |
vx1 | Second array of vertices. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References WLZ_ERR_NONE, WLZ_MAX, and WlzDistMetricDirVertex2D().
Referenced by WlzDistMetricGM().
WlzErrorNum WlzDistMetricVertex3D | ( | int | n0, |
WlzDVertex3 * | vx0, | ||
int | n1, | ||
WlzDVertex3 * | vx1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. See WlzDistMetricVertex2D() for an explaination of the distance metrics.
n0 | Number of vertices in the first array. |
vx0 | First array of vertices. |
n1 | Number of vertices in the second array. |
vx1 | Second array of vertices. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References WLZ_ERR_NONE, WLZ_MAX, and WlzDistMetricDirVertex3D().
Referenced by WlzDistMetricGM().
WlzErrorNum WlzDistMetricDirVertex2D | ( | int | n0, |
WlzDVertex2 * | vx0, | ||
int | n1, | ||
WlzDVertex2 * | vx1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum mean neighbour distances between the given sets of vertices. The directed Hausdorff distance metric is:
\[ \max_{a \in A}{\min_{b \in B}{\|a - b\|}} \]
The directed mean nearest neighbour distance metric is:
\[ \frac{1}{n_a} \sum_{a \in A}{\min_{b \in B}{\|a - b\|}} \]
Likewise the directed median nearest neighbour distance metric is:
\[ \mathrm{median}_{a \in A}{\min_{b \in B}{\|a - b\|}} \]
Where \(A\) and \(B\) are the two datasets.
n0 | Number of vertices in the first array. |
vx0 | First array of vertices. |
n1 | Number of vertices in the second array. |
vx1 | Second array of vertices. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References AlcFree(), AlcKDTGetNN(), AlcKDTTreeFree(), AlcMalloc(), AlgRankSelectD(), _WlzVertexP::d2, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_VERTEX_D2, and WlzVerticesBuildTree().
Referenced by WlzDistMetricDirGM(), and WlzDistMetricVertex2D().
WlzErrorNum WlzDistMetricDirVertex3D | ( | int | n0, |
WlzDVertex3 * | vx0, | ||
int | n1, | ||
WlzDVertex3 * | vx1, | ||
double * | dstDistH, | ||
double * | dstDistM, | ||
double * | dstDistN, | ||
double * | dstDistI | ||
) |
Computes any combination of the directed Hausdorff, mean nearest neighbour, median nearest neighbour and minimum nearest neighbour distances between the given sets of vertices. See WlzDistMetricDirVertex2D() for an explaination of the distance metrics.
n0 | Number of vertices in the first array. |
vx0 | First array of vertices. |
n1 | Number of vertices in the second array. |
vx1 | Second array of vertices. |
dstDistH | Destination pointer for the directed Hausdorff distance, may be NULL. |
dstDistM | Destination pointer for the directed mean nearest neighbour distance, may be NULL. |
dstDistN | Destination pointer for the directed median nearest neighbour distance, may be NULL. |
dstDistI | Destination pointer for the minimum nearest neighbour distance, may be NULL. |
References AlcFree(), AlcKDTGetNN(), AlcKDTTreeFree(), AlcMalloc(), AlgRankSelectD(), _WlzVertexP::d3, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_VERTEX_D3, and WlzVerticesBuildTree().
Referenced by WlzDistMetricDirGM(), and WlzDistMetricVertex3D().
WlzDVertex3* WlzGeometryTrackUpAndDown_s | ( | int | numberOfPixelsZ, |
int | startTrackingFile, | ||
int | numberOfFilesDownOrUp, | ||
double | disForInAndOutGuid, | ||
double | disForInAndOut, | ||
unsigned char ** | TwoDImageFilesNameList, | ||
int | numOf2DWlzFiles, | ||
int | downOrUp, | ||
int | sectionLength_N, | ||
int | subSubSectionLength_L, | ||
int | numberOfSampleP_k, | ||
char * | surfacePointFileName, | ||
char * | surfaceInPointFileName, | ||
char * | surfaceOutPointFileName, | ||
int | startShell, | ||
int | endShell, | ||
int | startSection, | ||
int | endSection, | ||
double | minDis, | ||
WlzErrorNum * | dstErr | ||
) |
Track a curved path through a set of geometric model shells.
numberOfPixelsZ | the input z-derection of pixel number (input) |
startTrackingFile | not documented |
numberOfFilesDownOrUp | numner of files (?) |
disForInAndOutGuid | distance parameter |
disForInAndOut | distance parameter |
TwoDImageFilesNameList | 2D image files name list |
numOf2DWlzFiles | number of 2D woolz files |
downOrUp | tracking direction flag |
sectionLength_N | length used to cut a patch (unit in pixel) |
subSubSectionLength_L | length, smaller than sectionLength_N used to sample points |
numberOfSampleP_k | number of points will be sampled in the above section |
surfacePointFileName | FileNameStr to output the surface points |
surfaceInPointFileName | FileNameStr to output the in surface points |
surfaceOutPointFileName | FileNameStr to output the out surface points |
startShell | the n-th Shell to begin with tracking |
endShell | the end Shell from where stop tracking |
startSection | the n-th Section to begin with tracking |
endSection | the section to stop tracking. |
minDis | minimum distance (?) |
dstErr | error return. |
References ALC_ER_NONE, _WlzDomain::ctr, _WlzObject::domain, MaxNumOfFiles, _WlzContour::model, NumberToTrack, WLZ_CONTOUR, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, and WlzReadObj().
WlzIVertex3 WlzGreyExtremumPos | ( | WlzObject * | gObj, |
int | isMax, | ||
WlzPixelV * | dstVal, | ||
WlzErrorNum * | dstErr | ||
) |
Finds the position of an extremum value within the given object.
gObj | Given object which must have a valid spatial domain and values. |
isMax | Non zero for extremum maximum else extremum is minimum. |
dstVal | Destination pointer for extremum value, may be NULL. |
dstErr | Destination 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 WlzLineSkeleton().
WlzObject* WlzGreyExtremumObj | ( | WlzObject * | gObj, |
int | isMax, | ||
WlzErrorNum * | dstErr | ||
) |
Finds the sub-domain of the given object with the extremum value.
gObj | Given object which must have a valid spatial domain and values. |
isMax | Non zero for extremum maximum else extremum is minimum. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::values, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_VALUES_NULL, WLZ_THRESH_EQUAL, WlzGreyRange(), and WlzThreshold().
size_t WlzGreySize | ( | WlzGreyType | gType | ) |
Given a grey type, computes the number of bytes required to to store a single grey value of that type. Note the grey type WLZ_GREY_BIT is able to store multiple values in a single byte but one byte is required to store a single bit.
gType | Given grey type. |
References WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_RGBA, WLZ_GREY_SHORT, and WLZ_GREY_UBYTE.
Referenced by WlzBuildObj3B(), WlzCutObjToValBox3D(), WlzFreeTiledValues(), WlzIndexedValueSize(), WlzMakeCuboid(), WlzMakeIndexedValues(), WlzMakeLUTValues(), WlzMakePointValues(), WlzMakeTiledValueBuffer(), and WlzMakeTiledValuesTiles().
int WlzGreyStats | ( | WlzObject * | srcObj, |
WlzGreyType * | dstGType, | ||
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates simple quick statistics for given 2D or 3D domain object with grey values. Pointers provided for results may be NULL without causing an error.
srcObj | Object from which to calculate the statistics. |
dstGType | Pointer for grey type. |
dstMin | Pointer for minimum value. |
dstMax | Pointer for maximum value. |
dstSum | Pointer for sum of values. |
dstSumSq | Pointer for sum of squares of values. |
dstMean | Mean value. |
dstStdDev | Standard deviation of values. |
dstErr | Destination pointer for error number, may be NULL if not required. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_VALUES_NULL.
Referenced by WlzEffWriteObjAnl(), WlzGetPatchTreeToDepth(), WlzPatchTreeToObject(), and WlzRGBAGreyStats().
WlzObject* WlzGreyValueMixing_s | ( | WlzObject * | sObj, |
WlzObject * | tObj, | ||
double | xmiddle, | ||
WlzErrorNum * | dstErr | ||
) |
calculate the distance map of a woolz obj
sObj | Given Woolz grey value source object. |
tObj | Given Woolz grey value target object. |
xmiddle | mixing parameters |
dstErr | Destination error pointer. |
References _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WlzBoundingBox3I(), WlzCopyObject(), WlzGreyValueMakeWSp(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
double* WlzInteriorityN | ( | WlzObject * | refObj, |
int | nTstObj, | ||
WlzObject ** | tstObjs, | ||
WlzErrorNum * | dstErr | ||
) |
Computes an interiority score for each test object with respect to the reference object. See WlzInteriority(). This function computes the distance transform for the reference domain once and then uses this for each of the test domains. If not NULL the returned array of scores should be freed using AlcFree().
refObj | Given reference object. |
nTstObj | Number of test objects. |
tstObjs | Array of test objects. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, 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_ERR_PARAM_NULL, and WlzAssignObject().
double WlzInteriority | ( | WlzObject * | refObj, |
WlzObject * | tstObj, | ||
WlzErrorNum * | dstErr | ||
) |
Computes an interiority score for the test object with respect to the reference object. The interiority score is the mean distance of those elements of the intersection of the reference and test object from the boundary of the reference object, ie:
\[ s = t \cap r b = t \neg t^- i = \frac{1}{|s|} \sum_{s}{D(b, s)} \]
where \(t\) is a test object, \(t^-\) is the eroded test object, \(|x|\) is the cardinality of \(x\) and \(D\) is the distance operator.
refObj | Given reference object. |
tstObj | Array of test objects. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, and WlzAssignObject().
int WlzLineArea | ( | WlzObject * | obj, |
WlzErrorNum * | dstErr | ||
) |
Calculate the line-area of an object defined as the sum of the line segments bounded by the left hand end of the first interval in a line and the right hand end of the last interval in that line.
obj | Input object. |
dstErr | Error return. |
References _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzIntervalWSpace::intrmn, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzIntervalDomain::type, WLZ_2D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_RASTERDIR_ILIC, WlzInitRasterScan(), and WlzNextInterval().
Referenced by WlzNewValueTb().
WlzObject* WlzLineSkeleton | ( | WlzObject * | gObj, |
WlzErrorNum * | dstErr | ||
) |
Computes and returns the line skeleton of the given object's domain.
gObj | Given object. |
dstErr | Destination error pointer, may be NULL. |
References ALC_ER_NONE, AlcHeapInsertEnt(), AlcHeapNew(), AlcHeapTop(), _WlzDomain::core, _WlzObject::domain, _WlzLSDom::dst, _WlzGreyV::inv, _WlzLSDom::obj, _WlzLSDom::priority, _WlzLSDom::src, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_OCTAGONAL_DISTANCE, WlzAssignObject(), WlzBoundaryDomain(), WlzDistanceTransform(), WlzFreeObj(), WlzGreyExtremumPos(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzMakeMain(), WlzMakeSinglePixelObject(), WlzNewObjectValues(), WlzValueConvertPixel(), and WlzVolume().
WlzObject* WlzLineSkeletonSegment | ( | WlzObject * | gObj, |
WlzObjectType | rObjType, | ||
WlzIVertex3 | p0, | ||
WlzIVertex3 | p1, | ||
WlzErrorNum * | dstErr | ||
) |
Computes and returns the line skeleton segment between to given points in the given object's domain. This function is unlikely to be symetric so swapping the two points will probably give a different path.
gObj | Given object. |
rObjType | Return object type, must be WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ or WLZ_POINTS. |
p0 | First point in object domain. |
p1 | Second point in object domain. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzGreyV::inv, _WlzDomain::pts, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_OCTAGONAL_DISTANCE, WLZ_POINTS, WLZ_POINTS_2I, WLZ_POINTS_3I, WlzAssignObject(), WlzBoundaryDomain(), WlzDistanceTransform(), WlzFreeDomain(), WlzFreeObj(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzInsideDomain(), WlzMakeMain(), WlzMakePoints(), WlzMakeSinglePixelObject(), and WlzNewObjectValues().
WlzObject* WlzMakeMarkers | ( | WlzVertexType | vType, |
int | nVtx, | ||
WlzVertexP | vtx, | ||
WlzMarkerType | mType, | ||
int | mSz, | ||
WlzErrorNum * | dstErr | ||
) |
Constructs a domain from the union of marker domains with a marker domain at each of the given vertex positions.
vType | Vertex type. |
nVtx | Number of vertices. |
vtx | Given vertices. |
mType | Marker type. |
mSz | Marker size. This is the radius of a sphere marker. The marker size is ignored for point markers. |
dstErr | Destination error pointer, may be NULL. |
References _WlzVertexP::i2, _WlzVertexP::i3, _WlzVertexP::v, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_PARAM_TYPE, WLZ_MARKER_POINT, WLZ_MARKER_SPHERE, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WlzFreeObj(), WlzMakeEmpty(), WlzMakeSinglePixelObject(), WlzMakeSphereObject(), WlzShiftObject(), and WlzUnion2().
Referenced by WlzMarkerLattice(), and WlzPointsToMarkers().
WlzObject* WlzMarkerLattice | ( | WlzObject * | gObj, |
WlzMarkerType | mType, | ||
int | mSz, | ||
int | mSep, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new domain object that is a formed from a lattice of markers covering the given domain.
gObj | Given spatial domain object. |
mType | Marker type. |
mSz | Marker size. |
mSep | Marker separation. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzVertexP::i2, _WlzVertexP::i3, _WlzObject::type, _WlzVertexP::v, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_INTERPOLATION_NEAREST, WLZ_TRANSFORM_2D_AFFINE, WLZ_TRANSFORM_3D_AFFINE, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WlzAffineTransformFromPrimVal(), WlzAffineTransformObj(), WlzFreeAffineTransform(), WlzFreeObj(), WlzMakeMain(), WlzMakeMarkers(), WlzVerticesFromObj2I(), and WlzVerticesFromObj3I().
WlzPoints* WlzMakePoints | ( | WlzObjectType | type, |
int | nVtx, | ||
WlzVertexP | vtxP, | ||
int | maxVtx, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new point domain. A point domain consists of an array of vertices which are treated as seperate points.
type | Type of point vertices, which must be one of WLZ_POINTS_2I, WLZ_POINTS_2D, WLZ_POINTS_3I or WLZ_POINTS_3D. |
nVtx | Number of points to copy to the new domain. |
vtxP | Points to copy to the new domain. These must be of the correct type. If NULL then no points are copied. |
maxVtx | The number of vertices for which space is allocated. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), _WlzPoints::maxPoints, _WlzPoints::nPoints, _WlzPoints::points, _WlzPoints::type, _WlzVertexP::v, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, and WLZ_POINTS_3I.
Referenced by WlzAffineTransformPoints(), WlzBSplineEvalPoints(), WlzLineSkeletonSegment(), WlzPointsDither(), and WlzPointsFromDomObj().
WlzErrorNum WlzNObjGreyStats | ( | WlzObject * | gObj, |
int | mean, | ||
int | stddev, | ||
int * | dstN, | ||
WlzObject ** | dstMinObj, | ||
WlzObject ** | dstMaxObj, | ||
WlzObject ** | dstSumObj, | ||
WlzObject ** | dstSSqObj | ||
) |
Computes a collection of objects from the object (which should be a compound array object). The computed objects all have the intersection of the given object domains as their domain and WLZ_GREY_DOUBLE values for the minimum, maximum, sum and sum of squares of the given grey values at each pixel/voxel within the intersection domain. Returned objects will have name properties set to: min, max, sum, ssq, mean and stddev as appropriate.
gObj | Given object. |
mean | Compute mean not sum if non-zero. |
stddev | Compute standard deviation not sum of squares if non-zero. |
dstN | Destination pointer for number of objects, may be NULL. |
dstMinObj | Destination pointer for minimum value object, may be NULL if not required. |
dstMaxObj | Destination pointer for maximum value object, may be NULL if not required. |
dstSumObj | Destination pointer for sum of values object, may be NULL if not required. |
dstSSqObj | Destination pointer for sum of squares object, may be NULL if not required. |
References _WlzValues::core, _WlzDomain::core, _WlzGreyV::dbv, _WlzObject::domain, _WlzPixelV::type, _WlzObject::type, _WlzCoreValues::type, _WlzPixelV::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_TAB_RAGR, WlzFreeObj(), WlzGreyTableIsTiled(), WlzGreyValueTableType(), WlzIntersectN(), and WlzNewObjectValues().
WlzErrorNum Wlz3DSectionOcc | ( | WlzObject * | obj, |
WlzThreeDViewStruct * | vs, | ||
double | sep, | ||
double * | dstFirst, | ||
double * | dstLast, | ||
int * | dstArraySizeOcc, | ||
int ** | dstArrayOcc | ||
) |
Computes an array of integers which correspond to a line through the given object's domain perpendicular to the plane defined by the given view structure. At each point along the line the occupancy area or number of domains intersecting the plane is computed. When the given object is a 3D spatial domain object then areas are computed and when it is a compound array then the occupancy (number of domains) is computed.
obj | Given object with the domain or a compound object with many domains. |
vs | Given view structure which defines the cutting plane. The view structure will be initialised within this function. |
sep | Plane separation distance, must be greater than ALG_DBL_TOLLERANCE. |
dstFirst | Destination pointer for the first coordinate of the line in a 1D coordinate system perpendicular to the cutting plane. May be NULL. |
dstLast | Destination pointer for the last coordinate of the line in a 1D coordinate system perpendicular to the cutting plane. May be NULL. |
dstArraySizeOcc | Destination pointer for the size of the occupancy array. May be NULL. |
dstArrayOcc | Destination pointer for the occupancy array. The occupancy array should be freed using AlcFree(). May be NULL. |
References AlcCalloc(), AlcFree(), ALG_DBL_TOLLERANCE, _WlzDomain::core, _WlzThreeDViewStruct::dist, _WlzObject::domain, _WlzThreeDViewStruct::maxvals, _WlzThreeDViewStruct::minvals, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzThreeDViewStruct::ref_obj, _WlzObject::type, _WlzThreeDViewStruct::type, _WlzDVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_3D_VIEW_STRUCT, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOUBLE_DATA, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_PARAM_TYPE, WLZ_INTERPOLATION_NEAREST, WlzArea(), WlzAssignObject(), WlzFree3DViewStruct(), WlzFreeObj(), WlzGetSubSectionFromObject(), WlzInit3DViewStruct(), WlzIsEmpty(), WlzMake3DViewStructCopy(), and WlzUnionN().
WlzObject* WlzDomainOccupancy | ( | WlzObject * | gObj, |
WlzErrorNum * | dstErr | ||
) |
Computes a new Woolz domain object which has the domain of the given object (union of domains if the object is a compound array) and a value table with integer values representing the number of domains present.
gObj | Given object. |
dstErr | Destination error pointer. |
References _WlzGreyV::inv, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzGreyV::shv, _WlzPixelV::type, _WlzObject::type, _WlzGreyV::ubv, _WlzPixelV::v, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_INT, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WlzFreeObj(), WlzGreyIncValuesInDomain(), WlzGreySetValue(), WlzGreyValueTableType(), WlzNewObjectValues(), and WlzUnionN().
WlzObject* WlzOffsetDist | ( | WlzObject * | obj0, |
WlzObject * | obj1, | ||
int | maxDist, | ||
WlzErrorNum * | dstErr | ||
) |
Computes an object with domain and values that are the set of minimum distances between the two given objects. An equidistant boundary is computed between the domains of the two given objects, within maxDist of each object's domain and within the convex hull of the union of the two given object's domains. This function will probably only be useful where one of the objects tends to track the other.
obj0 | First given object. |
obj1 | Second given object. |
maxDist | Maximum distance for offset. This is used to compute a distance object, large distances will significantly increase the processing time. If zero the maximum distance will be determined by the convex hull. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzGreyV::inv, _WlzPixelV::type, _WlzPixelV::v, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_BO_EQ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_INT, WLZ_OCTAGONAL_DISTANCE, WLZ_THRESH_HIGH, WlzAssignObject(), WlzConvexHullToObj(), WlzDistanceTransform(), WlzFreeObj(), WlzGreyTemplate(), WlzImageArithmetic(), WlzIntersect2(), WlzMakeEmpty(), WlzMakeSphereObject(), WlzObjToConvexHull(), WlzSetBackground(), WlzStructDilation(), WlzThreshold(), WlzUnionN(), and WlzVolume().
WlzObject* WlzPointsToDomObj | ( | WlzPoints * | pnt, |
double | scale, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a domain object which coresponds to the union of the given points.
pnt | Point domain. |
scale | Scale, which if greater than zero is used as the diameter of a circle or sphere centred on each of the points vertices and a multiplier for the point position. |
dstErr | Destination error poiter, may be NULL. |
References _WlzVertexP::d2, _WlzVertexP::d3, _WlzVertex::d3, _WlzVertexP::i2, _WlzVertexP::i3, _WlzVertex::i3, _WlzPoints::points, _WlzPoints::type, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_TYPE, WLZ_NINT, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WlzFreeObj(), WlzMakeEmpty(), WlzMakeSinglePixelObject(), WlzMakeSphereObject(), and WlzUnion2().
Referenced by WlzDistanceTransform().
WlzPoints* WlzPointsFromDomObj | ( | WlzObject * | gvnObj, |
double | dMin, | ||
int | useFloatingPoint, | ||
int | voxelScaling, | ||
int | useGrey, | ||
double | gMin, | ||
double | gMax, | ||
double | gGam, | ||
WlzErrorNum * | dstErr | ||
) |
Finds points which are within the given opjects domain and are seperated by at least the given minimum distance. If the given object's grey values are used, then the probability of a point being placed is proportional to:
\[ \left\{ \begin{array}{ll} 0.0 & g_i < g_{min} \\ frac{(g_i - g_{min})^\gamma}{g_{max} - g_{min}} & g_i > g_{min} \end{array} \right. \]
.
gvnObj | Given spatial domain object. |
dMin | Given minimum distance (if less than 1.0 then will be set to 1.0). |
useFloatingPoint | If non-zero (or voxelScaling is set) the the points will always have double (rather than int) point positions. |
voxelScaling | Use voxel scaling if non-zero (voxel scaling implies floating point). |
useGrey | Use grey values. |
gMin | Minimum grey value. |
gMax | Maximum grey value. |
gGam | Gamma for grey value. |
dstErr | Destination error pointer, may be NULL. |
References ALC_ER_NONE, ALC_POINTTYPE_INT, AlcFree(), AlcKDTGetNN(), AlcKDTInsert(), AlcKDTTreeFree(), AlcKDTTreeNew(), AlcRealloc(), AlcVectorExtend(), AlcVectorFree(), AlcVectorItemGet(), AlcVectorNew(), ALG_NINT, AlgRandUniform(), AlgShuffleIdx(), _WlzValues::core, _WlzDomain::core, _WlzVertexP::d2, _WlzVertexP::d3, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyV::flv, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzVertexP::i2, _WlzVertexP::i3, _WlzGreyV::inv, _WlzPoints::nPoints, _WlzDomain::p, _WlzPoints::points, _WlzGreyV::rgbv, _WlzGreyV::shv, _WlzPixelV::type, _WlzObject::type, _WlzCoreDomain::type, _WlzGreyV::ubv, _WlzVertexP::v, _WlzPixelV::v, _WlzObject::values, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, 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_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WLZ_RGBA_MODULUS, WLZ_THRESH_HIGH, WLZ_THRESH_LOW, WlzAssignObject(), WlzBoundaryDomain(), WlzFreeObj(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzIsEmpty(), WlzMakeCuboidObject(), WlzMakeMain(), WlzMakePoints(), WlzMakeRectangleObject(), WlzStructErosion(), WlzThreshold(), WlzVerticesFromObj2I(), and WlzVerticesFromObj3I().
Referenced by WlzDGTensorFeatures().
WlzPointValues* WlzPointValuesFromDomObj | ( | WlzPoints * | pdm, |
WlzObject * | domObj, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new point values using the given points domain and domain object with values. Values are sampled from the domain object using the locations of the points in the points domain.
pdm | Given points domain. |
domObj | Given domain object with values. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzVertexP::d2, _WlzVertexP::d3, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyValueWSpace::gPtr, _WlzGreyValueWSpace::gType, _WlzVertexP::i2, _WlzVertexP::i3, _WlzGreyP::inp, _WlzPoints::nPoints, _WlzPoints::points, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzObject::type, _WlzPoints::type, _WlzGreyP::ubp, _WlzGreyP::v, _WlzObject::values, _WlzPointValues::values, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, 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_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_ERROR, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WlzFreePointValues(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), and WlzMakePointValues().
WlzObject* WlzPointsToMarkers | ( | WlzPoints * | pts, |
WlzMarkerType | mType, | ||
int | mSz, | ||
WlzErrorNum * | dstErr | ||
) |
Constructs a domain from the union of marker domains with a marker domain at each of the given point positions.
pts | Given points. |
mType | Marker type. |
mSz | Marker size. This is the radius of a sphere marker. The marker size is ignored for point markers. |
dstErr | Destination error pointer, may be NULL. |
References _WlzPoints::nPoints, _WlzPoints::points, _WlzPoints::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_ERROR, WLZ_VERTEX_I2, WLZ_VERTEX_I3, and WlzMakeMarkers().
WlzPoints* WlzPointsDither | ( | WlzPoints * | gPts, |
WlzDVertex3 | dSz, | ||
WlzObject * | resObj, | ||
WlzErrorNum * | dstErr | ||
) |
Dithers the vertices of the given points by adding a random displacement within the range -d to +d, where d is the given dither size.
gPts | Given points. |
dSz | Dither size (z component is not used if points are 2D). |
resObj | If non NULL then the dithered points will always fall within the given spatial domain object's domain. |
dstErr | Destination error pointer, may be NULL. |
References AlgRandUniform(), _WlzVertexP::d2, _WlzVertex::d2, _WlzVertexP::d3, _WlzVertex::d3, _WlzVertexP::i2, _WlzVertexP::i3, _WlzPoints::nPoints, _WlzPoints::points, _WlzObject::type, _WlzPoints::type, _WlzVertexP::v, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WLZ_VTX_2_ADD, WLZ_VTX_2_COPY, WLZ_VTX_3_ADD, WLZ_VTX_3_COPY, WlzInsideDomain(), and WlzMakePoints().
Referenced by WlzDGTensorFeatures().
WlzVertexType WlzPointsVertexType | ( | WlzObjectType | pType, |
WlzErrorNum * | dstErr | ||
) |
Gets the points domain vertex type.
pType | Given points domain type. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_POINTS_2D, WLZ_POINTS_2I, WLZ_POINTS_3D, WLZ_POINTS_3I, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_ERROR, WLZ_VERTEX_I2, and WLZ_VERTEX_I3.
Referenced by WlzBSplineFromObj().
int WlzRGBAGreyStats | ( | WlzObject * | srcObj, |
WlzRGBAColorSpace | colSpc, | ||
WlzGreyType * | dstGType, | ||
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev, | ||
WlzErrorNum * | dstErr | ||
) |
Calculates simple quick statistics for the domain object with RGBA values. Each component has its statictics computed and entered into the four double[4] arrays.
srcObj | Given object. |
colSpc | Colour space. |
dstGType | Pointer for grey type. |
dstMin | Array for the 4 minimum value. |
dstMax | Array for the 4 maximum value. |
dstSum | Array for the 4 sum of values. |
dstSumSq | Array for the 4 sum of squares of values. |
dstMean | Array for the 4 mean values. |
dstStdDev | Array for the 4 standard deviation values. |
dstErr | Destination pointer for error, may be NULL. |
References _WlzCompoundArray::o, WLZ_ERR_NONE, WLZ_GREY_RGBA, WlzFreeObj(), WlzGreyStats(), and WlzRGBAToCompound().
Referenced by WlzPatchTreeToObject().
WlzErrorNum WlzSampleValuesAndCoords | ( | WlzObject * | obj, |
WlzGreyType * | dstGType, | ||
int * | dstNVal, | ||
WlzGreyP * | dstValP, | ||
WlzVertexP * | dstCoords, | ||
WlzSampleFn | samFn, | ||
int | samFac | ||
) |
Allocates buffers for both the grey values and the coordinates of the grey values in the given object. On return these buffers contain the sampled object values and the coordinates of the values.
obj | Given object. |
dstGType | Type of grey value. |
dstNVal | Number of grey values, also the number of coordinates. |
dstValP | Destination pointer for the values. |
dstCoords | Destination pointer for the coordinates, these are always either WlzIVertex2 or WlzIVertex3 depending on the objects dimension. |
samFn | Sampling function. |
samFac | Sampling factor. |
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_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_SAMPLEFN_MAX, and WLZ_SAMPLEFN_MIN.
Referenced by WlzScalarFeatures2D().
WlzErrorNum WlzScalarFeatures2D | ( | WlzObject * | obj, |
int * | dstNFeat, | ||
WlzIVertex2 ** | dstFeat, | ||
WlzScalarFeatureType | fType, | ||
WlzThresholdType | thrHL, | ||
WlzPixelV | thrV, | ||
double | filterV, | ||
double | minDist | ||
) |
Finds scalar features within the given object. Where the feature values are all either above or below the given threshold value, depending on the value of thrHL, and the features have the given minimum seperation distance.
The features are found using the following algorithm: <ul> <li> Compute feature values from given object. </li> <li> Threshold and extract a list of features. </li> <li> Sort the list of features by value. </li> <li> Create a kD-tree. </li> <li> While the list of feature values is not empty. <ul> <li> Remove item from list of features. </li> <li> Find distance to nearest neighbour in the kD-tree. </li> <li> If the distance is greater than the minimum. <ul> <li> Add the feature to the kD-tree. </li> </ul></li> </ul></li> <li> Output features of the kD-tree. </li> </ul> The cost of this function depends on the threshold value and to some extent on the minimum distance. If feature values are computed then they are normalised using WlzGreyNormalise(), to allow threshold values to be set.
obj | Given object. |
fType | Type of feature to find. |
thrHL | High or low feature values. |
thrV | Threshold feature value. |
minDist | Minimum distance between features. |
dstNFeat | Destination pointer for the number of scalar features found. |
dstFeat | Destination pointer for coordinates of the features found. |
filterV | Filter value for computing features. |
dstFeat | Destination pointer for the coordinates of the scalar features. |
References ALC_ER_NONE, ALC_POINTTYPE_DBL, AlcFree(), AlcKDTGetNN(), AlcKDTInsert(), AlcKDTTreeFree(), AlcKDTTreeNew(), AlcMalloc(), AlgHeapSortCmpIdxDFn(), AlgHeapSortCmpIdxFFn(), AlgHeapSortCmpIdxIFn(), AlgHeapSortCmpIdxLFn(), AlgHeapSortCmpIdxSFn(), AlgHeapSortCmpIdxUFn(), AlgHeapSortIdx(), AlgHeapSortInvCmpIdxDFn(), AlgHeapSortInvCmpIdxFFn(), AlgHeapSortInvCmpIdxIFn(), AlgHeapSortInvCmpIdxLFn(), AlgHeapSortInvCmpIdxSFn(), AlgHeapSortInvCmpIdxUFn(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzVertexP::i2, _WlzGreyP::inp, _WlzObject::type, _WlzVertexP::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_SAMPLEFN_MAX, WLZ_SAMPLEFN_MIN, WLZ_SCALARFEATURE_GRADIENT, WLZ_SCALARFEATURE_VALUE, WLZ_THRESH_HIGH, WLZ_THRESH_LOW, WlzAssignObject(), WlzFreeObj(), WlzGreyModGradient(), WlzGreyNormalise(), WlzSampleValuesAndCoords(), and WlzThreshold().
WlzObject* WlzDGTensorFeatures | ( | WlzObject * | mObj, |
unsigned int | features, | ||
int | points, | ||
double | dMin, | ||
WlzDVertex3 | dither, | ||
WlzDVertex3 | smooth, | ||
int | voxScaling, | ||
WlzErrorNum * | dstErr | ||
) |
Computes features of a deformation gradient tensor field and creates a compound object, each element of which is a required feature of the given deformation gradient field object. The feature object may be either a points object or a spatial domain object as required. See WlzDGTensorSDFeature() which this function calls to compute the feature objects.
mObj | Given deformation gradient field object. This must be a 3D object in which the (tiled) voxel values are each a nine element Jacobian deformation gradient tensor. |
features | Mask with required features. |
points | Generate a points object rather than a field. |
dMin | If generating a points the points will have this minimum seperation distance (if less than 1.0 then will be set to 1.0). |
dither | If generating a points object dither the points within this range (no dithering if values are zero). The dithering is always done in unit voxel space. |
smooth | If smoothing values are > 0.0 apply a Gaussian smoothing filter with these sigma values to spatial field feature values. There is no smoothing of point feature values. |
voxScaling | Use voxel size for points objects if non zero. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzVertexP::d3, _WlzTiledValues::dim, _WlzObject::domain, _WlzCompoundArray::n, _WlzPoints::nPoints, _WlzCompoundArray::o, _WlzDomain::p, _WlzPoints::points, _WlzDomain::pts, _WlzValues::t, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzTiledValues::vDim, _WlzPlaneDomain::voxel_size, _WlzTiledValues::vRank, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_DGTENSOR_FEATURE_LIMIT, WLZ_DGTENSOR_FEATURE_MASK, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_NULL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_POINTS, WLZ_VTX_3_SQRLEN, WlzAssignDomain(), WlzAssignObject(), WlzDGTensorPDFeature(), WlzDGTensorSDFeature(), WlzFreeDomain(), WlzFreeObj(), WlzGreyTableIsTiled(), WlzMakeCompoundArray(), WlzPointsDither(), and WlzPointsFromDomObj().
WlzObject* WlzDGTensorSDFeature | ( | WlzObject * | mObj, |
WlzDomain | fDom, | ||
WlzDGTensorFeatureType | feat, | ||
WlzDVertex3 | smooth, | ||
WlzErrorNum * | dstErr | ||
) |
Computes a feature of a deformation gradient tensor field throughout the given 3D spatial domain. This function assumes all input parameters to be valid, when this is not certain use WlzDGTensorFeatures(). The returned object will have it's name property set to an appropriate name for the required feature: WLZ_DGTENSOR_FEATURE_DETJAC ("jacobian"), WLZ_DGTENSOR_FEATURE_EIGENVEC ("eigen vectors") or WLZ_DGTENSOR_FEATURE_EIGENVAL ("eigen values").
mObj | Given deformation gradient field object. This must be a 3D object in which the (tiled) voxel values are each a nine element Jacobian deformation gradient tensor. |
fDom | Given 3D spatial domain (WlzPlaneDomain). |
feat | Required feature. |
smooth | If values are > 0.0 apply a Gaussian smoothing filter with these sigma values to the feature values. |
dstErr | Destination error pointer, may be NULL. |
References ALG_MAX, ALG_MIN, AlgMatrixRectNew(), _AlgMatrix::core, _WlzValues::core, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzIntervalWSpace::linpos, _WlzDomain::p, _WlzPlaneDomain::plane1, _AlgMatrix::rect, _WlzPixelV::type, _WlzPixelV::v, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DGTENSOR_FEATURE_DETJAC, WLZ_DGTENSOR_FEATURE_EIGENVAL, WLZ_DGTENSOR_FEATURE_EIGENVEC, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_RASTERDIR_ILIC, WLZ_TILEDVALUES_TILE_SIZE, WlzFreeObj(), WlzGreyValueMakeWSp(), WlzInitRasterScan(), WlzIWSpIntersection(), WlzMakeMain(), WlzMakeTiledValuesObj3D(), and WlzNextInterval().
Referenced by WlzDGTensorFeatures().
WlzObject* WlzDGTensorPDFeature | ( | WlzObject * | mObj, |
WlzDomain | fDom, | ||
WlzDGTensorFeatureType | feat, | ||
WlzErrorNum * | dstErr | ||
) |
Computes a feature of a deformation gradient tensor field throughout the given 3D points domain. This function assumes all input parameters to be valid, when this is not certain use WlzDGTensorFeatures().
mObj | Given deformation gradient field object. This must be a 3D object in which the (tiled) voxel values are each a nine element Jacobian deformation gradient tensor. |
fDom | Given 3D points domain (WlzPoints). |
feat | Required feature. |
dstErr | Destination error pointer, may be NULL. |
References AlcCalloc(), AlgMatrixRectNew(), _WlzVertexP::d3, _WlzPoints::maxPoints, _WlzPoints::nPoints, _WlzPoints::points, _WlzValues::pts, _WlzDomain::pts, _WlzObject::values, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_DGTENSOR_FEATURE_DETJAC, WLZ_DGTENSOR_FEATURE_EIGENVAL, WLZ_DGTENSOR_FEATURE_EIGENVEC, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_POINTS, WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzMakeMain(), and WlzMakePointValues().
Referenced by WlzDGTensorFeatures().
WlzErrorNum WlzTensorSmooth | ( | WlzObject * | obj, |
WlzDVertex3 | smooth | ||
) |
Smooths the (possibly) non-scalar features of the given object in place by applying a Gaussian filter with the given sigma values (sigma value <~ 0.0 implies no filtering in the corresponding direction.
obj | Given object with values to smooth. |
smooth | Gaussian filter sigma values. |
References ALG_PAD_END, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzValues::t, _WlzObject::type, _WlzCoreValues::type, _WlzObject::values, _WlzTiledValues::vpe, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WlzFreeObj(), WlzGaussFilter(), WlzGreyTableIsTiled(), WlzGreyTypeFromObj(), WlzTensorGetComponent(), and WlzTensorSetComponent().
WlzObject* WlzTensorGetComponent | ( | WlzObject * | tObj, |
int | cpt, | ||
WlzErrorNum * | dstErr | ||
) |
Extracts a single value component from a (possibly) non-scalar object and creates an object with a non-tiled value table which is returned. This function may also be used to convert a tiled value object to a non-tiled value object.
tObj | Given object (possibly) with non-scalar values. |
cpt | The component index which must be in the range [0-(v - 1)] where v is the values per element. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzValues::t, _WlzObject::type, _WlzCoreValues::type, _WlzObject::values, _WlzTiledValues::vpe, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_GREY_ERROR, WLZ_GREY_TAB_RAGR, WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyValueTableType(), and WlzNewObjectValues().
Referenced by WlzTensorSmooth().
WlzErrorNum WlzTensorSetComponent | ( | WlzObject * | tObj, |
WlzObject * | fObj, | ||
int | cpt | ||
) |
Sets a single value component in a (possibly) non-scalar object using scalar values of the second given object.
tObj | Given object (possibly) with non-scalar values which is to have component values set. |
fObj | Given scalar valued object with values to be transfered to the first given object. |
cpt | The component index which must be in the range [0-(v - 1)] where v is the values per element of the first object. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzValues::t, _WlzObject::type, _WlzCoreValues::type, _WlzObject::values, _WlzTiledValues::vpe, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, and WlzGreyTableIsTiled().
Referenced by WlzTensorSmooth().
WlzObject* WlzCMeshDGTensor | ( | WlzObject * | cObj, |
int | invert, | ||
WlzErrorNum * | dstErr | ||
) |
Given a conforming mesh transform this function computes the displacement gradient tensor for each of it's valid elements. Given displacement \(\vec{u}(\vec{r})\) with position vector \(\vec{r}\) which maps a point from a space \(\vec{x}\) to a space \(\vec{u}\) the displacement gradient tensor is defined in 3D as
\[ { \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} u_{i,j} = \left [ \begin{array}{ccc} \pd{u_0}{x_0} & \pd{u_0}{x_1} & \pd{u_0}{x_2} \\ \pd{u_1}{x_0} & \pd{u_1}{x_1} & \pd{u_1}{x_2} \\ \pd{u_2}{x_0} & \pd{u_2}{x_1} & \pd{u_2}{x_2} \end{array} \right] } \]
with
\[ \Delta r_i = u_{ij} r_j \]
where \(\vec{u} = \left[u_0, u_1, u_2\right]^T\) and \(\Delta \vec{r} = \left[x_0, x_1, x_2\right]^T\). The displacement gradient tensor matrix is just the rotation and independent scaling part of the affine transform that displaces the element.
cObj | Given conforming mesh object. |
invert | Invert if non-zero, by default the tensors are computed for the transform from the mesh to the displaced mesh. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_CMESH_2D, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_UNIMPLEMENTED, and WLZ_ERR_VALUES_NULL.
Referenced by WlzCMeshStrainTensor().
WlzObject* WlzCMeshDGTensorAtPts | ( | WlzObject * | cObj, |
int | invert, | ||
WlzDVertex3 | sd, | ||
int | dither, | ||
WlzErrorNum * | dstErr | ||
) |
Given a conforming mesh transform this function computes the displacement gradient tensor at regular cartesian grid sample points throughout the mesh. The tensor values at the sample points are computed at each point by computing an iverse distance weighted least squares general affine transform for the ring of nodes surrounding the closest node. See WlzCMeshDGTensor() for the description of the tensor.
cObj | Given conforming mesh object. |
invert | Invert if non-zero, by default the tensors are computed for the transform from the mesh to the displaced mesh. |
sd | Sample distance. |
dither | Dither the sample locations. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_CMESH_2D, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_DATA, WLZ_ERR_UNIMPLEMENTED, WLZ_ERR_VALUES_NULL, and WLZ_MESH_TOLERANCE.
Referenced by WlzCMeshStrainTensorAtPts().
WlzObject* WlzCMeshStrainTensor | ( | WlzObject * | cObj, |
int | invert, | ||
WlzErrorNum * | dstErr | ||
) |
Given a conforming mesh transform this function computes the strain tensor for each of it's valid elements. This function uses WlzCMeshDGTensor() to compute the displacement gradient tensor and the derives the strain tensor \(e_{ij}\) from this using:
\[ e_{ij} = \frac{1}{2} (u_{ij} + u_{ji}) \]
.
cObj | Given conforming mesh object. |
invert | Invert if non-zero, by default the tensors are computed for the transform from the mesh to the displaced mesh. |
dstErr | Destination error pointer, may be NULL. |
References _WlzObject::type, WLZ_CMESH_2D, WLZ_CMESH_3D, WLZ_ERR_NONE, WLZ_ERR_UNIMPLEMENTED, and WlzCMeshDGTensor().
WlzObject* WlzCMeshStrainTensorAtPts | ( | WlzObject * | cObj, |
int | invert, | ||
WlzDVertex3 | sd, | ||
int | dither, | ||
WlzErrorNum * | dstErr | ||
) |
Given a conforming mesh transform this function computes the displacement gradient tensor at regular cartesian grid sample points throughout the mesh. The tensor values at the sample points are computed using WlzCMeshDGTensorAtPts(). The strain tensor is then computed from the displacement gradient tensor as for WlzCMeshStrainTensor().
cObj | Given conforming mesh object. |
invert | Invert if non-zero, by default the tensors are computed for the transform from the mesh to the displaced mesh. |
sd | Sample distance. |
dither | Dither the sample locations. |
dstErr | Destination error pointer, may be NULL. |
References _WlzObject::type, WLZ_CMESH_2D, WLZ_CMESH_3D, WLZ_ERR_NONE, WLZ_ERR_UNIMPLEMENTED, and WlzCMeshDGTensorAtPts().
WlzObject* WlzThinToPoints | ( | WlzObject * | gObj, |
int | gThin, | ||
int | gStart, | ||
int | gInc, | ||
WlzErrorNum * | dstErr | ||
) |
Extracts a points object in which the points are the centres of thinned regions of the input domain object. If the object has grey values and gThin is set then the object is erroded by successive thresholding while collecting all disconnected regions or if the object has no values the object is simply labeled to give a collection of disconnected regions. The disconnected regions are then eroded (morphologicaly) again collecting disconnected regions.
gObj | Given domain object, with or without values. |
gThin | Use object grey values. |
gStart | Initial threshold value for grey thinning. |
gInc | Increment for grey thinning. |
dstErr | Destination error pointer, may be NUll. |
References AlcHeapNew(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_THRESH_HIGH, and WLZ_THRESH_LOW.
WlzVertexP WlzVerticesFromObj | ( | WlzObject * | obj, |
WlzVertexP * | dstNr, | ||
int * | dstCnt, | ||
WlzVertexType * | dstType, | ||
WlzErrorNum * | dstErr | ||
) |
Allocates a buffer which it fills with the vertices from the given object. If the object is not one of the types that is represented by vertices, eg polylines, boundlists, contours ..., then this may result in a very large number of vertices, with for example one per voxel. Normals will only be allocated and set for objects represented by vertices, eg there will be no normals for voxel based objects.
obj | Given polygon domain object. |
dstNr | Destination ptr for normals. The normals will always be either WlzDVertex2 or WlzDVertex3. May be NULL. |
dstCnt | Destination ptr for the number of vertices. Can NOT be NULL. |
dstType | Destination ptr for the type of vertices. Can NOT be NULL. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzVertexP::i2, _WlzVertexP::i3, _WlzObject::type, _WlzVertexP::v, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WlzVerticesFromObj2I(), and WlzVerticesFromObj3I().
Referenced by WlzBasisFnTransformRandom(), WlzBSplineFromObj(), WlzObjToConvexHull(), WlzRegICPObjs(), WlzRegICPObjsGrd(), WlzRegICPObjWSD2D(), and WlzSnapFit().
WlzVertexP WlzVerticesFromObjBnd | ( | WlzObject * | obj, |
int * | dstCnt, | ||
WlzVertexType * | dstType, | ||
WlzErrorNum * | dstErr | ||
) |
Extracts all vertices that lie on the boundary of the given objects domain.
obj | Given 2D or 3D domain object. |
dstCnt | Destination ptr for the number of vertices. |
dstType | Destination ptr for the type of vertices, which will always be integer. |
dstErr | Destination error pointer, may be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzVertexP::i2, _WlzVertexP::i3, _WlzObject::type, _WlzVertexP::v, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WlzVerticesFromObjBnd2I(), and WlzVerticesFromObjBnd3I().
WlzErrorNum WlzVerticesFromObjBnd2I | ( | WlzObject * | obj, |
int * | dstNVtx, | ||
WlzIVertex2 ** | dstVtx | ||
) |
Extracts all vertices that lie on the boundary of the given 2D domain object's domain.
obj | Given 2D domain object. |
dstNVtx | Destination ptr for the number of vertices, MUST NOT be NULL. |
dstVtx | Destination ptr for the vertices, MUST NOT be NULL. |
References _WlzVertexP::v, WLZ_ERR_NONE, and WlzObjToBoundary().
Referenced by WlzVerticesFromObjBnd().
WlzErrorNum WlzVerticesFromObjBnd3I | ( | WlzObject * | obj, |
int * | dstNVtx, | ||
WlzIVertex3 ** | dstVtx | ||
) |
Extracts all vertices that lie on the boundary of the given 3D domain object's domain.
obj | Given 3D domain object. |
dstNVtx | Destination ptr for the number of vertices, MUST NOT be NULL. |
dstVtx | Destination ptr for the vertices, MUST NOT be NULL. |
References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_3D_DOMAINOBJ, WLZ_6_CONNECTED, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WlzDiffDomain(), WlzErosion(), WlzFreeObj(), and WlzVerticesFromObj3I().
Referenced by WlzVerticesFromObjBnd().
WlzErrorNum WlzVerticesFromObj2I | ( | WlzObject * | obj, |
int * | dstNVtx, | ||
WlzIVertex2 ** | dstVtx | ||
) |
Extracts all vertices that lie within the given 2D domain object's domain.
obj | Given 2D domain object. |
dstNVtx | Destination ptr for the number of vertices, MUST NOT be NULL. |
dstVtx | Destination ptr for the vertices, MUST NOT be NULL. |
References AlcMalloc(), _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzIntervalWSpace::rgtpos, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_EOO, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_RASTERDIR_ILIC, WlzArea(), WlzInitRasterScan(), and WlzNextInterval().
Referenced by WlzMarkerLattice(), WlzPointsFromDomObj(), WlzVerticesFromObj(), and WlzVerticesFromObj3I().
WlzErrorNum WlzVerticesFromObj3I | ( | WlzObject * | obj, |
int * | dstNVtx, | ||
WlzIVertex3 ** | dstVtx | ||
) |
Extracts all vertices that lie within the given 3D domain object's domain.
obj | Given 3D domain object. |
dstNVtx | Destination ptr for the number of vertices, MUST NOT be NULL. |
dstVtx | Destination ptr for the vertices, MUST NOT be NULL. |
References AlcFree(), AlcMalloc(), _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzIVertex2::vtX, WLZ_2D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WlzFreeObj(), WlzMakeMain(), WlzVerticesFromObj2I(), and WlzVolume().
Referenced by WlzMarkerLattice(), WlzPointsFromDomObj(), WlzVerticesFromObj(), and WlzVerticesFromObjBnd3I().
WlzVertexP WlzVerticesFromGM | ( | WlzGMModel * | model, |
WlzVertexP * | dstNr, | ||
int ** | dstVId, | ||
int * | dstCnt, | ||
WlzVertexType * | dstType, | ||
WlzErrorNum * | dstErr | ||
) |
Allocates a buffer which it fills with the vertices from a geometric model.
model | Given geometric model. |
dstNr | Destination ptr for normals, may be NULL. |
dstVId | Destination ptr for the GM vertex indicies, may be NULL. |
dstCnt | Destination ptr for the number of vertices. |
dstType | Destination ptr for the type of vertices. |
dstErr | Destination error pointer, may be NULL. |
References _WlzGMModel::type, _WlzVertexP::v, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, and WLZ_GMMOD_2N.
Referenced by WlzDistMetricDirGM(), WlzDistMetricGM(), and WlzMatchICPCtr().
WlzVertexP WlzDVerticesFromGM | ( | WlzGMModel * | model, |
int * | dstCnt, | ||
WlzVertexType * | dstType, | ||
WlzErrorNum * | dstErr | ||
) |
Allocates a buffer which it fills with either 2D or 3D double precission vertices from the geometric model. The indicies of the vertices in the buffer are the same as the indices of the vertices in the model.
model | Given geometric model. |
dstCnt | Destination ptr for the number of vertices. |
dstType | Destination ptr for the type of vertices. |
dstErr | Destination error pointer, may be NULL. |
References _WlzVertexP::d2, _WlzGMModel::type, _WlzVertexP::v, WLZ_ERR_NONE, WLZ_GMMOD_2D, WLZ_GMMOD_2I, WLZ_GMMOD_2N, and WLZ_VERTEX_D2.
Referenced by WlzGMFilterGeomLPLM().
size_t WlzVertexSize | ( | WlzVertexType | type, |
WlzErrorNum * | dstErr | ||
) |
Returns the size of the given vertex type.
type | Given vertex type. |
dstErr | Destination error pointer, may be NULL. |
References _WlzKrigModelFn::type, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_F2, WLZ_VERTEX_F3, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WLZ_VERTEX_L2, and WLZ_VERTEX_L3.
int WlzVertexDim | ( | WlzVertexType | type, |
WlzErrorNum * | dstErr | ||
) |
Returns the dimension of the given vertex type.
type | Given vertex type. |
dstErr | Destination error pointer, may be NULL. |
References _WlzKrigModelFn::type, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_VERTEX_D2, WLZ_VERTEX_D3, WLZ_VERTEX_F2, WLZ_VERTEX_F3, WLZ_VERTEX_I2, WLZ_VERTEX_I3, WLZ_VERTEX_L2, and WLZ_VERTEX_L3.
Referenced by WlzBSplineFromVertices().
WlzVertexP WlzDVerticesFromCMesh | ( | WlzCMeshP | mesh, |
int * | dstCnt, | ||
WlzVertexType * | dstType, | ||
int | skip, | ||
WlzErrorNum * | dstErr | ||
) |
Allocates a buffer which it fills with either 2D or 3D double precission vertices from the conforming mesh. The indicies of the vertices in the buffer are the same as the indices of the vertices in the model unless the skip non-valid nodes flag is set..
mesh | Given mesh. |
dstCnt | Destination ptr for the number of vertices. |
dstType | Destination ptr for the type of vertices. |
skip | Skip non-valid nodes if non-zero. |
dstErr | Destination error pointer, may be NULL. |
References _WlzVertexP::d2, _WlzCMeshP::m2, _WlzCMesh2D::type, _WlzVertexP::v, _WlzCMeshP::v, WLZ_CMESH_2D, WLZ_ERR_NONE, and WLZ_VERTEX_D2.
Referenced by WlzCMeshLPFilterLM().
int WlzVertexQSortFnI2 | ( | void * | p0, |
void * | p1 | ||
) |
Function for AlgSort() to sort WlzIVertex2 vertices so that they have increasing Y then X.
p0 | First vertex pointer. |
p1 | Second vertex pointer. |
References _WlzIVertex2::vtX, and _WlzIVertex2::vtY.
int WlzVertexQSortFnI3 | ( | void * | p0, |
void * | p1 | ||
) |
Function for AlgSort() to sort WlzIVertex3 vertices so that they have increasing z then Y then X.
p0 | First vertex pointer. |
p1 | Second vertex pointer. |
References _WlzIVertex3::vtX, _WlzIVertex3::vtY, and _WlzIVertex3::vtZ.
int WlzVertexHeapSortIdxFnI2 | ( | void * | data, |
int * | idx, | ||
int | id0, | ||
int | id1 | ||
) |
Function for AlgHeapSortIdx() to sort WlzIVertex2 vertices so that they have increasing Y then X.
data | Vertex array. |
idx | Vertex index array. |
id0 | First index. |
id1 | Second index. |
References _WlzIVertex2::vtX, and _WlzIVertex2::vtY.
int WlzVertexHeapSortIdxFnI3 | ( | void * | data, |
int * | idx, | ||
int | id0, | ||
int | id1 | ||
) |
Function for AlgHeapSortIdx() to sort WlzIVertex3 vertices so that they have increasing Z then Y then X.
data | Vertex array. |
idx | Vertex index array. |
id0 | First index. |
id1 | Second index. |
References _WlzIVertex3::vtX, _WlzIVertex3::vtY, and _WlzIVertex3::vtZ.
int WlzVertexHeapSortIdxFnD2 | ( | void * | data, |
int * | idx, | ||
int | id0, | ||
int | id1 | ||
) |
Function for AlgHeapSortIdx() to sort WlzDVertex2 vertices so that they have increasing Z then Y then X.
data | Vertex array. |
idx | Vertex index array. |
id0 | First index. |
id1 | Second index. |
References _WlzDVertex2::vtX, and _WlzDVertex2::vtY.
int WlzVertexHeapSortIdxFnD3 | ( | void * | data, |
int * | idx, | ||
int | id0, | ||
int | id1 | ||
) |
Function for AlgHeapSortIdx() to sort WlzDVertex3 vertices so that they have increasing Z then Y then X.
data | Vertex array. |
idx | Vertex index array. |
id0 | First index. |
id1 | Second index. |
References _WlzDVertex3::vtX, _WlzDVertex3::vtY, and _WlzDVertex3::vtZ.
AlcKDTTree* WlzVerticesBuildTree | ( | WlzVertexType | vType, |
int | nV, | ||
WlzVertexP | vtx, | ||
int * | shfBuf, | ||
WlzErrorNum * | dstErr | ||
) |
Allocates and populates a k-D tree from the given vertices. The vertices are either WlzDVertex2 orWlzDVertex3.
vType | Type of vertices. |
nV | Number of vertices. |
vtx | The vertices. |
shfBuf | Workspace with at least nV ints used to shuffle vertices for randomized input to the K-D tree. |
dstErr | Destination error pointer, may be NULL. |
References ALC_ER_NONE, ALC_POINTTYPE_DBL, AlcKDTInsert(), AlcKDTTreeNew(), AlgShuffleIdx(), _WlzVertexP::d2, _WlzVertexP::d3, _AlcKDTNode::idx, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_TYPE, WLZ_VERTEX_D2, and WLZ_VERTEX_D3.
Referenced by WlzDistMetricDirVertex2D(), WlzDistMetricDirVertex3D(), and WlzMatchICPCtr().