Woolz Image Processing  Version 1.8.3
WlzArray

Files

file  WlzArray.c
 Functions for converting between domain objects and arrays.
 

Functions

WlzErrorNum WlzToBArray2D (WlzIVertex2 *dstSizeArrayDat, WlzUByte ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc bit array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToIArray2D (WlzIVertex2 *dstSizeArrayDat, int ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc int array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToSArray2D (WlzIVertex2 *dstSizeArrayDat, short ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc short array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToUArray2D (WlzIVertex2 *dstSizeArrayDat, WlzUByte ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc unsigned byte array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToFArray2D (WlzIVertex2 *dstSizeArrayDat, float ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts aAlc float array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToDArray2D (WlzIVertex2 *dstSizeArrayDat, double ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc double array from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToRArray2D (WlzIVertex2 *dstSizeArrayDat, unsigned int ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag)
 Extracts a Alc unsigned int array for RGBA values from any Woolz 2D domain object.
More...
 
WlzErrorNum WlzToArray2D (void ***dstP, WlzObject *srcObj, WlzIVertex2 size, WlzIVertex2 origin, int noiseFlag, WlzGreyType dstGreyType)
 Extracts an Alc array from any Woolz 2D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range. More...
 
WlzErrorNum WlzToBArray3D (WlzIVertex3 *dstSizeArrayDat, WlzUByte ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a bit Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToIArray3D (WlzIVertex3 *dstSizeArrayDat, int ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a int Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToSArray3D (WlzIVertex3 *dstSizeArrayDat, short ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a short Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToUArray3D (WlzIVertex3 *dstSizeArrayDat, WlzUByte ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a unsigned byte Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToFArray3D (WlzIVertex3 *dstSizeArrayDat, float ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a float Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToDArray3D (WlzIVertex3 *dstSizeArrayDat, double ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts a double Alc array from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToRArray3D (WlzIVertex3 *dstSizeArrayDat, unsigned int ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag)
 Extracts an unsigned int Alc array for RGBA values from any Woolz 3D domain object. More...
 
WlzErrorNum WlzToArray3D (void ****dstP, WlzObject *srcObj, WlzIVertex3 size, WlzIVertex3 origin, int noiseFlag, WlzGreyType dstGreyType)
 Extracts an Alc array from any Woolz 3D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range. More...
 
WlzObjectWlzFromBArray2D (WlzIVertex2 arraySizeDat, WlzUByte **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromIArray2D (WlzIVertex2 arraySizeDat, int **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromSArray2D (WlzIVertex2 arraySizeDat, short **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromUArray2D (WlzIVertex2 arraySizeDat, WlzUByte **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromFArray2D (WlzIVertex2 arraySizeDat, float **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromDArray2D (WlzIVertex2 arraySizeDat, double **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. More...
 
WlzObjectWlzFromArray2D (void **arrayP, WlzIVertex2 arraySize, WlzIVertex2 arrayOrigin, WlzGreyType dstGreyType, WlzGreyType srcGreyType, double valOffset, double valScale, int clampFlag, int noCopyFlag, WlzErrorNum *dstErr)
 Creates a Woolz 2D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same. More...
 
WlzObjectWlzFromBArray3D (WlzIVertex3 arraySizeDat, WlzUByte ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromIArray3D (WlzIVertex3 arraySizeDat, int ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromSArray3D (WlzIVertex3 arraySizeDat, short ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromUArray3D (WlzIVertex3 arraySizeDat, WlzUByte ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromFArray3D (WlzIVertex3 arraySizeDat, float ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromDArray3D (WlzIVertex3 arraySizeDat, double ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. More...
 
WlzObjectWlzFromArray3D (void ***arrayP, WlzIVertex3 arraySize, WlzIVertex3 arrayOrigin, WlzGreyType dstGreyType, WlzGreyType srcGreyType, double valOffset, double valScale, int clampFlag, int noCopyFlag, WlzErrorNum *dstErr)
 Creates a Woolz 3D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same. More...
 
int WlzArrayStats3D (void ***arrayP, WlzIVertex3 arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev)
 Calculates simple statistics for the given Alc array. More...
 
int WlzArrayStats2D (void **arrayP, WlzIVertex2 arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev)
 Calculates simple statistics for the given Alc array. More...
 
int WlzArrayStats1D (void *arrayP, int arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev)
 Calculates simple statistics for the given Alc array. More...
 
WlzObjectWlzFromBArray1D (WlzIVertex2 arraySizeDat, WlzUByte *bitData, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr)
 Converts a 1D bit array as generated by the Java interfaces to a 2D woolz object. More...
 
WlzObjectWlzFromArray1D (WlzObjectType oType, WlzIVertex3 sz, WlzIVertex3 org, WlzGreyType gType, unsigned int vpe, WlzGreyP gDat, int noCopy, WlzErrorNum *dstErr)
 Creates a new 2D or 3D domain object from the given 1D array. The object created is rectangular/cuboid with the given origin and size. The background value of the new object is set to zero. The returned object can be free'd using WlzFreeObj(), irespective of whether the noCopy flag is set, but if an object created with the noCopy flag set is free'd the data must be free'd independently after the returned object. The no copy option was originaly intended for efficient output of Woolz objects to a file in non-Woolz applications. More...
 
WlzErrorNum WlzToArray1D (WlzGreyP gP, WlzGreyType gType, WlzIBox3 gBufBox, int gOffset, WlzObject *obj)
 Sets values in the given buffer to those of the given object. The given buffer must be large enough to hold the given bounding box of image values. Only values within the domain of the object are set. More...
 

Detailed Description

Function Documentation

◆ WlzToBArray2D()

WlzErrorNum WlzToBArray2D ( WlzIVertex2 dstSizeArrayDat,
WlzUByte ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc bit array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, and WlzToArray2D().

◆ WlzToIArray2D()

WlzErrorNum WlzToIArray2D ( WlzIVertex2 dstSizeArrayDat,
int ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc int array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_INT, and WlzToArray2D().

◆ WlzToSArray2D()

WlzErrorNum WlzToSArray2D ( WlzIVertex2 dstSizeArrayDat,
short ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc short array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_SHORT, and WlzToArray2D().

◆ WlzToUArray2D()

WlzErrorNum WlzToUArray2D ( WlzIVertex2 dstSizeArrayDat,
WlzUByte ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc unsigned byte array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_UBYTE, and WlzToArray2D().

◆ WlzToFArray2D()

WlzErrorNum WlzToFArray2D ( WlzIVertex2 dstSizeArrayDat,
float ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts aAlc float array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_FLOAT, and WlzToArray2D().

◆ WlzToDArray2D()

WlzErrorNum WlzToDArray2D ( WlzIVertex2 dstSizeArrayDat,
double ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc double array from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_DOUBLE, and WlzToArray2D().

◆ WlzToRArray2D()

WlzErrorNum WlzToRArray2D ( WlzIVertex2 dstSizeArrayDat,
unsigned int ***  dstArrayDat,
WlzObject srcObj,
WlzIVertex2  origin,
WlzIVertex2  size,
int  noiseFlag 
)

Extracts a Alc unsigned int array for RGBA values from any Woolz 2D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_RGBA, and WlzToArray2D().

◆ WlzToArray2D()

WlzErrorNum WlzToArray2D ( void ***  dstP,
WlzObject srcObj,
WlzIVertex2  size,
WlzIVertex2  origin,
int  noiseFlag,
WlzGreyType  dstGreyType 
)

Extracts an Alc array from any Woolz 2D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range.

Returns
Woolz error code.
Parameters
dstPDestination pointer (assumed valid if *dstP is non-NULL).
srcObjGiven Woolz object.
sizeSize of array.
originArray origin wrt given object.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.
dstGreyTypeDestination array data type.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, and WLZ_GREY_BIT.

Referenced by WlzEffWriteObjAnl(), WlzMakeTiledValuesObj2D(), WlzToBArray2D(), WlzToDArray2D(), WlzToFArray2D(), WlzToIArray2D(), WlzToRArray2D(), WlzToSArray2D(), and WlzToUArray2D().

◆ WlzToBArray3D()

WlzErrorNum WlzToBArray3D ( WlzIVertex3 dstSizeArrayDat,
WlzUByte ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a bit Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc bit array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, and WlzToArray3D().

◆ WlzToIArray3D()

WlzErrorNum WlzToIArray3D ( WlzIVertex3 dstSizeArrayDat,
int ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a int Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc int array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_INT, and WlzToArray3D().

◆ WlzToSArray3D()

WlzErrorNum WlzToSArray3D ( WlzIVertex3 dstSizeArrayDat,
short ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a short Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc short array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_SHORT, and WlzToArray3D().

◆ WlzToUArray3D()

WlzErrorNum WlzToUArray3D ( WlzIVertex3 dstSizeArrayDat,
WlzUByte ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a unsigned byte Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc unsigned byte array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_UBYTE, and WlzToArray3D().

◆ WlzToFArray3D()

WlzErrorNum WlzToFArray3D ( WlzIVertex3 dstSizeArrayDat,
float ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a float Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc float array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_FLOAT, and WlzToArray3D().

◆ WlzToDArray3D()

WlzErrorNum WlzToDArray3D ( WlzIVertex3 dstSizeArrayDat,
double ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts a double Alc array from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc double array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_DOUBLE, and WlzToArray3D().

◆ WlzToRArray3D()

WlzErrorNum WlzToRArray3D ( WlzIVertex3 dstSizeArrayDat,
unsigned int ****  dstArrayDat,
WlzObject srcObj,
WlzIVertex3  origin,
WlzIVertex3  size,
int  noiseFlag 
)

Extracts an unsigned int Alc array for RGBA values from any Woolz 3D domain object.

Returns
Woolz error code.
Parameters
dstSizeArrayDatDestination pointer for array size, may be NULL.
dstArrayDatDestination pointer for Alc double array.
srcObjGiven Woolz object.
originArray origin wrt given object.
sizeRequired region size.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.

References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_RGBA, and WlzToArray3D().

◆ WlzToArray3D()

WlzErrorNum WlzToArray3D ( void ****  dstP,
WlzObject srcObj,
WlzIVertex3  size,
WlzIVertex3  origin,
int  noiseFlag,
WlzGreyType  dstGreyType 
)

Extracts an Alc array from any Woolz 3D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range.

Returns
Woolz error code.
Parameters
dstPDestination pointer (assumed valid if *dstP is non-NULL).
srcObjGiven Woolz object.
sizeSize of the array.
originArray origin wrt given object.
noiseFlagFill background with random noise with the same mean and std. dev. as the given object if non-zero.
dstGreyTypeDestination array data type.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, and WLZ_GREY_BIT.

Referenced by WlzEffWriteObjAnl(), WlzEffWriteObjDen(), WlzEffWriteObjIcs(), WlzEffWriteObjIPL(), WlzEffWriteObjPic(), WlzEffWriteObjSlc(), WlzEffWriteObjVff(), WlzMakeTiledValuesObj3D(), WlzToBArray3D(), WlzToDArray3D(), WlzToFArray3D(), WlzToIArray3D(), WlzToRArray3D(), WlzToSArray3D(), and WlzToUArray3D().

◆ WlzFromBArray2D()

WlzObject* WlzFromBArray2D ( WlzIVertex2  arraySizeDat,
WlzUByte **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_BIT, and WlzFromArray2D().

Referenced by WlzFromBArray1D().

◆ WlzFromIArray2D()

WlzObject* WlzFromIArray2D ( WlzIVertex2  arraySizeDat,
int **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_INT, and WlzFromArray2D().

◆ WlzFromSArray2D()

WlzObject* WlzFromSArray2D ( WlzIVertex2  arraySizeDat,
short **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_SHORT, and WlzFromArray2D().

◆ WlzFromUArray2D()

WlzObject* WlzFromUArray2D ( WlzIVertex2  arraySizeDat,
WlzUByte **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_UBYTE, and WlzFromArray2D().

◆ WlzFromFArray2D()

WlzObject* WlzFromFArray2D ( WlzIVertex2  arraySizeDat,
float **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_FLOAT, and WlzFromArray2D().

◆ WlzFromDArray2D()

WlzObject* WlzFromDArray2D ( WlzIVertex2  arraySizeDat,
double **  arrayDat,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_DOUBLE, and WlzFromArray2D().

◆ WlzFromArray2D()

WlzObject* WlzFromArray2D ( void **  arrayP,
WlzIVertex2  arraySize,
WlzIVertex2  arrayOrigin,
WlzGreyType  dstGreyType,
WlzGreyType  srcGreyType,
double  valOffset,
double  valScale,
int  clampFlag,
int  noCopyFlag,
WlzErrorNum dstErr 
)

Creates a Woolz 2D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same.

Returns
New Woolz object.
Parameters
arrayPGiven Alc array.
arraySizeDimensions of the array.
arrayOriginArray origin wrt given object.
dstGreyTypeDestination object grey type.
srcGreyTypeArray data type.
valOffsetOffset added to each value.
valScaleScale factor by which each value is multiplied before adding the offset.
clampFlagValues are clamped to the destination type range if the clamp flag is non-zero.
noCopyFlagUse the array data for the Woolz object values in-place. Take care when using this option!
dstErrstination pointer for error number, may be NULL.

References _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, and WLZ_GREY_BIT.

Referenced by WlzFromBArray2D(), WlzFromDArray2D(), WlzFromFArray2D(), WlzFromIArray2D(), WlzFromSArray2D(), and WlzFromUArray2D().

◆ WlzFromBArray3D()

WlzObject* WlzFromBArray3D ( WlzIVertex3  arraySizeDat,
WlzUByte ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_BIT, and WlzFromArray3D().

◆ WlzFromIArray3D()

WlzObject* WlzFromIArray3D ( WlzIVertex3  arraySizeDat,
int ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_INT, and WlzFromArray3D().

◆ WlzFromSArray3D()

WlzObject* WlzFromSArray3D ( WlzIVertex3  arraySizeDat,
short ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_SHORT, and WlzFromArray3D().

◆ WlzFromUArray3D()

WlzObject* WlzFromUArray3D ( WlzIVertex3  arraySizeDat,
WlzUByte ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_UBYTE, and WlzFromArray3D().

◆ WlzFromFArray3D()

WlzObject* WlzFromFArray3D ( WlzIVertex3  arraySizeDat,
float ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_FLOAT, and WlzFromArray3D().

◆ WlzFromDArray3D()

WlzObject* WlzFromDArray3D ( WlzIVertex3  arraySizeDat,
double ***  arrayDat,
WlzIVertex3  arrayOrigin,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array.

Returns
New Woolz object.
Parameters
arraySizeDatDimensions of the array.
arrayDatGiven Alc array.
arrayOriginArray origin wrt given object.
dstErrDestination pointer for error number, may be NULL.

References WLZ_GREY_DOUBLE, and WlzFromArray3D().

◆ WlzFromArray3D()

WlzObject* WlzFromArray3D ( void ***  arrayP,
WlzIVertex3  arraySize,
WlzIVertex3  arrayOrigin,
WlzGreyType  dstGreyType,
WlzGreyType  srcGreyType,
double  valOffset,
double  valScale,
int  clampFlag,
int  noCopyFlag,
WlzErrorNum dstErr 
)

Creates a Woolz 3D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same.

Returns
New Woolz object.
Parameters
arrayPGiven Alc array.
arraySizeDimensions of the array.
arrayOriginArray origin wrt given object.
dstGreyTypeDestination object grey type.
srcGreyTypeArray data type.
valOffsetOffset added to each value.
valScaleScale factor by which each value is multiplied before adding the offset.
clampFlagValues are clamped to the destination type range if the clamp flag is non-zero.
noCopyFlagUse the array data for the Woolz object values in-place.
dstErrDestination pointer for error number, may be NULL.

References _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, and WLZ_GREY_BIT.

Referenced by WlzEffReadObjDen(), WlzEffReadObjIcs(), WlzEffReadObjPic(), WlzFromBArray3D(), WlzFromDArray3D(), WlzFromFArray3D(), WlzFromIArray3D(), WlzFromSArray3D(), WlzFromUArray3D(), and WlzRegICPVerticesWSD2D().

◆ WlzArrayStats3D()

int WlzArrayStats3D ( void ***  arrayP,
WlzIVertex3  arraySize,
WlzGreyType  greyType,
double *  dstMin,
double *  dstMax,
double *  dstSum,
double *  dstSumSq,
double *  dstMean,
double *  dstStdDev 
)

Calculates simple statistics for the given Alc array.

Returns
Number of data in array.
Parameters
arrayPGiven 3D Alc array.
arraySizeDimensions of the array.
greyTypeArray data type.
dstMinDestination ptr for minimum value, may be NULL.
dstMaxDestination ptr for maximum value, may be NULL.
dstSumDestination ptr for sum of values, may be NULL.
dstSumSqDestination ptr for sum of squares of values, may be NULL.
dstMeanDestination ptr for mean of values, may be NULL.
dstStdDevDestination ptr for standard deviation of values, may be NULL.

References _WlzGreyP::dbp, _WlzGreyP::flp, _WlzGreyP::inp, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzGreyP::ubp, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, and WLZ_GREY_UBYTE.

Referenced by WlzArrayStats2D().

◆ WlzArrayStats2D()

int WlzArrayStats2D ( void **  arrayP,
WlzIVertex2  arraySize,
WlzGreyType  greyType,
double *  dstMin,
double *  dstMax,
double *  dstSum,
double *  dstSumSq,
double *  dstMean,
double *  dstStdDev 
)

Calculates simple statistics for the given Alc array.

Returns
Number of data in array.
Parameters
arrayPGiven 2D Alc array.
arraySizeDimensions of the array.
greyTypeArray data type.
dstMinDestination ptr for minimum value, may be NULL.
dstMaxDestination ptr for maximum value, may be NULL.
dstSumDestination ptr for sum of values, may be NULL.
dstSumSqDestination ptr for sum of squares of values, may be NULL.
dstMeanDestination ptr for mean of values, may be NULL.
dstStdDevDestination ptr for standard deviation of values, may be NULL.

References _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, and WlzArrayStats3D().

Referenced by WlzArrayStats1D().

◆ WlzArrayStats1D()

int WlzArrayStats1D ( void *  arrayP,
int  arraySize,
WlzGreyType  greyType,
double *  dstMin,
double *  dstMax,
double *  dstSum,
double *  dstSumSq,
double *  dstMean,
double *  dstStdDev 
)

Calculates simple statistics for the given Alc array.

Returns
Number of data in array.
Parameters
arrayPGiven 1D Alc array.
arraySizeDimension of the array.
greyTypeArray data type.
dstMinDestination ptr for minimum value, may be NULL.
dstMaxDestination ptr for maximum value, may be NULL.
dstSumDestination ptr for sum of values, may be NULL.
dstSumSqDestination ptr for sum of squares of values, may be NULL.
dstMeanDestination ptr for mean of values, may be NULL.
dstStdDevDestination ptr for standard deviation of values, may be NULL.

References _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, and WlzArrayStats2D().

◆ WlzFromBArray1D()

WlzObject* WlzFromBArray1D ( WlzIVertex2  arraySizeDat,
WlzUByte bitData,
WlzIVertex2  arrayOrigin,
WlzErrorNum dstErr 
)

Converts a 1D bit array as generated by the Java interfaces to a 2D woolz object.

Returns
New Woolz object or NULL on error.
Parameters
arraySizeDatVertex giving the width and height of the corresponding domain.
bitDataThe bit data with the bits set contiguously.
arrayOriginThe origin of the Woolz object.
dstErrDestination pointer for error code, may be NULL.

References AlcBit2Calloc(), AlcBit2Free(), _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, and WlzFromBArray2D().

Referenced by Wlz3DViewTransformBitmap().

◆ WlzFromArray1D()

WlzObject* WlzFromArray1D ( WlzObjectType  oType,
WlzIVertex3  sz,
WlzIVertex3  org,
WlzGreyType  gType,
unsigned int  vpe,
WlzGreyP  gDat,
int  noCopy,
WlzErrorNum dstErr 
)

Creates a new 2D or 3D domain object from the given 1D array. The object created is rectangular/cuboid with the given origin and size. The background value of the new object is set to zero. The returned object can be free'd using WlzFreeObj(), irespective of whether the noCopy flag is set, but if an object created with the noCopy flag set is free'd the data must be free'd independently after the returned object. The no copy option was originaly intended for efficient output of Woolz objects to a file in non-Woolz applications.

Returns
New object.
Parameters
oTypeRequired object type, must be WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ.
szSize of the required object, ie the number of columns, lines and planes. The number of planes is ignored for WLZ_2D_DOMAINOBJ objects.
orgThe origin of the object. The plane origin is ignored for WLZ_2D_DOMAINOBJ objects.
gTypeThe grey type of the given data and the resulting object.
vpeValues per pixel/voxel, 1 for scalar values.
gDatThe 1D array of data.
noCopyIf non-zero then the data are not copied but are used in place. Use with caution. This is never done with non-scalar data.
dstErrDestination error pointer, may be NULL.

References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzGreyV::inv, _WlzDomain::p, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzValues::t, _WlzPixelV::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzTiledValues::vDim, _WlzValues::vox, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RECT, WLZ_GREY_TAB_TILED, WLZ_GREY_UBYTE, WLZ_TILEDVALUES_TILE_SIZE, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeValues(), WlzFreeVoxelValueTb(), WlzGreyValueTableType(), WlzMakeCuboid(), WlzMakeMain(), WlzMakeRect(), WlzMakeRectValueTb(), WlzMakeTiledValuesFromObj(), WlzMakeTiledValuesTiles(), WlzMakeVoxelValueTb(), and WlzTiledValuesCopyLine().

◆ WlzToArray1D()

WlzErrorNum WlzToArray1D ( WlzGreyP  gP,
WlzGreyType  gType,
WlzIBox3  gBufBox,
int  gOffset,
WlzObject obj 
)

Sets values in the given buffer to those of the given object. The given buffer must be large enough to hold the given bounding box of image values. Only values within the domain of the object are set.

Returns
Woolz error code.
Parameters
gPGrey pointer to allocated buffer.
gTypeGrey type of the buffer.
gBufBoxBuffer bounding box. The z component is ignored if the object is a 2D object.
gOffsetOffset into the buffer.
objGiven object.

References _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WlzEndGreyScan(), WlzFreeObj(), WlzInitGreyScan(), WlzMakeMain(), WlzNextGreyInterval(), WlzValueCopyGreyToGrey(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.