Woolz Image Processing Version 1.4.0
WlzValuesUtils

Files

file  WlzBackground.c
 

Functions to get and set the background value of objects.


file  WlzConvertPix.c
 

Conversion of values.


file  WlzCutObjToBox.c
 

Functions for creating new domain objects with rectangular value tables.


file  WlzGreyDitherObj.c
 

Makes a dithered object from the given grey-level object.


file  WlzGreyInvertMinMax.c
 

Grey value inversion.


file  WlzGreyMask.c
 

Functions to set the value within the domain of a object.


file  WlzGreyModGradient.c
 

Functions to calculate the modulus of the grey-level gradient of Woolz objects.


file  WlzGreyScan.c
 

Object grey value scanning functions.


file  WlzGreySetHilbert.c
 

Functions for creating objects with integral grey values that are related to their Hilbert indices.


file  WlzGreySetIncValues.c
 

Functions for creating objects with integer grey values that increment.


file  WlzGreySetValue.c
 

Sets the grey values of objects.


file  WlzGreyTemplate.c
 

Attach a grey table to a template object.


file  WlzGreyTransfer.c
 

Transfers grey values from a source to a destination object. The source object grey values are set in the intersection domain between source and destination. Destination domain and the destination values outside of the intersection are unchanged.


file  WlzKrig.c
 

Functions for interpolation based on kriging.


file  WlzRGBAConvert.c
 

Conversion routines for RGBA data including conversion to modulus.


file  WlzRGBAModGradient.c
 

Calculates the modulus of the gradient of a RGBA object. The gradient is defined as the modulus of the "modulus" vector, i.e. the modulus for each colour.


file  WlzRGBAPixelUtils.c
 

Utility functions for pixel and RGBA values.


file  WlzRGBARange.c
 

Finds the range of values in a RGBA type image.


file  WlzValueTableUtils.c
 

Functions for computing value amd value table types.


file  WlzValueUtils.c
 

Many small functions for setting, copying and converting values.


Functions

WlzErrorNum WlzSetBackground (WlzObject *obj, WlzPixelV bgd)
 Sets the backgound value of an image object.
WlzPixelV WlzGetBackground (WlzObject *obj, WlzErrorNum *dstErr)
 Gets the background value of the given object.
WlzObjectWlzConvertPix (WlzObject *obj, WlzGreyType newpixtype, WlzErrorNum *dstErr)
 Converts the pixel type of the image object, creating a new object with the same domain as the given object.
WlzPolygonDomainWlzConvertPolyType (WlzPolygonDomain *pdom, WlzObjectType type, WlzErrorNum *dstErr)
 Converts a polygon domain type.
WlzBoundListWlzConvertBoundType (WlzBoundList *bound, WlzObjectType type, WlzErrorNum *dstErr)
 Converts a boundary list to the required type.
WlzObjectWlzConvertVtx (WlzObject *obj, WlzVertexType newVtxType, WlzErrorNum *dstErr)
 Converts the vertices of an object to the required type.
WlzObjectWlzCutObjToBox2D (WlzObject *sObj, WlzIBox2 cutBox, WlzGreyType dGreyType, int bgNoise, double bgMu, double bgSigma, WlzErrorNum *dstErrNum)
 Cuts a new object with a rectangular value table from the given woolz object.
WlzObjectWlzCutObjToValBox2D (WlzObject *sObj, WlzIBox2 cutBox, WlzGreyType dGreyType, void *gValP, int bgNoise, double bgMu, double bgSigma, WlzErrorNum *dstErrNum)
 Cuts a new object with a rectangular value table from the given woolz object and allows access to grey table. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.
WlzObjectWlzCutObjToBox3D (WlzObject *sObj, WlzIBox3 cutBox, WlzGreyType dGreyType, int bgNoise, double bgMu, double bgSigma, WlzErrorNum *dstErrNum)
 Cuts a new object with (a) rectangular value table(s) from the given woolz object. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.
WlzObjectWlzCutObjToValBox3D (WlzObject *sObj, WlzIBox3 cutBox, WlzGreyType dGreyType, void *gValP, int bgNoise, double bgMu, double bgSigma, WlzErrorNum *dstErrNum)
 Cuts a new object with (a) rectangular value table(s) from the given woolz object. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.
WlzObjectWlzGreyDitherObj (WlzObject *o, unsigned int destBits, WlzErrorNum *dstErr)
 Makes a dithered object from the given grey-level Woolz object. The destination bits are determined by the number of shades in the dithered image (usually 1 bit) and the bit planes to use (typically to match the bit-planes of a display mask).
WlzErrorNum WlzGreyInvertMinMax (WlzObject *obj, WlzPixelV min, WlzPixelV max)
 Invert the Grey values of an object within a given range. The supplied min and max values define the grey transformation by:

\[ g' = g_{max} + g_{min} - g \]

which means that g=gmax gives g'=gmin and g=gmin gives g'=gmax. This is a generalisation of the original invert and allows for the "normal" inversion of 255-g for byte images. The user must ensure the grey-value type of the given object can hold the result e.g. if the result is negative. Note it is assumed that min and max have a grey type which can be converted to the grey-type of the given image.

WlzObjectWlzGreyMask (WlzObject *obj, WlzObject *mask, WlzPixelV maskVal, WlzErrorNum *dstErr)
 Set the value maskVal within the domain given by the mask object. The mask object can be a 2D, 3D, polygon or boundary object. A 3D mask with a 2D object is an error. A 2D mask with a 3D object will be applied to each plane in turn.
WlzObjectWlzGreyModGradient (WlzObject *obj, double width, WlzErrorNum *dstErr)
 Calculate the modulus of the grey-level gradient at each point. The gradient images are calculated using WlzGauss2() with width parameter set to width. Will now calculate the modulus for each object of a compound object if appropriate.
WlzErrorNum WlzInitGreyScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp)
 Initialise interval and grey scanning of standard object in standard direction.
WlzErrorNum WlzInitGreyRasterScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp, WlzRasterDir raster, int tranpl)
 As WlzInitGreyScan(), but with choice of raster direction and transplanting.
WlzErrorNum WlzInitGreyWSpace (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp, int tranpl)
 attach grey workspace to interval scanning workspace
WlzErrorNum WlzNextGreyInterval (WlzIntervalWSpace *iwsp)
 Obtain next interval and its grey table.
WlzErrorNum WlzGreyInterval (WlzIntervalWSpace *iwsp)
 Handle grey table for an interval. This must follow a call to "nextinterval".
WlzObjectWlzGreyNewHilbertRankValues (WlzObject *in, WlzErrorNum *dstErr)
 Creates a new domain object with integer values that increment throughout the object in Hilbert rank order. The input object's domain is used in the output object. Output object values start from 1.
WlzErrorNum WlzGreySetHilbertRankValues (WlzObject *obj, unsigned int *rVal)
 Sets the values of domain object with int values so that they increment throughout the object in Hilbert rank order.
WlzObjectWlzGreyNewIncValues (WlzObject *in, WlzErrorNum *dstErr)
 Creates a new domain object with integer values that increment throughout the object in scan order. Object values start from 1.
WlzErrorNum WlzGreySetIncValues (WlzObject *obj, int *gVal)
 Sets the values of a 2 or 3D domain object with int values so that they increment throughout the object in scan order. Object values are set by incrementing the given value in place. The given object must have WLZ_GREY_INT values.
WlzErrorNum WlzGreySetValue (WlzObject *obj, WlzPixelV val)
 Set the grey value of every pixel/voxel tp val.
WlzObjectWlzGreyTemplate (WlzObject *obj, WlzObject *tmpl, WlzPixelV tmplVal, WlzErrorNum *dstErr)
WlzObjectWlzGreyTransfer (WlzObject *obj, WlzObject *srcObj, WlzErrorNum *dstErr)
 Transfer grey values from the source object to the destination object. Currently it is assumed that the objects are of the same type (2D/3D) and have the same grey-value type.
void WlzGreyValueGetDir (WlzGreyValueWSpace *gVWSp, int plane, int line, int kol)
 Gets a single grey value/pointer for the given point from the 3D values and domain in the work space.
void WlzKrigSetModelFn (WlzKrigModelFn *fn, WlzKrigModelFnType type, double c0, double c1, double a)
 Sets a kriging function data stuctures parameters and function pointer. See the kriging model function types and their implementation for the meaning of the parameters.
WlzCompoundArrayWlzRGBAToCompound (WlzObject *obj, WlzRGBAColorSpace colSpc, WlzErrorNum *dstErr)
 Convert a RGBA image to a compound object. The RGBA channels are at array indices 0,1,2,3 respectively and the sub-object grey types will be WLZ_GREY_UBYTE.
WlzObjectWlzCompoundToRGBA (WlzCompoundArray *cmpnd, WlzRGBAColorSpace colSpc, WlzErrorNum *dstErr)
 Creates a WLZ_GREY_RGBA valued object from the given compound array. This is a static function which will always be called with valid parameters so they aren't checked. If all members of the compound array are empty then the returned object will be empty too.
WlzObjectWlzRGBAToModulus (WlzObject *obj, WlzErrorNum *dstErr)
 Calculate the modulus of the rgb values and return in an image of grey type WLZ_GREY_SHORT.
WlzObjectWlzIndexToRGBA (WlzObject *obj, unsigned char colormap[3][256], WlzErrorNum *dstErr)
 Convert a grey-level woolz object to RGBA via a colourmap look-up table. Values are clamped to [0,255] and the LUT is assumed to be unsigned byte 3x256.
WlzObjectWlzRGBAModGradient (WlzObject *obj, double width, WlzErrorNum *dstErr)
 Calculate the modulus of the rgb-level gradient at each point. The gradient images are calculated using WlzGauss2() with width parameter set to width. Note the modulus returned is the modulus of vector formed by the independent channels, i.e. take the modulus for each channel seperately then the modulus of the resultant vector.
double WlzRGBAPixelValue (WlzPixelV pixVal, WlzRGBAColorChannel chan, WlzErrorNum *dstErr)
 Calculate the pixel value for a given channel. For grey-pixel types the colour channel values are set equal to the grey value i.e. the pixel is assumed to be (g,g,g). If the grey-channel is requested of a colour pixel the modulus is returned. For colour pixels the error return value is -1, for grey pixels the error return should be tested since all values are valid (except grey-type WlzUByte). Hue and saturation are zero for grey-pixel types.
WlzErrorNum WlzRGBAModulusRange (WlzObject *obj, double *min, double *max)
 Computes the range of values in a RGBA type image. Currently implemented is modulus range. Use WlzGreyRange to get the individual colour ranges.
WlzObjectType WlzGreyTableType (WlzObjectType tableType, WlzGreyType greyType, WlzErrorNum *dstErr)
 Computes a grey table type from table and grey types.
WlzGreyType WlzGreyTableTypeToGreyType (WlzObjectType gTabType, WlzErrorNum *dstErr)
 Computes the type of grey from a grey table type.
WlzObjectType WlzGreyTableTypeToTableType (WlzObjectType gTabType, WlzErrorNum *dstErr)
 Computes the type of table from a grey table type.
WlzObjectType WlzGreyTableIsTiled (WlzObjectType gTabType)
 Determines whether the grey table type is tiled.
WlzGreyType WlzGreyTypeFromObj (WlzObject *obj, WlzErrorNum *dstErr)
 Gets the grey type of the values in a Woolz object. If the object is not a domain object with values an error is returned. If the object is a 3D domain object with values, all 2D value tables are checked and an error is returned if they don't all have the same grey type.
WlzDVertex3 WlzVozelSz (WlzObject *obj, WlzErrorNum *dstErr)
 Gets the given 3D domain objects voxel size.
void * WlzIndexedValueGet (WlzIndexedValues *ixv, int idx)
 Gets a pointer to the valuetable entry for the given index. If the indexed values are not valid for the given index NULL will be returned. See also WlzIndexedValueExtGet().
void * WlzIndexedValueExtGet (WlzIndexedValues *ixv, int idx)
 Gets a pointer to the valuetable entry for the given index. The value table is extended as required so that there should always be a valid entry unless memory allocation fails. See also WlzIndexedValueGet().
WlzErrorNum WlzIndexedValuesSet (WlzObject *obj, size_t cnt, void *val)
 Sets all values covered by the domain in the given object to the given value. Ths function calls memcpy() for each indexed value using the given value count and pointer.
void WlzValueSetInt (int *vec, int value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is int.
void WlzValueSetShort (short *vec, short value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is short.
void WlzValueSetUByte (WlzUByte *vec, WlzUByte value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is WlzUByte.
void WlzValueSetFloat (float *vec, float value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is float.
void WlzValueSetDouble (double *vec, double value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is double.
void WlzValueSetRGBA (WlzUInt *vec, WlzUInt value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is rgb-alpha.
void WlzValueSetDVertex (WlzDVertex2 *vec, WlzDVertex2 value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is WlzDVertex2.
void WlzValueSetFVertex (WlzFVertex2 *vec, WlzFVertex2 value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is WlzFVertex2.
void WlzValueSetIVertex (WlzIVertex2 *vec, WlzIVertex2 value, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is WlzIVertex2.
void WlzValueSetGrey (WlzGreyP vec, size_t vecOff, WlzGreyV value, WlzGreyType gType, size_t count)
 Sets the elements of the given vector to a given value, where the vector type is any one of int, short, WlzUByte, float, double.
void WlzValueClampIntToShort (int *vec, size_t count)
 Clamps a vector of int values to the limits of short.
void WlzValueClampIntToUByte (int *vec, size_t count)
 Clamps a vector of int values to the limits of WlzUByte.
void WlzValueClampShortToUByte (short *vec, size_t count)
 Clamps a vector of short values to the limits of WlzUByte.
void WlzValueClampDoubleToInt (double *vec, size_t count)
 Clamps a vector of double values to the limits of int.
void WlzValueClampDoubleToShort (double *vec, size_t count)
 Clamps a vector of double values to the limits of short.
void WlzValueClampDoubleToUByte (double *vec, size_t count)
 Clamps a vector of double values to the limits of WlzUByte.
void WlzValueClampDoubleToRGBA (double *vec, size_t count)
 Clamps a vector of double values to the limits of RGBA.
void WlzValueClampDoubleToFloat (double *vec, size_t count)
 Clamps a vector of double values to the limits of float.
void WlzValueClampFloatToInt (float *vec, size_t count)
 Clamps a vector of float values to the limits of int.
void WlzValueClampFloatToShort (float *vec, size_t count)
 Clamps a vector of float values to the limits of short.
void WlzValueClampFloatToUByte (float *vec, size_t count)
 Clamps a vector of float values to the limits of WlzUByte.
void WlzValueClampIntIntoShort (short *dst, int *src, size_t count)
 Clamps a vector of int values into a vector of short values.
void WlzValueClampIntIntoUByte (WlzUByte *dst, int *src, size_t count)
 Clamps a vector of nt values into a vector of WlzUByte values.
void WlzValueClampShortIntoUByte (WlzUByte *dst, short *src, size_t count)
 Clamps a vector of short values into a vector of WlzUByte values.
void WlzValueClampFloatIntoInt (int *dst, float *src, size_t count)
 Clamps a vector of float values into a vector of int values.
void WlzValueClampFloatIntoShort (short *dst, float *src, size_t count)
 Clamps a vector of float values into a vector of short values.
void WlzValueClampFloatIntoUByte (WlzUByte *dst, float *src, size_t count)
 Clamps a vector of float values into a vector of WlzUByte values.
void WlzValueClampDoubleIntoInt (int *dst, double *src, size_t count)
 Clamps a vector of into double values into a vector of int values.
void WlzValueClampDoubleIntoShort (short *dst, double *src, size_t count)
 Clamps a vector of double values into a vector of short values.
void WlzValueClampDoubleIntoUByte (WlzUByte *dst, double *src, size_t count)
 Clamps a vector of double values into a vector of WlzUByte values.
void WlzValueClampDoubleIntoFloat (float *dst, double *src, size_t count)
 Clamps a vector of double values into a vector of float values.
void WlzValueClampIntIntoRGBA (WlzUInt *dst, int *src, size_t count)
 Clamps a vector of int values into a vector of RGBA values.
void WlzValueClampShortIntoRGBA (WlzUInt *dst, short *src, size_t count)
 Clamps a vector of short values into a vector of RGBA values.
void WlzValueClampFloatIntoRGBA (WlzUInt *dst, float *src, size_t count)
 Clamps a vector of float values into a vector of RGBA values.
void WlzValueClampDoubleIntoRGBA (WlzUInt *dst, double *src, size_t count)
 Clamps a vector of double values into a vector of RGBA values.

Function Documentation

WlzPixelV WlzGetBackground ( WlzObject obj,
WlzErrorNum dstErr 
)

Gets the background value of the given object.

Returns:
The background value. If the returned pixel value type is WLZ_GREY_ERROR then an error has occurred.
Parameters:
objGiven object.
dstErrDestination error pointer, may be NULL.

References _WlzVoxelValues::bckgrnd, _WlzTiledValues::bckgrnd, _WlzIntervalValues::bckgrnd, _WlzRectValues::bckgrnd, _WlzRagRValues::bckgrnd, _WlzValues::core, _WlzObject::domain, _WlzValues::i, _WlzDomain::i, _WlzGreyV::inv, _WlzValues::obj, _WlzDomain::p, _WlzValues::r, _WlzValues::t, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzObject::type, _WlzPixelV::type, _WlzValues::v, _WlzPixelV::v, _WlzObject::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_ERR_VALUES_TYPE, WLZ_GREY_ERROR, WLZ_GREY_INT, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzGreyTableIsTiled(), and WlzGreyTableTypeToTableType().

Referenced by Wlz3DViewTransformObj(), WlzBuildObj3(), WlzClipObjToBox3D(), WlzCMeshTransformObj(), WlzConstruct3DObjFromFile(), WlzConstruct3DObjFromObj(), WlzConvertPix(), WlzConvolveObj(), WlzCutObjToValBox3D(), WlzEffReadObjTiff(), WlzEffWriteObjStack(), WlzEffWriteObjTiff(), WlzFillBlankPlanes(), WlzGreyCrossing(), WlzGreyTemplate(), WlzGreyVariance(), WlzIndexToRGBA(), WlzIntersectN(), WlzLUTTransformObj(), WlzMeshTransformObj_3D(), WlzNewGrey(), WlzPolarSample(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzSampleObjPoint2D(), WlzSampleObjPoint3D(), WlzScalarBinaryOp2(), WlzSepTrans(), WlzTransposeObj(), and WlzUnionN().

WlzObject* WlzConvertPix ( WlzObject obj,
WlzGreyType  newpixtype,
WlzErrorNum dstErr 
)
WlzBoundList* WlzConvertBoundType ( WlzBoundList bound,
WlzObjectType  type,
WlzErrorNum dstErr 
)

Converts a boundary list to the required type.

Returns:
New boundary list or NULL on error.
Parameters:
boundGiven boundary list.
typeRequired boundary list type.
dstErrDestination pointer for error, may be NULL.

References _WlzBoundList::down, _WlzBoundList::next, _WlzBoundList::poly, _WlzBoundList::type, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WlzAssignBoundList(), WlzAssignPolygonDomain(), WlzConvertPolyType(), WlzFreeBoundList(), WlzMakeBoundList(), and _WlzBoundList::wrap.

Referenced by WlzConvertVtx().

WlzObject* WlzConvertVtx ( WlzObject obj,
WlzVertexType  newVtxType,
WlzErrorNum dstErr 
)
WlzObject* WlzCutObjToBox2D ( WlzObject sObj,
WlzIBox2  cutBox,
WlzGreyType  dGreyType,
int  bgNoise,
double  bgMu,
double  bgSigma,
WlzErrorNum dstErrNum 
)

Cuts a new object with a rectangular value table from the given woolz object.

Returns:
New object with rectangular value table or NULL on error.
Parameters:
sObjGiven source object.
cutBoxRectangle box to cut from the object.
dGreyTypeRequired grey type for the value table.
bgNoiseIf zero background value is used otherwise if non zero the background is set using gaussian noise.
bgMuMean of background noise.
bgSigmaStandard deviation of the background noise.
dstErrNumDestination pointer for error number, may be NULL if not required.

References WlzCutObjToValBox2D().

Referenced by WlzEffWriteObjJpeg(), WlzEffWriteObjTxt(), and WlzWindow().

WlzObject* WlzCutObjToValBox2D ( WlzObject sObj,
WlzIBox2  cutBox,
WlzGreyType  dGreyType,
void *  gValP,
int  bgNoise,
double  bgMu,
double  bgSigma,
WlzErrorNum dstErrNum 
)

Cuts a new object with a rectangular value table from the given woolz object and allows access to grey table. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.

Returns:
New object with rectangular value table or NULL on error.
Parameters:
sObjGiven source object.
cutBoxRectangle box to cut from the object.
dGreyTypeRequired grey type for the value table.
gValPIf non-NULL allocated space for grey values.
bgNoiseIf zero background value is used otherwise if non zero the background is set using gaussian noise.
bgMuMean of background noise.
bgSigmaStandard deviation of the background noise.
dstErrNumDestination pointer for error number, may be NULL if not required.

References _WlzPixelV::type, and WLZ_GREY_ERROR.

Referenced by WlzCutObjToBox2D(), WlzCutObjToValBox3D(), WlzEffWriteObjBmp2D(), and WlzEffWriteObjPnm2D().

WlzObject* WlzCutObjToBox3D ( WlzObject sObj,
WlzIBox3  cutBox,
WlzGreyType  dGreyType,
int  bgNoise,
double  bgMu,
double  bgSigma,
WlzErrorNum dstErrNum 
)

Cuts a new object with (a) rectangular value table(s) from the given woolz object. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.

Returns:
New object with rectangular value table(s) or NULL on error.
Parameters:
sObjGiven source object.
cutBoxCut box.
dGreyTypeRequired grey type for the value table.
bgNoiseIf zero background value is used otherwise if non zero the background is set using gaussian noise.
bgMuMean of background noise.
bgSigmaStandard deviation of the background noise.
dstErrNumDestination pointer for error number, may be NULL if not required.

References WlzCutObjToValBox3D().

WlzObject* WlzCutObjToValBox3D ( WlzObject sObj,
WlzIBox3  cutBox,
WlzGreyType  dGreyType,
void *  gValP,
int  bgNoise,
double  bgMu,
double  bgSigma,
WlzErrorNum dstErrNum 
)

Cuts a new object with (a) rectangular value table(s) from the given woolz object. If the source object has no values then the destination object will always have foreground value 1 and background value 0, ie the background parameters are ignored.

Returns:
New object with rectangular value table(s) or NULL on error.
Parameters:
sObjGiven source object.
cutBoxCut box.
dGreyTypeRequired grey type for the value table.
gValPIf non-NULL allocated space for grey values.
bgNoiseIf zero background value is used otherwise if non zero the background is set using gaussian noise.
bgMuMean of background noise.
bgSigmaStandard deviation of the background noise.
dstErrNumDestination pointer for error number, may be NULL if not required.

References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzVoxelValues::freeptr, _WlzGreyP::inp, _WlzPlaneDomain::lastpl, _WlzGreyP::lnp, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzPlaneDomain::type, _WlzPixelV::type, _WlzCoreDomain::type, _WlzObject::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzVoxelValues::values, _WlzObject::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_2, WLZ_DBG_LVL_FN, WLZ_EMPTY_OBJ, 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_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzCutObjToValBox2D(), WlzFreeObj(), WlzGetBackground(), WlzGreySize(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzStandardPlaneDomain(), WlzValueConvertPixel(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.

Referenced by WlzCutObjToBox3D().

WlzObject* WlzGreyDitherObj ( WlzObject o,
unsigned int  destBits,
WlzErrorNum dstErr 
)

Makes a dithered object from the given grey-level Woolz object. The destination bits are determined by the number of shades in the dithered image (usually 1 bit) and the bit planes to use (typically to match the bit-planes of a display mask).

Returns:
Object with dithered grey values.
Parameters:
oInput object.
destBitsDestination bit planes for dithered values.
dstErrError return.
Source:
WlzGreyDitherObj.c

References _WlzValues::core, _WlzGreyP::inp, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzGreyWSpace::pixeltype, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_TRANS_OBJ, WlzInitGreyScan(), WlzMakeEmpty(), WlzNewGrey(), and WlzNextGreyInterval().

WlzErrorNum WlzGreyInvertMinMax ( WlzObject obj,
WlzPixelV  min,
WlzPixelV  max 
)

Invert the Grey values of an object within a given range. The supplied min and max values define the grey transformation by:

\[ g' = g_{max} + g_{min} - g \]

which means that g=gmax gives g'=gmin and g=gmin gives g'=gmax. This is a generalisation of the original invert and allows for the "normal" inversion of 255-g for byte images. The user must ensure the grey-value type of the given object can hold the result e.g. if the result is negative. Note it is assumed that min and max have a grey type which can be converted to the grey-type of the given image.

Returns:
Woolz error.
Parameters:
objInput object.
minMinimu grey value for the inversion function.
maxMaximun value for the inversion function.
Source:
WlzGreyInvertMinMax.c

References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyP::inp, _WlzGreyV::inv, _WlzValues::obj, _WlzGreyWSpace::pixeltype, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, 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_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RGBA_BLUE_GET, WLZ_RGBA_BLUE_SET, WLZ_RGBA_GREEN_GET, WLZ_RGBA_GREEN_SET, WLZ_RGBA_RED_GET, WLZ_RGBA_RED_SET, WLZ_TRANS_OBJ, WlzInitGreyScan(), WlzNextGreyInterval(), and WlzValueConvertPixel().

WlzObject* WlzGreyMask ( WlzObject obj,
WlzObject mask,
WlzPixelV  maskVal,
WlzErrorNum dstErr 
)

Set the value maskVal within the domain given by the mask object. The mask object can be a 2D, 3D, polygon or boundary object. A 3D mask with a 2D object is an error. A 2D mask with a 3D object will be applied to each plane in turn.

Returns:
New object with the same domain as the input object but with values in the intersection with the mask domain set to the mask value. NULL on error.
Parameters:
objInput object
maskMask object.
maskValmask value.
dstErrError return.
Source:
WlzGreyMask.c

References _WlzDomain::b, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyP::inp, _WlzGreyV::inv, _WlzValues::obj, _WlzGreyWSpace::pixeltype, _WlzDomain::poly, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_BOUNDLIST, WLZ_EMPTY_OBJ, 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_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_SIMPLE_FILL, WLZ_TRANS_OBJ, WlzAssignObject(), WlzAssignValues(), WlzBoundToObj(), WlzFreeObj(), WlzInitGreyScan(), WlzIntersect2(), WlzMakeEmpty(), WlzMakeMain(), WlzNewGrey(), WlzNextGreyInterval(), WlzPolyToObj(), and WlzValueConvertPixel().

Referenced by WlzIndexObjFromCompound().

WlzObject* WlzGreyModGradient ( WlzObject obj,
double  width,
WlzErrorNum dstErr 
)
WlzErrorNum WlzInitGreyRasterScan ( WlzObject obj,
WlzIntervalWSpace iwsp,
WlzGreyWSpace gwsp,
WlzRasterDir  raster,
int  tranpl 
)

As WlzInitGreyScan(), but with choice of raster direction and transplanting.

Returns:
Woolz error.
Parameters:
objInput object to be scanned.
iwspInterval scanning workspace.
gwspValue table scanning workspace.
rasterDirection for the raster scan.
tranplFlag to llow overwriting of grey-values.
Source:
WlzGreyScan.c

References WLZ_ERR_NONE, WlzInitGreyWSpace(), and WlzInitRasterScan().

Referenced by WlzInitGreyScan(), and WlzSeqPar().

WlzErrorNum WlzNextGreyInterval ( WlzIntervalWSpace iwsp)
WlzObject* WlzGreyNewHilbertRankValues ( WlzObject in,
WlzErrorNum dstErr 
)

Creates a new domain object with integer values that increment throughout the object in Hilbert rank order. The input object's domain is used in the output object. Output object values start from 1.

Returns:
New grey value domain object with grey values set to the Hilbert rank of the voxel coordinates.
Parameters:
inInput domain object.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_OBJECT_TYPE.

WlzErrorNum WlzGreySetHilbertRankValues ( WlzObject obj,
unsigned int *  rVal 
)

Sets the values of domain object with int values so that they increment throughout the object in Hilbert rank order.

Returns:
Woolz error code.
Parameters:
objInput domain object.
rValMinimum rank value on input and maximum rank value on output, NULL is equivalent to zero minimum rank value.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, and WLZ_ERR_VALUES_NULL.

WlzObject* WlzGreyNewIncValues ( WlzObject in,
WlzErrorNum dstErr 
)

Creates a new domain object with integer values that increment throughout the object in scan order. Object values start from 1.

Returns:
New grey value domain object with incrementing values.
Parameters:
inInput domain object.
dstErrDestination error pointer, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_ERR_OBJECT_TYPE.

WlzErrorNum WlzGreySetIncValues ( WlzObject obj,
int *  gVal 
)

Sets the values of a 2 or 3D domain object with int values so that they increment throughout the object in scan order. Object values are set by incrementing the given value in place. The given object must have WLZ_GREY_INT values.

Returns:
Woolz error code.
Parameters:
objThe given object.
gValPointer to current value, this is incremented in place. If NULL then the values will be incremented from zero.
dstErrDestination error pointer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzObject::type, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_GREY_INT, and WlzGreyTypeFromObj().

WlzObject* WlzGreyTransfer ( WlzObject obj,
WlzObject srcObj,
WlzErrorNum dstErr 
)

Transfer grey values from the source object to the destination object. Currently it is assumed that the objects are of the same type (2D/3D) and have the same grey-value type.

Returns:
Woolz object with transferred grey values
Parameters:
objdestination object
srcObjsource object
dstErrerror return
Source:
WlzGreyTransfer.c

References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzObject::domain, _WlzGreyP::inp, _WlzValues::obj, _WlzGreyWSpace::pixeltype, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, 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_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_TRANS_OBJ, WlzAssignValues(), WlzCopyObject(), WlzFreeObj(), WlzInitGreyScan(), WlzIntersect2(), WlzMakeEmpty(), WlzMakeMain(), and WlzNextGreyInterval().

void WlzKrigSetModelFn ( WlzKrigModelFn fn,
WlzKrigModelFnType  type,
double  c0,
double  c1,
double  a 
)

Sets a kriging function data stuctures parameters and function pointer. See the kriging model function types and their implementation for the meaning of the parameters.

Parameters:
fnThe kriging function data stucture to be set.
typeKriging model function type.
c0Nugget (offset) parameter.
c1Sill (slope) parameter.
aRange parameter.

References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, _WlzKrigModelFn::c1, _WlzKrigModelFn::fn, _WlzKrigModelFn::type, WLZ_KRIG_MODELFN_EXPONENTIAL, WLZ_KRIG_MODELFN_GAUSSIAN, WLZ_KRIG_MODELFN_INVALID, WLZ_KRIG_MODELFN_LINEAR, WLZ_KRIG_MODELFN_NUGGET, WLZ_KRIG_MODELFN_QUADRATIC, and WLZ_KRIG_MODELFN_SPHERICAL.

Referenced by WlzCMeshMeshMeshProduct().

WlzCompoundArray* WlzRGBAToCompound ( WlzObject obj,
WlzRGBAColorSpace  colSpc,
WlzErrorNum dstErr 
)

Convert a RGBA image to a compound object. The RGBA channels are at array indices 0,1,2,3 respectively and the sub-object grey types will be WLZ_GREY_UBYTE.

Returns:
Compound array of rgba values
Parameters:
objInput domain object with value type WLZ_GREY_RGBA
colSpcThe colour space.
dstErrDestination error ponyer, may be NULL.

References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzIntervalWSpace::lftpos, _WlzCompoundArray::o, _WlzDomain::p, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzPixelV::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzPlaneDomain::type, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzValues::v, _WlzPixelV::v, _WlzObject::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_RGBA, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_RGBA_ALPHA_GET, WLZ_RGBA_BLUE_GET, WLZ_RGBA_GREEN_GET, WLZ_RGBA_RED_GET, WLZ_RGBA_SPACE_CMY, WLZ_RGBA_SPACE_HSB, WLZ_RGBA_SPACE_RGB, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzGetBackground(), WlzGreyTableType(), WlzGreyTableTypeToTableType(), WlzGreyTypeFromObj(), WlzInitGreyScan(), WlzMakeCompoundArray(), WlzMakeEmpty(), WlzMakeMain(), WlzNewValueTb(), WlzNextGreyInterval(), and WlzRGBAConvertRGBToHSV_UBYTENormalised().

Referenced by WlzGauss2(), WlzRGBAGreyScale(), WlzRGBAGreyStats(), WlzRGBAImageArithmetic(), WlzRGBAMultiThreshold(), and WlzRGBAScalarBinaryOp().

WlzObject* WlzCompoundToRGBA ( WlzCompoundArray cmpnd,
WlzRGBAColorSpace  colSpc,
WlzErrorNum dstErr 
)

Creates a WLZ_GREY_RGBA valued object from the given compound array. This is a static function which will always be called with valid parameters so they aren't checked. If all members of the compound array are empty then the returned object will be empty too.

Returns:
New object with WLZ_GREY_RGBA values or possible an empty object.
Parameters:
cObjCompound array object.
cSpcThe colour space.
dstErrDestination error pointer may be NULL.

References _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzObject::type, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_DATA, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_RGBA_SPACE_CMY, WLZ_RGBA_SPACE_HSB, WLZ_RGBA_SPACE_RGB, and WlzMakeEmpty().

Referenced by WlzRGBAGreyScale(), WlzRGBAImageArithmetic(), and WlzRGBAScalarBinaryOp().

WlzObject* WlzRGBAModGradient ( WlzObject obj,
double  width,
WlzErrorNum dstErr 
)

Calculate the modulus of the rgb-level gradient at each point. The gradient images are calculated using WlzGauss2() with width parameter set to width. Note the modulus returned is the modulus of vector formed by the independent channels, i.e. take the modulus for each channel seperately then the modulus of the resultant vector.

Returns:
Woolz object
Parameters:
objInput rgba woolz object
widthwidth of gradient operator
dstErrerror return
Source:
WlzRGBAModGradient.c

References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyP::inp, _WlzCompoundArray::o, _WlzGreyP::shp, _WlzGreyV::shv, _WlzPixelV::type, _WlzCompoundArray::type, _WlzCoreValues::type, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzValues::v, _WlzPixelV::v, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_DATA, WLZ_ERR_OBJECT_NULL, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WlzFreeObj(), WlzGauss2(), WlzGreyModGradient(), WlzGreyTableType(), WlzGreyTableTypeToGreyType(), WlzInitGreyScan(), WlzMakeMain(), WlzNewValueTb(), and WlzNextGreyInterval().

Referenced by WlzGreyModGradient().

double WlzRGBAPixelValue ( WlzPixelV  pixVal,
WlzRGBAColorChannel  chan,
WlzErrorNum dstErr 
)

Calculate the pixel value for a given channel. For grey-pixel types the colour channel values are set equal to the grey value i.e. the pixel is assumed to be (g,g,g). If the grey-channel is requested of a colour pixel the modulus is returned. For colour pixels the error return value is -1, for grey pixels the error return should be tested since all values are valid (except grey-type WlzUByte). Hue and saturation are zero for grey-pixel types.

Returns:
requested value of pixel
Parameters:
pixValinput pixel value structure
chanrequested pixel channel
dstErrerror destination
Source:
WlzRGBAPixelUtils.c

References _WlzGreyV::dbv, _WlzGreyV::flv, _WlzGreyV::inv, _WlzGreyV::rgbv, _WlzGreyV::shv, _WlzPixelV::type, _WlzGreyV::ubv, _WlzPixelV::v, WLZ_ERR_GREY_DATA, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RGBA_BLUE_GET, WLZ_RGBA_CHANNEL_BLUE, WLZ_RGBA_CHANNEL_BRIGHTNESS, WLZ_RGBA_CHANNEL_CYAN, WLZ_RGBA_CHANNEL_GREEN, WLZ_RGBA_CHANNEL_GREY, WLZ_RGBA_CHANNEL_HUE, WLZ_RGBA_CHANNEL_MAGENTA, WLZ_RGBA_CHANNEL_RED, WLZ_RGBA_CHANNEL_SATURATION, WLZ_RGBA_CHANNEL_YELLOW, WLZ_RGBA_GREEN_GET, WLZ_RGBA_MODULUS, WLZ_RGBA_RED_GET, and WlzRGBAConvertRGBToHSV_UBYTENormalised().

Referenced by WlzRGBAEllipsoidThreshold(), WlzRGBASliceThreshold(), and WlzRGBAToChannel().

WlzObjectType WlzGreyTableType ( WlzObjectType  tableType,
WlzGreyType  greyType,
WlzErrorNum dstErr 
)

Computes a grey table type from table and grey types.

Returns:
Type of grey table.
Parameters:
tableTypeThe basic table type.
greyTypeThe grey type.
dstErrDestination error pointer, may be NULL.

References WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_TAB_TILED, WLZ_GREY_UBYTE, WLZ_NULL, WLZ_VALUETABLE_INTL_DOUBLE, WLZ_VALUETABLE_INTL_FLOAT, WLZ_VALUETABLE_INTL_INT, WLZ_VALUETABLE_INTL_RGBA, WLZ_VALUETABLE_INTL_SHORT, WLZ_VALUETABLE_INTL_UBYTE, WLZ_VALUETABLE_RAGR_DOUBLE, WLZ_VALUETABLE_RAGR_FLOAT, WLZ_VALUETABLE_RAGR_INT, WLZ_VALUETABLE_RAGR_RGBA, WLZ_VALUETABLE_RAGR_SHORT, WLZ_VALUETABLE_RAGR_UBYTE, WLZ_VALUETABLE_RECT_DOUBLE, WLZ_VALUETABLE_RECT_FLOAT, WLZ_VALUETABLE_RECT_INT, WLZ_VALUETABLE_RECT_RGBA, WLZ_VALUETABLE_RECT_SHORT, WLZ_VALUETABLE_RECT_UBYTE, WLZ_VALUETABLE_TILED_DOUBLE, WLZ_VALUETABLE_TILED_FLOAT, WLZ_VALUETABLE_TILED_INT, WLZ_VALUETABLE_TILED_RGBA, WLZ_VALUETABLE_TILED_SHORT, and WLZ_VALUETABLE_TILED_UBYTE.

Referenced by Wlz3DViewTransformObj(), WlzCMeshCurvToImage(), WlzCMeshIntersectDom2D5(), WlzContourRBFBndObj3D(), WlzConvertPix(), WlzDistanceTransform(), WlzDomainOccupancy(), WlzFillBlankPlanes(), WlzFromArray1D(), WlzGetProjectionFromObject(), WlzGreyTemplate(), WlzIndexObjFromCompound(), WlzIndexToRGBA(), WlzIntersectN(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzLUTTransformObj(), WlzMakeCuboid(), WlzMakeRect(), WlzNewGrey(), WlzNObjGreyStats(), WlzRGBAModGradient(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzScalarBinaryOp2(), and WlzUnionN().

WlzGreyType WlzGreyTableTypeToGreyType ( WlzObjectType  gTabType,
WlzErrorNum dstErr 
)

Computes the type of grey from a grey table type.

Returns:
Type of grey value.
Parameters:
gTabTypeThe basic table type.
dstErrDestination error pointer, may be NULL.

References WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_VALUETABLE_INTL_DOUBLE, WLZ_VALUETABLE_INTL_FLOAT, WLZ_VALUETABLE_INTL_INT, WLZ_VALUETABLE_INTL_RGBA, WLZ_VALUETABLE_INTL_SHORT, WLZ_VALUETABLE_INTL_UBYTE, WLZ_VALUETABLE_RAGR_DOUBLE, WLZ_VALUETABLE_RAGR_FLOAT, WLZ_VALUETABLE_RAGR_INT, WLZ_VALUETABLE_RAGR_RGBA, WLZ_VALUETABLE_RAGR_SHORT, WLZ_VALUETABLE_RAGR_UBYTE, WLZ_VALUETABLE_RECT_DOUBLE, WLZ_VALUETABLE_RECT_FLOAT, WLZ_VALUETABLE_RECT_INT, WLZ_VALUETABLE_RECT_RGBA, WLZ_VALUETABLE_RECT_SHORT, WLZ_VALUETABLE_RECT_UBYTE, WLZ_VALUETABLE_TILED_DOUBLE, WLZ_VALUETABLE_TILED_FLOAT, WLZ_VALUETABLE_TILED_INT, WLZ_VALUETABLE_TILED_RGBA, WLZ_VALUETABLE_TILED_SHORT, and WLZ_VALUETABLE_TILED_UBYTE.

Referenced by WlzConvertPix(), WlzFillBlankPlanes(), WlzFreeTiledValues(), WlzGreyCrossing(), WlzGreyModGradient(), WlzGreyRange(), WlzGreyTemplate(), WlzGreyTypeFromObj(), WlzGreyValueMakeWSp(), WlzGreyVariance(), WlzIndexToRGBA(), WlzInitGreyWSpace(), WlzIntersectN(), WlzLaplacian(), WlzMakeIntervalValues(), WlzMakeRectValueTb(), WlzMakeTiledValuesTiles(), WlzMakeValueTb(), WlzNewGrey(), WlzNewValueTb(), WlzPolarSample(), WlzRGBAModGradient(), WlzSampleObjPoint2D(), WlzScalarBinaryOp2(), WlzSepTrans(), WlzSetBackground(), WlzSobel(), WlzUnionN(), and WlzWindow().

WlzObjectType WlzGreyTableIsTiled ( WlzObjectType  gTabType)

Determines whether the grey table type is tiled.

Returns:
WLZ_GREY_TAB_TILED if the grey table type is tiled otherwise zero.
Parameters:
gTabTypeThe basic table type.

References WLZ_GREY_TAB_TILED, WLZ_VALUETABLE_TILED_DOUBLE, WLZ_VALUETABLE_TILED_FLOAT, WLZ_VALUETABLE_TILED_INT, WLZ_VALUETABLE_TILED_RGBA, WLZ_VALUETABLE_TILED_SHORT, and WLZ_VALUETABLE_TILED_UBYTE.

Referenced by WlzFreeObj(), WlzFreeTiledValues(), WlzGetBackground(), WlzGreyTypeFromObj(), WlzGreyValueMakeWSp(), WlzProjectObjToPlane(), WlzShiftValues(), and WlzWriteObj().

WlzDVertex3 WlzVozelSz ( WlzObject obj,
WlzErrorNum dstErr 
)

Gets the given 3D domain objects voxel size.

Returns:
Voxel size.
Parameters:
objGiven 3D domain object.
dstErrDestination pointer for error code, may be NULL.

References _WlzDomain::core, _WlzObject::domain, _WlzDomain::p, _WlzCoreDomain::type, _WlzPlaneDomain::voxel_size, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, and WLZ_PLANEDOMAIN_DOMAIN.

void* WlzIndexedValueExtGet ( WlzIndexedValues ixv,
int  idx 
)

Gets a pointer to the valuetable entry for the given index. The value table is extended as required so that there should always be a valid entry unless memory allocation fails. See also WlzIndexedValueGet().

Returns:
Value pointer which may be null on error.
Parameters:
ixvIndexed value table.
idxGiven index.

References AlcVectorExtendAndGet(), and _WlzIndexedValues::values.

Referenced by WlzBasisFnSetCMesh2D(), WlzBasisFnSetCMesh3D(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), and WlzIndexedValuesSet().

WlzErrorNum WlzIndexedValuesSet ( WlzObject obj,
size_t  cnt,
void *  val 
)
void WlzValueSetInt ( int *  vec,
int  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is int.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzHistogramObj(), WlzSeqPar(), WlzSnapFit(), and WlzValueSetGrey().

void WlzValueSetShort ( short *  vec,
short  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is short.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzValueSetGrey().

void WlzValueSetUByte ( WlzUByte vec,
WlzUByte  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is WlzUByte.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzContourGrdObj2D(), and WlzValueSetGrey().

void WlzValueSetFloat ( float *  vec,
float  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is float.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzValueSetGrey().

void WlzValueSetDouble ( double *  vec,
double  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is double.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzCMeshFMarNodes2D(), WlzCMeshFMarNodes3D(), WlzContourGrdObj2D(), and WlzValueSetGrey().

void WlzValueSetRGBA ( WlzUInt vec,
WlzUInt  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is rgb-alpha.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

Referenced by WlzValueSetGrey().

void WlzValueSetDVertex ( WlzDVertex2 vec,
WlzDVertex2  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is WlzDVertex2.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.
void WlzValueSetFVertex ( WlzFVertex2 vec,
WlzFVertex2  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is WlzFVertex2.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.
void WlzValueSetIVertex ( WlzIVertex2 vec,
WlzIVertex2  value,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is WlzIVertex2.

Returns:
void
Parameters:
vecVector who's elements are to be set.
valueValue to use when setting the vector's elements.
countNumber of vector elements to be set.

References _WlzIVertex2::vtX, and _WlzIVertex2::vtY.

void WlzValueSetGrey ( WlzGreyP  vec,
size_t  vecOff,
WlzGreyV  value,
WlzGreyType  gType,
size_t  count 
)

Sets the elements of the given vector to a given value, where the vector type is any one of int, short, WlzUByte, float, double.

Returns:
void
Parameters:
vecVector who's elements are to be set.
vecOffOffset from vec.
valueValue to use when setting the vector's elements.
gTypeGrey type, ie: int, short....
countNumber of vector elements to be set.

References _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyP::inp, _WlzGreyV::inv, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzGreyP::ubp, _WlzGreyV::ubv, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WlzValueSetDouble(), WlzValueSetFloat(), WlzValueSetInt(), WlzValueSetRGBA(), WlzValueSetShort(), and WlzValueSetUByte().

void WlzValueClampIntToShort ( int *  vec,
size_t  count 
)

Clamps a vector of int values to the limits of short.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampIntToUByte ( int *  vec,
size_t  count 
)

Clamps a vector of int values to the limits of WlzUByte.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampShortToUByte ( short *  vec,
size_t  count 
)

Clamps a vector of short values to the limits of WlzUByte.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampDoubleToInt ( double *  vec,
size_t  count 
)

Clamps a vector of double values to the limits of int.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampDoubleToShort ( double *  vec,
size_t  count 
)

Clamps a vector of double values to the limits of short.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampDoubleToUByte ( double *  vec,
size_t  count 
)

Clamps a vector of double values to the limits of WlzUByte.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampDoubleToRGBA ( double *  vec,
size_t  count 
)

Clamps a vector of double values to the limits of RGBA.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.
void WlzValueClampDoubleToFloat ( double *  vec,
size_t  count 
)

Clamps a vector of double values to the limits of float.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampFloatToInt ( float *  vec,
size_t  count 
)

Clamps a vector of float values to the limits of int.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampFloatToShort ( float *  vec,
size_t  count 
)

Clamps a vector of float values to the limits of short.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampFloatToUByte ( float *  vec,
size_t  count 
)

Clamps a vector of float values to the limits of WlzUByte.

Returns:
void
Parameters:
vecVector who's elements are to be clamped.
countNumber of vector elements.

Referenced by WlzValueConvertPixel().

void WlzValueClampIntIntoShort ( short *  dst,
int *  src,
size_t  count 
)

Clamps a vector of int values into a vector of short values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampIntIntoUByte ( WlzUByte dst,
int *  src,
size_t  count 
)

Clamps a vector of nt values into a vector of WlzUByte values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampShortIntoUByte ( WlzUByte dst,
short *  src,
size_t  count 
)

Clamps a vector of short values into a vector of WlzUByte values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampFloatIntoInt ( int *  dst,
float *  src,
size_t  count 
)

Clamps a vector of float values into a vector of int values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_NINT.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampFloatIntoShort ( short *  dst,
float *  src,
size_t  count 
)

Clamps a vector of float values into a vector of short values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_NINT.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampFloatIntoUByte ( WlzUByte dst,
float *  src,
size_t  count 
)

Clamps a vector of float values into a vector of WlzUByte values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampDoubleIntoInt ( int *  dst,
double *  src,
size_t  count 
)

Clamps a vector of into double values into a vector of int values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_NINT.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampDoubleIntoShort ( short *  dst,
double *  src,
size_t  count 
)

Clamps a vector of double values into a vector of short values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_NINT.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampDoubleIntoUByte ( WlzUByte dst,
double *  src,
size_t  count 
)

Clamps a vector of double values into a vector of WlzUByte values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampDoubleIntoFloat ( float *  dst,
double *  src,
size_t  count 
)

Clamps a vector of double values into a vector of float values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

Referenced by WlzValueClampGreyIntoGrey().

void WlzValueClampIntIntoRGBA ( WlzUInt dst,
int *  src,
size_t  count 
)

Clamps a vector of int values into a vector of RGBA values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_RGBA_RGBA_SET.

Referenced by WlzValueClampGreyIntoGrey(), and WlzValueCopyIntToRGBA().

void WlzValueClampShortIntoRGBA ( WlzUInt dst,
short *  src,
size_t  count 
)

Clamps a vector of short values into a vector of RGBA values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_RGBA_RGBA_SET.

Referenced by WlzValueClampGreyIntoGrey(), and WlzValueCopyShortToRGBA().

void WlzValueClampFloatIntoRGBA ( WlzUInt dst,
float *  src,
size_t  count 
)

Clamps a vector of float values into a vector of RGBA values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_RGBA_RGBA_SET.

Referenced by WlzValueClampGreyIntoGrey(), and WlzValueCopyFloatToRGBA().

void WlzValueClampDoubleIntoRGBA ( WlzUInt dst,
double *  src,
size_t  count 
)

Clamps a vector of double values into a vector of RGBA values.

Returns:
void
Parameters:
dstDestination vector.
srcSource vector.
countNumber of vector elements.

References WLZ_RGBA_RGBA_SET.

Referenced by WlzValueClampGreyIntoGrey(), and WlzValueCopyDoubleToRGBA().