Woolz Image Processing  Version 1.8.3
WlzConvexHullClarkson.c File Reference

Functions to compute convex hulls using the Clarkson's algorithm. More...

Macros

#define WLZ_CONVHULL_CLARKSON_SM_2D   (16)
 Used to avoid dynamic allocation for small vertex arrays. The stack will be used for internal workspace arrays smaller than this. More...
 

Functions

WlzConvHullDomain2WlzConvexHullFromVtx2 (WlzVertexType pType, int nPnt, WlzVertexP pnt, WlzErrorNum *dstErr)
 Creates a new 2D convex hull domain which encloses the given vertices using Clarkson's algorithm, see WlzConvHullClarkson2I() and WlzConvHullClarkson2D(). In degenerate cases (less than 3 vertices or all vertices on a single line) a convex hull domain will still be computed but the returned error code will be WLZ_ERR_DEGENERATE. More...
 
int WlzConvHullClarkson2I (WlzIVertex2 *vtx, int n, int **dstIdx, WlzErrorNum *dstErr)
 Computes the convex hull of a given array of 2D integer vertices which is returned as an array of indices into the array of vertices. This index array should be freed using AlcFree(). The vertex array is not changed. More...
 
int WlzConvHullClarkson2D (WlzDVertex2 *vtx, int n, int **dstIdx, WlzErrorNum *dstErr)
 Computes the convex hull of a given array of 2D double vertices which is returned as an array of indices into the array of vertices. This index array should be freed using AlcFree(). The vertex array is not changed. More...
 

Detailed Description

Functions to compute convex hulls using the Clarkson's algorithm.

Author
Bill Hill
Date
July 2011
Version
Id
ca2d80bf4416436749ebceb0f1ea987dab00f0f5
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Macro Definition Documentation

◆ WLZ_CONVHULL_CLARKSON_SM_2D

#define WLZ_CONVHULL_CLARKSON_SM_2D   (16)

Used to avoid dynamic allocation for small vertex arrays. The stack will be used for internal workspace arrays smaller than this.

Referenced by WlzConvHullClarkson2D(), and WlzConvHullClarkson2I().