Woolz Image Processing
Version 1.7.5
|
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. More... | |
WlzPixelV | WlzGetBackground (WlzObject *obj, WlzErrorNum *dstErr) |
Gets the background value of the given object. More... | |
WlzObject * | WlzSetBackGroundNewObj (WlzObject *gObj, WlzPixelV bgdV, WlzErrorNum *dstErr) |
Creates a new Woolz object in which the background value is as given. The given object must be either a 2D or 3D domain object with a valid domain, however it's values can be NULL. If the values are NULL then a new value table is created with the same grey type as the given background value, or if non-NULL then a new value table is created while sharing the values of the original object's value table when this is possible. The given object remains unchanged apart from linkcounts. More... | |
WlzObject * | WlzConvertPix (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. More... | |
WlzPolygonDomain * | WlzConvertPolyType (WlzPolygonDomain *pdom, WlzObjectType type, WlzErrorNum *dstErr) |
Converts a polygon domain type. More... | |
WlzBoundList * | WlzConvertBoundType (WlzBoundList *bound, WlzObjectType type, WlzErrorNum *dstErr) |
Converts a boundary list to the required type. More... | |
WlzObject * | WlzConvertVtx (WlzObject *obj, WlzVertexType newVtxType, WlzErrorNum *dstErr) |
Converts the vertices of an object to the required type. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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). More... | |
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. More... | |
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. More... | |
WlzObject * | WlzGreyModGradient (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. More... | |
WlzErrorNum | WlzInitGreyScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp) |
Initialise interval and grey scanning of standard object in standard direction. More... | |
WlzErrorNum | WlzEndGreyScan (WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp) |
This must be called when a grey workspace is no longer required as it frees resources of the workspace. More... | |
WlzErrorNum | WlzInitGreyRasterScan (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp, WlzRasterDir raster, int tranpl) |
As WlzInitGreyScan(), but with choice of raster direction and transplanting,. More... | |
WlzErrorNum | WlzInitGreyWSpace (WlzObject *obj, WlzIntervalWSpace *iwsp, WlzGreyWSpace *gwsp, int tranpl) |
Attach grey workspace to interval scanning workspace. More... | |
WlzErrorNum | WlzNextGreyInterval (WlzIntervalWSpace *iwsp) |
Obtain next interval and its grey table. More... | |
WlzErrorNum | WlzGreyInterval (WlzIntervalWSpace *iwsp) |
Handle grey table for an interval. This must follow a call to WlzNextInterval(). More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
WlzErrorNum | WlzGreySetValue (WlzObject *obj, WlzPixelV val) |
Set the grey value of every pixel/voxel to the given value. More... | |
WlzObject * | WlzGreyTemplate (WlzObject *obj, WlzObject *tmpl, WlzPixelV tmplVal, WlzErrorNum *dstErr) |
WlzObject * | WlzGreyTransfer (WlzObject *dObj, WlzObject *sObj, int inplace, WlzErrorNum *dstErr) |
Transfers grey values from the source object to the destination object within the intersection of the source and destination. Grey values within the destination object outside of the source object are unchanged. It is an error if either object has a different dimension or grey value type, except for when either is an empty object. More... | |
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. More... | |
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. More... | |
double | WlzKrigModelFnLinear (WlzKrigModelFn *f, double h) |
A linear kriging variance model. \[ \left\{ \begin{array}{ll} h < a & \gamma(h) = c_0 + \frac{(c_1 - c_0)}{a} h \\ h \geq a & \gamma(h) = c_1 \end{array} \right. \] . More... | |
double | WlzKrigModelFnSpherical (WlzKrigModelFn *f, double h) |
A spherical kriging variance model. \[ \left\{ \begin{array}{ll} 0 < h \leq a & \gamma(h) = c_0 + c_1 \frac{1}{2} (\frac{3h}{a} - \frac{h^3}{a^3}) \\ h > a & \gamma(h) = c_0 + c_1 \end{array} \right. \] . More... | |
double | WlzKrigModelFnExponential (WlzKrigModelFn *f, double h) |
An exponential kriging variance model. \[ \gamma(h) = c_0 + c_1(1 - e^{-\frac{h}{a}}) \] . More... | |
double | WlzKrigModelFnGaussian (WlzKrigModelFn *f, double h) |
A Gaussian kriging variance model. \[ \gamma(h) = c_0 + c_1(1 - e^{-(\frac{h}{a})^2}) \] . More... | |
double | WlzKrigModelFnQuadratic (WlzKrigModelFn *f, double h) |
A Quadratic kriging variance model. \[ \gamma(h) = c_0 + c_1 \left( \frac{ (\frac{h}{a})^2} {1 + (\frac{h}{a})^2} \right) \] . More... | |
WlzErrorNum | WlzKrigOSetModelSV2D (AlgMatrix modelSV, WlzKrigModelFn *modelFn, int n, WlzDVertex2 *nbr, int *wSp) |
Computes the ordinary kriging model semi-variogram from the given neighbourhood vertices. More... | |
WlzErrorNum | WlzKrigOSetModelSV3D (AlgMatrix modelSV, WlzKrigModelFn *modelFn, int n, WlzDVertex3 *nbr, int *wSp) |
Computes the ordinary kriging model semi-variogram from the given neighbourhood vertices. More... | |
WlzErrorNum | WlzKrigOSetPosSV2D (double *posSV, WlzKrigModelFn *modelFn, int n, WlzDVertex2 *nbr, WlzDVertex2 pos) |
Computes the ordinary kriging position semi-variogram from the given neighbourhood vertices and the given position vertex. More... | |
WlzErrorNum | WlzKrigOSetPosSV3D (double *posSV, WlzKrigModelFn *modelFn, int n, WlzDVertex3 *nbr, WlzDVertex3 pos) |
Computes the ordinary kriging position semi-variogram from the given neighbourhood vertices and the given position vertex. More... | |
WlzErrorNum | WlzKrigOWeightsSolve (AlgMatrix modelSV, double *posSV, int *wSp, double eps) |
Computes the ordinary kriging weights from the model and position semi-variograms. More... | |
WlzErrorNum | WlzKrigReallocBuffers2D (WlzDVertex2 **dstNbrPosBuf, double **dstPosSV, int **dstWSp, AlgMatrix *dstModelSV, int *dstMaxKrigBuf, int nNbrC, int nNbrL) |
A convinience function for allocating and reallocating the buffers needed for 2D kriging. All given pointers must be valid and on the first call all pointer values (eg *dstNbrPosBuf) must be NULL. More... | |
WlzErrorNum | WlzKrigReallocBuffers3D (WlzDVertex3 **dstNbrPosBuf, double **dstPosSV, int **dstWSp, AlgMatrix *dstModelSV, int *dstMaxKrigBuf, int nNbrC, int nNbrL) |
A convinience function for allocating and reallocating the buffers needed for 3D kriging. All given pointers must be valid and on the first call all pointer values (eg *dstNbrPosBuf) must be NULL. More... | |
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. More... | |
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. More... | |
WlzObject * | WlzRGBAToModulus (WlzObject *obj, WlzErrorNum *dstErr) |
Calculate the modulus of the rgb values and return in an image of grey type WLZ_GREY_SHORT. More... | |
WlzObject * | WlzIndexToRGBA (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. More... | |
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. More... | |
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. More... | |
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. More... | |
int | WlzTiledValuesMode (WlzTiledValues *tv, WlzErrorNum *dstErr) |
Determines how the tiled values of a tiles value table may be used. If memory mapping is in use then the mode in which the file (containing the memory mapped values) was opened determines the modes in which the tiled values can be accessed. Inappropriate access (eg attempting to change a grey value in a memory mapped tiled values table that was opened for read only) will generate a memory fault. The returned value is a bit mask in which WLZ_IOFLAGS_READ will be set iff grey values can be read and WLZ_IOFLAGS_WRITE will be set iff the grey values can be written to (ie modified). More... | |
void | WlzTiledValueBufferFlush (WlzTiledValueBuffer *tvb, WlzTiledValues *tv) |
Flushes the values in the tiled values buffer to the tiled values table. More... | |
void | WlzTiledValueBufferFill (WlzTiledValueBuffer *tvb, WlzTiledValues *tv) |
Fills the tiled values buffer using values from the tiled values table. More... | |
void | WlzTiledValuesCopyLine (WlzTiledValues *tv, WlzGreyP gP, int pl, int ln, int kl1, int lkl) |
Copies a single line of grey values to a tiled value table. This is done within the valid tiles which may lie outside of an object's domain, so care should be used when calling this function. All the given coordinate values are with respect to the tiled value table's origin. If the tiled values have a number of values per element greater than one then the given buffer must have too. More... | |
int | WlzTiledValuesValPerElm (WlzTiledValues *tVal) |
Computes the number of values per pixel/voxel for a tiled value table. More... | |
WlzObjectType | WlzGreyValueTableType (int rank, WlzGreyTableType tableType, WlzGreyType greyType, WlzErrorNum *dstErr) |
Computes a grey table type from table and grey types. This function is equivalent to the macro WLZ_GREY_TABLE_TYPE but with range checks. More... | |
WlzGreyType | WlzGreyTableTypeToGreyType (WlzObjectType gTabType, WlzErrorNum *dstErr) |
Computes the type of grey from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_GREY_TYPE but with range checks. More... | |
WlzGreyTableType | WlzGreyTableTypeToTableType (WlzObjectType gTabType, WlzErrorNum *dstErr) |
Computes the type of table from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_TABLE_TYPE but with range checks. More... | |
int | WlzGreyTableTypeToRank (WlzObjectType gTabType, WlzErrorNum *dstErr) |
Computes the rank from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_RANK but with range checks. More... | |
WlzGreyTableType | WlzGreyTableIsTiled (WlzObjectType gTabType) |
Determines whether the grey table type is tiled. More... | |
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. More... | |
WlzDVertex3 | WlzVozelSz (WlzObject *obj, WlzErrorNum *dstErr) |
Gets the given 3D domain objects voxel size. More... | |
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(). More... | |
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(). More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
WlzGreyP | WlzValueSetGreyP (WlzGreyP base, WlzGreyType gType, size_t off) |
Sets a grey pointer using the given base grey pointer and an offset. More... | |
void | WlzValueClampIntToShort (int *vec, size_t count) |
Clamps a vector of int values to the limits of short. More... | |
void | WlzValueClampIntToUByte (int *vec, size_t count) |
Clamps a vector of int values to the limits of WlzUByte. More... | |
void | WlzValueClampShortToUByte (short *vec, size_t count) |
Clamps a vector of short values to the limits of WlzUByte. More... | |
void | WlzValueClampDoubleToInt (double *vec, size_t count) |
Clamps a vector of double values to the limits of int. More... | |
void | WlzValueClampDoubleToShort (double *vec, size_t count) |
Clamps a vector of double values to the limits of short. More... | |
void | WlzValueClampDoubleToUByte (double *vec, size_t count) |
Clamps a vector of double values to the limits of WlzUByte. More... | |
void | WlzValueClampDoubleToRGBA (double *vec, size_t count) |
Clamps a vector of double values to the limits of RGBA. More... | |
void | WlzValueClampDoubleToFloat (double *vec, size_t count) |
Clamps a vector of double values to the limits of float. More... | |
void | WlzValueClampFloatToInt (float *vec, size_t count) |
Clamps a vector of float values to the limits of int. More... | |
void | WlzValueClampFloatToShort (float *vec, size_t count) |
Clamps a vector of float values to the limits of short. More... | |
void | WlzValueClampFloatToUByte (float *vec, size_t count) |
Clamps a vector of float values to the limits of WlzUByte. More... | |
void | WlzValueClampIntIntoShort (short *dst, int *src, size_t count) |
Clamps a vector of int values into a vector of short values. More... | |
void | WlzValueClampIntIntoUByte (WlzUByte *dst, int *src, size_t count) |
Clamps a vector of nt values into a vector of WlzUByte values. More... | |
void | WlzValueClampShortIntoUByte (WlzUByte *dst, short *src, size_t count) |
Clamps a vector of short values into a vector of WlzUByte values. More... | |
void | WlzValueClampFloatIntoInt (int *dst, float *src, size_t count) |
Clamps a vector of float values into a vector of int values. More... | |
void | WlzValueClampFloatIntoShort (short *dst, float *src, size_t count) |
Clamps a vector of float values into a vector of short values. More... | |
void | WlzValueClampFloatIntoUByte (WlzUByte *dst, float *src, size_t count) |
Clamps a vector of float values into a vector of WlzUByte values. More... | |
void | WlzValueClampDoubleIntoInt (int *dst, double *src, size_t count) |
Clamps a vector of into double values into a vector of int values. More... | |
void | WlzValueClampDoubleIntoShort (short *dst, double *src, size_t count) |
Clamps a vector of double values into a vector of short values. More... | |
void | WlzValueClampDoubleIntoUByte (WlzUByte *dst, double *src, size_t count) |
Clamps a vector of double values into a vector of WlzUByte values. More... | |
void | WlzValueClampDoubleIntoFloat (float *dst, double *src, size_t count) |
Clamps a vector of double values into a vector of float values. More... | |
void | WlzValueClampIntIntoRGBA (WlzUInt *dst, int *src, size_t count) |
Clamps a vector of int values into a vector of RGBA values. More... | |
void | WlzValueClampShortIntoRGBA (WlzUInt *dst, short *src, size_t count) |
Clamps a vector of short values into a vector of RGBA values. More... | |
void | WlzValueClampFloatIntoRGBA (WlzUInt *dst, float *src, size_t count) |
Clamps a vector of float values into a vector of RGBA values. More... | |
void | WlzValueClampDoubleIntoRGBA (WlzUInt *dst, double *src, size_t count) |
Clamps a vector of double values into a vector of RGBA values. More... | |
WlzErrorNum WlzSetBackground | ( | WlzObject * | obj, |
WlzPixelV | bgd | ||
) |
Sets the backgound value of an image object.
obj | Given object in which to set the background value. |
bgd | Required background value. |
References _WlzRagRValues::bckgrnd, _WlzRectValues::bckgrnd, _WlzIntervalValues::bckgrnd, _WlzVoxelValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzValues::i, _WlzPlaneDomain::lastpl, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzValues::r, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, 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_PLANEDOMAIN_TYPE, WLZ_ERR_VOXELVALUES_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_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzFreeObj(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), WlzMakeMain(), and WlzValueConvertPixel().
Referenced by WlzCMeshDispToField(), WlzLBTIndexObjSetAllNodes2D(), WlzLBTIndexObjSetAllNodes3D(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzMeshFromObjBox(), WlzOffsetDist(), WlzRegCCorObjs(), WlzRegConCalcRCC(), WlzRGBChanRatio(), and WlzSampleObjPoint2D().
WlzPixelV WlzGetBackground | ( | WlzObject * | obj, |
WlzErrorNum * | dstErr | ||
) |
Gets the background value of the given object.
obj | Given object. |
dstErr | Destination error pointer, may be NULL. |
References _WlzRagRValues::bckgrnd, _WlzRectValues::bckgrnd, _WlzIntervalValues::bckgrnd, _WlzVoxelValues::bckgrnd, _WlzTiledValues::bckgrnd, _WlzValues::core, _WlzObject::domain, _WlzValues::i, _WlzDomain::i, _WlzGreyV::inv, _WlzValues::obj, _WlzDomain::p, _WlzValues::r, _WlzValues::t, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzPixelV::v, _WlzValues::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_GREY_TAB_TILED, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzGreyTableIsTiled(), and WlzGreyTableTypeToTableType().
Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzBuildObj3(), WlzClassValCon4(), WlzClipObjToBox3D(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCMeshTransformObj(), WlzCompoundToRGBA(), WlzConstruct3DObjFromFile(), WlzConstruct3DObjFromObj(), WlzConvertPix(), WlzConvolveObj(), WlzCutObjToValBox2D(), WlzCutObjToValBox3D(), WlzEffReadObjTiff(), WlzEffWriteObjStack(), WlzEffWriteObjTiff(), WlzFillBlankPlanes(), WlzGetSubSectionFromObject(), WlzGreyCrossing(), WlzGreyTemplate(), WlzGreyTransfer(), WlzGreyVariance(), WlzIndexToRGBA(), WlzIntersectN(), WlzIntRescaleObj(), WlzLabel3D(), WlzLUTTransformObj(), WlzNewGrey(), WlzPolarSample(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzRsvFilterBuffer(), WlzSampleObjPoint2D(), WlzSampleObjPoint3D(), WlzScalarBinaryOp2(), WlzScalarFn(), WlzScalarMulAdd(), WlzSepTrans(), WlzShadeCorrectBFDF(), WlzTensorGetComponent(), WlzTransposeObj(), WlzUnionN(), and WlzWriteObj().
WlzObject* WlzSetBackGroundNewObj | ( | WlzObject * | gObj, |
WlzPixelV | bgdV, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new Woolz object in which the background value is as given. The given object must be either a 2D or 3D domain object with a valid domain, however it's values can be NULL. If the values are NULL then a new value table is created with the same grey type as the given background value, or if non-NULL then a new value table is created while sharing the values of the original object's value table when this is possible. The given object remains unchanged apart from linkcounts.
gObj | Given object. |
bgdV | Given background value. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPixelV::type, _WlzObject::values, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_GREY_TAB_RAGR, WlzGreyValueTableType(), WlzNewObjectValues(), and WlzNewObjectValueTable().
WlzObject* WlzConvertPix | ( | 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.
obj | The object for conversion. |
newpixtype | The required grey-value type. |
dstErr | Destination error pointer, may be NULL. |
References _WlzObject::assoc, _WlzVoxelValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzVoxelValues::lastpl, _WlzIntervalWSpace::lftpos, _WlzPlaneDomain::line1, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzObject::plist, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_ERR_VOXELVALUES_TYPE, WLZ_GREY_ERROR, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeObj(), WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzNewValueTb(), WlzNextGreyInterval(), WlzValueConvertPixel(), and WlzValueCopyGreyToGrey().
Referenced by WlzGauss2(), WlzGreyModGradient(), WlzGreyTemplate(), WlzLaplacian(), WlzRGBChanRatio(), WlzSepFilter(), and WlzSobel().
WlzPolygonDomain* WlzConvertPolyType | ( | WlzPolygonDomain * | pdom, |
WlzObjectType | type, | ||
WlzErrorNum * | dstErr | ||
) |
Converts a polygon domain type.
pdom | Given polygon domain. |
type | Required polygon domain type. |
dstErr | Destination pointer for error, may be NULL. |
References _WlzPolygonDomain::nvertices, _WlzPolygonDomain::type, _WlzPolygonDomain::vtx, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_TYPE, WLZ_POLYGON_DOUBLE, WLZ_POLYGON_FLOAT, WLZ_POLYGON_INT, WlzFreePolyDmn(), WlzMakePolygonDomain(), WlzValueCopyDVertexToDVertex(), WlzValueCopyDVertexToFVertex(), WlzValueCopyDVertexToIVertex(), WlzValueCopyFVertexToDVertex(), WlzValueCopyFVertexToFVertex(), WlzValueCopyFVertexToIVertex(), WlzValueCopyIVertexToDVertex(), WlzValueCopyIVertexToFVertex(), and WlzValueCopyIVertexToIVertex().
Referenced by WlzConvertBoundType(), WlzConvertVtx(), and WlzPolySmooth().
WlzBoundList* WlzConvertBoundType | ( | WlzBoundList * | bound, |
WlzObjectType | type, | ||
WlzErrorNum * | dstErr | ||
) |
Converts a boundary list to the required type.
bound | Given boundary list. |
type | Required boundary list type. |
dstErr | Destination 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 | ||
) |
Converts the vertices of an object to the required type.
obj | Given object. |
newVtxType | Required vertex type. |
dstErr | Destination pointer for error, may be NULL. |
References _WlzDomain::b, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzDomain::poly, _WlzObject::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzPlaneDomain::voxel_size, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_3D_POLYGON, WLZ_BOUNDLIST, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_TYPE, WLZ_ERR_UNIMPLEMENTED, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_POLYGON, WLZ_POLYGON_DOUBLE, WLZ_POLYGON_FLOAT, WLZ_POLYGON_INT, WLZ_TRANS_OBJ, WLZ_VERTEX_D2, WLZ_VERTEX_F2, WLZ_VERTEX_I2, WlzAssignDomain(), WlzConvertBoundType(), WlzConvertPolyType(), WlzFreeObj(), WlzMakeMain(), and WlzMakePlaneDomain().
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.
sObj | Given source object. |
cutBox | Rectangle box to cut from the object. |
dGreyType | Required grey type for the value table. |
bgNoise | If zero background value is used otherwise if non zero the background is set using gaussian noise. |
bgMu | Mean of background noise. |
bgSigma | Standard deviation of the background noise. |
dstErrNum | Destination pointer for error number, may be NULL if not required. |
References WlzCutObjToValBox2D().
Referenced by WlzEffReadObjTiff(), 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.
sObj | Given source object. |
cutBox | Rectangle box to cut from the object. |
dGreyType | Required grey type for the value table. |
gValP | If non-NULL allocated space for grey values. |
bgNoise | If zero background value is used otherwise if non zero the background is set using gaussian noise. |
bgMu | Mean of background noise. |
bgSigma | Standard deviation of the background noise. |
dstErrNum | Destination pointer for error number, may be NULL if not required. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzGreyWSpace::pixeltype, _WlzIntervalWSpace::plnpos, _WlzValues::r, _WlzIntervalWSpace::rgtpos, _WlzGreyWSpace::tvb, _WlzPixelV::type, _WlzObject::type, _WlzCoreDomain::type, _WlzGreyWSpace::u_grintptr, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_2, WLZ_DBG_LVL_FN, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_GREY_ERROR, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_RASTERDIR_ILIC, WlzEndGreyScan(), WlzFreeObj(), WlzGetBackground(), WlzGreySize(), WlzInitGreyScan(), WlzInitRasterScan(), WlzMakeEmpty(), WlzMakeRect(), WlzNextGreyInterval(), WlzNextInterval(), WlzValueConvertPixel(), WlzValueCopyGreyToGrey(), WlzValueSetGrey(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.
Referenced by WlzCutObjToBox2D(), WlzCutObjToValBox3D(), WlzEffWriteObjBmp2D(), WlzEffWriteObjPnm2D(), and WlzToArray2D().
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.
sObj | Given source object. |
cutBox | Cut box. |
dGreyType | Required grey type for the value table. |
bgNoise | If zero background value is used otherwise if non zero the background is set using gaussian noise. |
bgMu | Mean of background noise. |
bgSigma | Standard deviation of the background noise. |
dstErrNum | Destination 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.
sObj | Given source object. |
cutBox | Cut box. |
dGreyType | Required grey type for the value table. |
gValP | If non-NULL allocated space for grey values. |
bgNoise | If zero background value is used otherwise if non zero the background is set using gaussian noise. |
bgMu | Mean of background noise. |
bgSigma | Standard deviation of the background noise. |
dstErrNum | Destination pointer for error number, may be NULL if not required. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), AlgRandNormal(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzVoxelValues::freeptr, _WlzGreyP::inp, _WlzGreyP::lnp, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzValues::t, _WlzPixelV::type, _WlzObject::type, _WlzCoreDomain::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_CLAMP, 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(), WlzGreyTableIsTiled(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzStandardPlaneDomain(), WlzValueConvertPixel(), WlzValueSetGrey(), WlzValueSetGreyP(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
Referenced by WlzCutObjToBox3D(), and WlzToArray3D().
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).
o | Input object. |
destBits | Destination bit planes for dithered values. |
dstErr | Error return. |
References _WlzValues::core, _WlzGreyP::inp, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzGreyWSpace::pixeltype, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzObject::type, _WlzCoreValues::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_ERR_VALUES_TYPE, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_TRANS_OBJ, WlzGreyTableIsTiled(), 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.
obj | Input object. |
min | Minimu grey value for the inversion function. |
max | Maximun value for the inversion function. |
References _WlzObject::assoc, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyP::inp, _WlzGreyV::inv, _WlzPlaneDomain::lastpl, _WlzObject::linkcount, _WlzValues::obj, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzObject::plist, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, 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_PLANEDOMAIN_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_ERR_VOXELVALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, 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, WLZ_VOXELVALUETABLE_GREY, WlzGreyTableIsTiled(), 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.
obj | Input object |
mask | Mask object. |
maskVal | mask value. |
dstErr | Error return. |
References _WlzDomain::b, _WlzVoxelValues::bckgrnd, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyP::inp, _WlzGreyV::inv, _WlzVoxelValues::lastpl, _WlzValues::obj, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzDomain::poly, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_BOUNDLIST, WLZ_EMPTY_DOMAIN, 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_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_DOMAIN, WLZ_PLANEDOMAIN_POLYGON, WLZ_SIMPLE_FILL, WLZ_TRANS_OBJ, WlzAssignObject(), WlzAssignValues(), WlzBoundToObj(), WlzFreeObj(), WlzGreyTableIsTiled(), WlzInitGreyScan(), WlzIntersect2(), WlzMakeEmpty(), WlzMakeMain(), WlzMakeVoxelValueTb(), WlzNewGrey(), WlzNextGreyInterval(), WlzPolyToObj(), and WlzValueConvertPixel().
Referenced by WlzIndexObjFromCompound().
WlzObject* WlzGreyModGradient | ( | 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.
obj | Input object. |
width | Width parameter for the gaussian gradient operator. |
dstErr | Error return. |
References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyP::inp, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzCompoundArray::otype, _WlzGreyWSpace::pixeltype, _WlzGreyP::shp, _WlzObject::type, _WlzCompoundArray::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzObject::values, WLZ_2D_DOMAINOBJ, WLZ_COMPOUND_ARR_1, WLZ_COMPOUND_ARR_2, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_OBJ, WLZ_EMPTY_VALUES, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WlzAssignObject(), WlzConvertPix(), WlzCopyValues(), WlzFreeObj(), WlzGauss2(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzInitGreyScan(), WlzMakeCompoundArray(), WlzMakeEmpty(), WlzMakeMain(), WlzNextGreyInterval(), and WlzRGBAModGradient().
Referenced by WlzRGBAModGradient(), and WlzScalarFeatures2D().
WlzErrorNum WlzInitGreyScan | ( | WlzObject * | obj, |
WlzIntervalWSpace * | iwsp, | ||
WlzGreyWSpace * | gwsp | ||
) |
Initialise interval and grey scanning of standard object in standard direction.
obj | Object to be scanned. |
iwsp | Interval scanning workspace. |
gwsp | Grey value table scanning workspace. |
References WLZ_RASTERDIR_ILIC, and WlzInitGreyRasterScan().
Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzCbThreshold(), WlzCentrality(), WlzCentreOfMassVtx3D(), WlzClassValCon4(), WlzCMeshCurvToImage(), WlzCMeshStrainTensorAtPts(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCompDispIncGrey(), WlzCompoundArrayToScalar(), WlzCompoundToRGBA(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzConvertPix(), WlzCopyObjectGreyValues(), WlzCutObjToValBox2D(), WlzEffReadObjTiff(), WlzEffWriteObjJpeg(), WlzFilterNObjValues(), WlzGaussNoise(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGreyDitherObj(), WlzGreyIncValues2D(), WlzGreyInvertMinMax(), WlzGreyMask(), WlzGreyMeanDifference(), WlzGreyModGradient(), WlzGreyRange(), WlzGreyScale(), WlzGreySetHilbertRankValues(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreyShift(), WlzGreySize(), WlzGreyTemplate(), WlzGreyTransfer(), WlzHistogramMapValues(), WlzIndexToRGBA(), WlzIntersectN(), WlzIntRescaleObj(), WlzLUTTransformObj(), WlzMass(), WlzNewGrey(), WlzNObjGreyStats(), WlzPrincipalAngle(), WlzProjectObjToPlane(), WlzRankFilter(), WlzRegConCalcRCC(), WlzRGBAModGradient(), WlzRGBAModulusRange(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzRGBChanRatio(), WlzRsvFilterBuffer(), WlzSampleObjPoint2D(), WlzSampleValuesAndCoords(), WlzScalarBinaryOp(), WlzScalarFn(), WlzScalarMulAdd(), WlzSepFilter(), WlzSepTrans(), WlzShadeCorrectBFDF(), WlzThreshold(), WlzToArray1D(), WlzTransposeObj(), WlzUnionN(), WlzValuesFromCoords(), and WlzWriteObj().
WlzErrorNum WlzEndGreyScan | ( | WlzIntervalWSpace * | iwsp, |
WlzGreyWSpace * | gwsp | ||
) |
This must be called when a grey workspace is no longer required as it frees resources of the workspace.
iwsp | Interval scanning workspace. |
gwsp | Grey value table scanning workspace. |
References _WlzValues::core, _WlzIntervalWSpace::gryptr, _WlzGreyWSpace::gtable, _WlzValues::t, _WlzGreyWSpace::tvb, _WlzTiledValues::type, _WlzTiledValueBuffer::valid, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WlzFreeTiledValueBuffer(), WlzGreyTableIsTiled(), and WlzTiledValueBufferFlush().
Referenced by WlzAffineTransformGMShell(), WlzCbThreshold(), WlzCentrality(), WlzCentreOfMassVtx3D(), WlzClassValCon4(), WlzCMeshCurvToImage(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCompoundToRGBA(), WlzCutObjToValBox2D(), WlzFilterNObjValues(), WlzGaussNoise(), WlzGetProjectionFromObject(), WlzGreyIncValues2D(), WlzGreyRange(), WlzGreySetHilbertRankValues(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreySize(), WlzGreyTransfer(), WlzHistogramMapValues(), WlzIndexToRGBA(), WlzIntRescaleObj(), WlzIterateWSpFree(), WlzLUTTransformObj(), WlzNObjGreyStats(), WlzPrincipalAngle(), WlzProjectObjToPlane(), WlzRankFilter(), WlzRGBAModGradient(), WlzRGBAToChannel(), WlzSampleObjPoint2D(), WlzSampleValuesAndCoords(), WlzScalarMulAdd(), WlzSepFilter(), WlzThreshold(), WlzToArray1D(), WlzTransposeObj(), and WlzWriteObj().
WlzErrorNum WlzInitGreyRasterScan | ( | WlzObject * | obj, |
WlzIntervalWSpace * | iwsp, | ||
WlzGreyWSpace * | gwsp, | ||
WlzRasterDir | raster, | ||
int | tranpl | ||
) |
As WlzInitGreyScan(), but with choice of raster direction and transplanting,.
obj | Input object to be scanned. |
iwsp | Interval scanning workspace. |
gwsp | Grey value table scanning workspace. |
raster | Direction for the raster scan. |
tranpl | Flag to allow overwriting of grey-values. |
References WLZ_ERR_NONE, WlzInitGreyWSpace(), and WlzInitRasterScan().
Referenced by WlzInitGreyScan(), WlzIterate(), WlzRsvFilterBuffer(), and WlzSeqPar().
WlzErrorNum WlzInitGreyWSpace | ( | WlzObject * | obj, |
WlzIntervalWSpace * | iwsp, | ||
WlzGreyWSpace * | gwsp, | ||
int | tranpl | ||
) |
Attach grey workspace to interval scanning workspace.
obj | Object to be scanned. |
iwsp | Interval scanning workspace. |
gwsp | Value table scanning workspace. |
tranpl | Flag to enable value transplanting. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzGreyWSpace::gdomaintype, _WlzGreyWSpace::gline, _WlzIntervalWSpace::gryptr, _WlzGreyWSpace::gtable, _WlzValues::i, _WlzGreyWSpace::intptr, _WlzRagRValues::line1, _WlzIntervalValues::line1, _WlzIntervalWSpace::linpos, _WlzGreyWSpace::pixeltype, _WlzTiledValueBuffer::pl, _WlzValues::t, _WlzGreyWSpace::tranpl, _WlzGreyWSpace::tvb, _WlzRagRValues::type, _WlzValues::v, _WlzObject::values, _WlzIntervalValues::vil, _WlzRagRValues::vtblines, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PARAM_NULL, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_TAB_INTL, WLZ_GREY_TAB_RAGR, WLZ_GREY_TAB_RECT, WLZ_GREY_TAB_TILED, WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), and WlzMakeTiledValueBuffer().
Referenced by WlzInitGreyRasterScan().
WlzErrorNum WlzNextGreyInterval | ( | WlzIntervalWSpace * | iwsp | ) |
Obtain next interval and its grey table.
Note - cryptic documentation: If tranpl and gvio=0 and scan already started (check line number) then the previous grey interval must be collected, if tranpl and gvio=1 then must output this interval (unless scan finished).
iwsp | Interval scanning workspace - this must be initialised. |
References _WlzIntervalWSpace::gryptr, _WlzGreyWSpace::gvio, _WlzIntervalWSpace::linbot, _WlzIntervalWSpace::lineraster, _WlzIntervalWSpace::linpos, _WlzGreyWSpace::tranpl, WLZ_ERR_NONE, WlzGreyInterval(), and WlzNextInterval().
Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzCbThreshold(), WlzCentrality(), WlzCentreOfMassVtx3D(), WlzClassValCon4(), WlzCMeshCurvToImage(), WlzCMeshStrainTensorAtPts(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCompDispIncGrey(), WlzCompoundArrayToScalar(), WlzCompoundToRGBA(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzConvertPix(), WlzCopyObjectGreyValues(), WlzCutObjToValBox2D(), WlzEffReadObjTiff(), WlzEffWriteObjJpeg(), WlzFilterNObjValues(), WlzGaussNoise(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGreyDitherObj(), WlzGreyIncValues2D(), WlzGreyInvertMinMax(), WlzGreyMask(), WlzGreyMeanDifference(), WlzGreyModGradient(), WlzGreyRange(), WlzGreyScale(), WlzGreySetHilbertRankValues(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreyShift(), WlzGreySize(), WlzGreyTemplate(), WlzGreyTransfer(), WlzHistogramMapValues(), WlzIndexToRGBA(), WlzIntersectN(), WlzIntRescaleObj(), WlzIterate(), WlzLUTTransformObj(), WlzMass(), WlzNewGrey(), WlzNObjGreyStats(), WlzPrincipalAngle(), WlzProjectObjToPlane(), WlzRankFilter(), WlzRegConCalcRCC(), WlzRGBAModGradient(), WlzRGBAModulusRange(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzRGBChanRatio(), WlzRsvFilterBuffer(), WlzSampleObjPoint2D(), WlzSampleValuesAndCoords(), WlzScalarBinaryOp(), WlzScalarFn(), WlzScalarMulAdd(), WlzSepFilter(), WlzSepTrans(), WlzSeqPar(), WlzShadeCorrectBFDF(), WlzThreshold(), WlzToArray1D(), WlzTransposeObj(), WlzUnionN(), WlzValuesFromCoords(), and WlzWriteObj().
WlzErrorNum WlzGreyInterval | ( | WlzIntervalWSpace * | iwsp | ) |
Handle grey table for an interval. This must follow a call to WlzNextInterval().
iwsp | Interval scaning workspace. |
References _WlzIntervalWSpace::colrmn, _WlzGreyP::dbp, _WlzTiledValues::dim, _WlzGreyP::flp, _WlzGreyWSpace::gdomaintype, _WlzGreyWSpace::gline, _WlzIntervalWSpace::gryptr, _WlzGreyWSpace::gtable, _WlzGreyWSpace::gvio, _WlzValues::i, _WlzGreyP::inp, _WlzTiledValueBuffer::kl, _WlzRagRValues::kol1, _WlzRectValues::kol1, _WlzIntervalValues::kol1, _WlzTiledValues::kol1, _WlzIntervalWSpace::lftpos, _WlzRectValues::line1, _WlzTiledValues::line1, _WlzIntervalWSpace::lineraster, _WlzIntervalWSpace::linpos, _WlzTiledValueBuffer::ln, _WlzTiledValueBuffer::lnbuf, _WlzIntervalWSpace::nwlpos, _WlzGreyWSpace::pixeltype, _WlzTiledValueBuffer::pl, _WlzTiledValues::plane1, _WlzIntervalWSpace::plnpos, _WlzValues::r, _WlzGreyP::rgbp, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzValues::t, _WlzGreyWSpace::tranpl, _WlzGreyWSpace::tvb, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyP::v, _WlzValues::v, _WlzTiledValueBuffer::valid, _WlzValueLine::values, _WlzRectValues::values, _WlzValueLine::vkol1, _WlzValueLine::vlastkl, _WlzValueIntervalLine::vtbint, _WlzRectValues::width, WLZ_CLAMP, WLZ_ERR_GREY_TYPE, WLZ_ERR_INT_DATA, 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, WlzTiledValueBufferFill(), and WlzTiledValueBufferFlush().
Referenced by WlzNextGreyInterval(), and WlzSeqPar().
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.
in | Input domain object. |
dstErr | Destination 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.
obj | Input domain object. |
rVal | Minimum rank value on input and maximum rank value on output, NULL is equivalent to zero minimum rank value. |
References AlcFree(), AlcMalloc(), ALG_MAX, ALG_MAX3, AlgBitMostSigSet(), AlgHilbertIndex(), AlgSort(), _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzDomain::i, _WlzGreyP::inp, _WlzGreyV::inv, _WlzIntervalDomain::kol1, _WlzPlaneDomain::kol1, _WlzIntervalDomain::lastkl, _WlzPlaneDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalWSpace::lftpos, _WlzIntervalDomain::line1, _WlzPlaneDomain::line1, _WlzIntervalWSpace::linpos, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::plist, _WlzIntervalWSpace::rgtpos, _WlzPixelV::type, _WlzObject::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_RASTERDIR_ILIC, WlzArea(), WlzEndGreyScan(), WlzFreeObj(), WlzFreeValues(), WlzFreeVoxelValueTb(), WlzGreyTableIsTiled(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzInitRasterScan(), WlzMakeMain(), WlzNewValuesVox(), WlzNewValueTb(), WlzNextGreyInterval(), WlzNextInterval(), and WlzVolume().
Referenced by WlzMakeTiledValuesObj2D(), and WlzMakeTiledValuesObj3D().
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.
in | Input domain object. |
dstErr | Destination 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.
obj | The given object. |
gVal | Pointer to current value, this is incremented in place. If NULL then the values will be incremented from zero. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzIterateWSpace::gP, _WlzGreyP::inp, _WlzGreyV::inv, _WlzObject::plist, _WlzPixelV::type, _WlzObject::type, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_GREY_INT, WLZ_GREY_TAB_RAGR, WLZ_RASTERDIR_IPILIC, WlzFreeObj(), WlzFreeValues(), WlzFreeVoxelValueTb(), WlzGreyTypeFromObj(), WlzGreyValueTableType(), WlzIterate(), WlzIterateInit(), WlzIterateWSpFree(), WlzMakeMain(), WlzNewValuesVox(), and WlzNewValueTb().
Referenced by WlzMakeTiledValuesObj2D(), and WlzMakeTiledValuesObj3D().
WlzErrorNum WlzGreySetValue | ( | WlzObject * | obj, |
WlzPixelV | val | ||
) |
Set the grey value of every pixel/voxel to the given value.
obj | Input object. |
val | New grey value. |
References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzDomain::i, _WlzGreyP::inp, _WlzGreyV::inv, _WlzPlaneDomain::lastpl, _WlzValues::obj, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, 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_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzAssignObject(), WlzEndGreyScan(), WlzFreeObj(), WlzGreyTableIsTiled(), WlzInitGreyScan(), WlzMakeMain(), WlzNextGreyInterval(), and WlzValueConvertPixel().
Referenced by WlzCMeshTransformManyObjAsIdx(), WlzDistanceTransform(), WlzDomainOccupancy(), WlzEffWriteObjTiff(), WlzFilterNObjValues(), WlzGreyTemplate(), WlzGreyTransfer(), WlzNewObjectValues(), WlzNObjGreyStats(), and WlzValuesFromCoords().
WlzObject* WlzGreyTemplate | ( | WlzObject * | obj, |
WlzObject * | tmpl, | ||
WlzPixelV | tmplVal, | ||
WlzErrorNum * | dstErr | ||
) |
tmpl
but values in the intersection with obj
set to those of the object. Returns NULL on error. obj | Input object to which the template is applied |
tmpl | Template object |
tmplVal | Template value for regions in the template not in the original object |
dstErr | Error return. |
References _WlzDomain::b, _WlzVoxelValues::bckgrnd, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::inp, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastpl, _WlzPlaneDomain::line1, _WlzValues::obj, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzDomain::poly, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_2D_POLYGON, WLZ_3D_DOMAINOBJ, WLZ_BOUNDLIST, 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_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_BOUNDLIST, WLZ_PLANEDOMAIN_CONV_HULL, WLZ_PLANEDOMAIN_DOMAIN, WLZ_PLANEDOMAIN_POLYGON, WLZ_SIMPLE_FILL, WLZ_TRANS_OBJ, WlzAssignDomain(), WlzAssignObject(), WlzAssignValues(), WlzBoundToObj(), WlzConvertPix(), WlzFreeObj(), WlzFreeValues(), WlzGetBackground(), WlzGreySetValue(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzIntersect2(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzNewValueTb(), WlzNextGreyInterval(), and WlzPolyToObj().
Referenced by WlzOffsetDist(), and WlzRegConCalcRCC().
WlzObject* WlzGreyTransfer | ( | WlzObject * | dObj, |
WlzObject * | sObj, | ||
int | inplace, | ||
WlzErrorNum * | dstErr | ||
) |
Transfers grey values from the source object to the destination object within the intersection of the source and destination. Grey values within the destination object outside of the source object are unchanged. It is an error if either object has a different dimension or grey value type, except for when either is an empty object.
dObj | Destination object which may be empty, but otherwise should be of the same dimension as the source object with valid values.. |
sObj | Source object which if not empty must have both a valid domain and valid values. |
inplace | Overwrite the destination object's values if non zero. |
dstErr | Destination error pointer, may be NULL. |
References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzObject::plist, _WlzObject::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzValues::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_VALUES_NULL, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WlzAssignValues(), WlzCopyObject(), WlzEndGreyScan(), WlzFreeObj(), WlzGetBackground(), WlzGreySetValue(), WlzGreyTableIsTiled(), WlzGreyTypeFromObj(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzIntersect2(), WlzIsEmpty(), WlzMakeEmpty(), WlzMakeMain(), WlzNewValuesVox(), WlzNewValueTb(), WlzNextGreyInterval(), and WlzValueCopyGreyToGrey().
Referenced by WlzBuildObj3(), and WlzInteriority().
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.
gVWSp | grey-value work space |
plane | plane coordinate |
line | line coordinate |
kol | column coordinate |
References _WlzGreyValueWSpace::bkdFlag, _WlzValues::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzGreyValueWSpace::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzGreyValueWSpace::gBkd, _WlzGreyValueWSpace::gPtr, _WlzGreyValueWSpace::gTabType, _WlzGreyValueWSpace::gTabType2D, _WlzGreyValueWSpace::gTabTypes3D, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzValues::i, _WlzGreyValueWSpace::iDom2D, _WlzInterval::ileft, _WlzTiledValues::indices, _WlzGreyP::inp, _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzGreyV::inv, _WlzGreyValueWSpace::invTrans, _WlzInterval::iright, _WlzIntervalDomain::kol1, _WlzRagRValues::kol1, _WlzRectValues::kol1, _WlzIntervalValues::kol1, _WlzTiledValues::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzPlaneDomain::lastpl, _WlzIntervalDomain::line1, _WlzRagRValues::line1, _WlzRectValues::line1, _WlzIntervalValues::line1, _WlzTiledValues::line1, _WlzGreyP::lnp, _WlzGreyV::lnv, _WlzTiledValues::nIdx, _WlzIntervalLine::nintvs, _WlzValueIntervalLine::nintvs, _WlzTiledValues::numTiles, _WlzGreyValueWSpace::objType, _WlzDomain::p, _WlzGreyValueWSpace::plane, _WlzPlaneDomain::plane1, _WlzTiledValues::plane1, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzValues::t, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzIntervalDomain::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzValues::v, _WlzValueLine::values, _WlzRectValues::values, _WlzVoxelValues::values, _WlzGreyValueWSpace::values, _WlzGreyValueWSpace::values2D, _WlzIntervalValues::vil, _WlzValueLine::vkol1, _WlzValueLine::vlastkl, _WlzValues::vox, _WlzTiledValues::vpe, _WlzValueIntervalLine::vtbint, _WlzRagRValues::vtblines, _WlzIVertex2::vtX, _WlzDVertex2::vtX, _WlzIVertex3::vtX, _WlzDVertex3::vtX, _WlzIVertex2::vtY, _WlzDVertex2::vtY, _WlzIVertex3::vtY, _WlzDVertex3::vtY, _WlzIVertex3::vtZ, _WlzDVertex3::vtZ, _WlzRectValues::width, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, 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_INTERVALDOMAIN_RECT, WLZ_NULL, WlzAffineTransformVertexD2(), WlzAffineTransformVertexD3(), and WlzGreyValueGet().
Referenced by WlzGreyValueMixing_s().
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.
fn | The kriging function data stucture to be set. |
type | Kriging model function type. |
c0 | Nugget (offset) parameter. |
c1 | Sill (slope) parameter. |
a | Range 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, WLZ_KRIG_MODELFN_SPHERICAL, WlzKrigModelFnExponential(), WlzKrigModelFnGaussian(), WlzKrigModelFnLinear(), WlzKrigModelFnNugget(), WlzKrigModelFnQuadratic(), and WlzKrigModelFnSpherical().
Referenced by WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), and WlzCMeshToDomObjValues().
double WlzKrigModelFnLinear | ( | WlzKrigModelFn * | f, |
double | h | ||
) |
A linear kriging variance model.
\[ \left\{ \begin{array}{ll} h < a & \gamma(h) = c_0 + \frac{(c_1 - c_0)}{a} h \\ h \geq a & \gamma(h) = c_1 \end{array} \right. \]
.
f | The kriging function data stucture. |
h | Function input value. |
References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, and _WlzKrigModelFn::c1.
Referenced by WlzKrigSetModelFn().
double WlzKrigModelFnSpherical | ( | WlzKrigModelFn * | f, |
double | h | ||
) |
A spherical kriging variance model.
\[ \left\{ \begin{array}{ll} 0 < h \leq a & \gamma(h) = c_0 + c_1 \frac{1}{2} (\frac{3h}{a} - \frac{h^3}{a^3}) \\ h > a & \gamma(h) = c_0 + c_1 \end{array} \right. \]
.
f | The kriging function data stucture. |
h | Function input value. |
References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, and _WlzKrigModelFn::c1.
Referenced by WlzKrigSetModelFn().
double WlzKrigModelFnExponential | ( | WlzKrigModelFn * | f, |
double | h | ||
) |
An exponential kriging variance model.
\[ \gamma(h) = c_0 + c_1(1 - e^{-\frac{h}{a}}) \]
.
f | The kriging function data stucture. |
h | Function input value. |
References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, and _WlzKrigModelFn::c1.
Referenced by WlzKrigSetModelFn().
double WlzKrigModelFnGaussian | ( | WlzKrigModelFn * | f, |
double | h | ||
) |
A Gaussian kriging variance model.
\[ \gamma(h) = c_0 + c_1(1 - e^{-(\frac{h}{a})^2}) \]
.
f | The kriging function data stucture. |
h | Function input value. |
References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, and _WlzKrigModelFn::c1.
Referenced by WlzKrigSetModelFn().
double WlzKrigModelFnQuadratic | ( | WlzKrigModelFn * | f, |
double | h | ||
) |
A Quadratic kriging variance model.
\[ \gamma(h) = c_0 + c_1 \left( \frac{ (\frac{h}{a})^2} {1 + (\frac{h}{a})^2} \right) \]
.
f | The kriging function data stucture. |
h | Function input value. |
References _WlzKrigModelFn::a, _WlzKrigModelFn::c0, and _WlzKrigModelFn::c1.
Referenced by WlzKrigSetModelFn().
WlzErrorNum WlzKrigOSetModelSV2D | ( | AlgMatrix | modelSV, |
WlzKrigModelFn * | modelFn, | ||
int | n, | ||
WlzDVertex2 * | nbr, | ||
int * | wSp | ||
) |
Computes the ordinary kriging model semi-variogram from the given neighbourhood vertices.
modelSV | Valid \((n + 1)\times(n + 1)\) matrix for the model semi-variogram. This must be a square matrix. |
modelFn | The model value function. |
n | Number of neighbourhood vertices. |
nbr | The neighbourhood vertex positions. |
wSp | Workspace with room for n values (used by AlgMatrixLUDecomp()). |
References ALG_MATRIX_RECT, AlgMatrixLUDecompRaw(), _AlgMatrixRect::array, _AlgMatrix::core, _WlzKrigModelFn::fn, _AlgMatrixCore::nC, _AlgMatrixCore::nR, _AlgMatrix::rect, _AlgMatrixCore::type, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_PARAM_TYPE, WLZ_VTX_2_LENGTH, WLZ_VTX_2_SUB, and WlzErrorFromAlg().
Referenced by WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), and WlzCMeshToDomObjValues().
WlzErrorNum WlzKrigOSetModelSV3D | ( | AlgMatrix | modelSV, |
WlzKrigModelFn * | modelFn, | ||
int | n, | ||
WlzDVertex3 * | nbr, | ||
int * | wSp | ||
) |
Computes the ordinary kriging model semi-variogram from the given neighbourhood vertices.
modelSV | Valid \((n + 1)\times(n + 1)\) matrix for the model semi-variogram. This must be a square matrix. |
modelFn | The model value function. |
n | Number of neighbourhood vertices. |
nbr | The neighbourhood vertex positions. |
wSp | Workspace with room for n values (used by AlgMatrixLUDecomp()). |
References ALG_MATRIX_RECT, AlgMatrixLUDecompRaw(), _AlgMatrixRect::array, _AlgMatrix::core, _WlzKrigModelFn::fn, _AlgMatrixCore::nC, _AlgMatrixCore::nR, _AlgMatrix::rect, _AlgMatrixCore::type, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_PARAM_TYPE, WLZ_VTX_3_LENGTH, WLZ_VTX_3_SUB, and WlzErrorFromAlg().
Referenced by WlzCMeshProduct().
WlzErrorNum WlzKrigOSetPosSV2D | ( | double * | posSV, |
WlzKrigModelFn * | modelFn, | ||
int | n, | ||
WlzDVertex2 * | nbr, | ||
WlzDVertex2 | pos | ||
) |
Computes the ordinary kriging position semi-variogram from the given neighbourhood vertices and the given position vertex.
posSV | Valid \((n + 1)\) column vector for the position semi-variogram. |
modelFn | The model value function. |
n | Number of neighbourhood vertices. |
nbr | The neighbourhood vertex positions. |
pos | The given position. |
References _WlzKrigModelFn::fn, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_VTX_2_LENGTH, and WLZ_VTX_2_SUB.
Referenced by WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), and WlzCMeshToDomObjValues().
WlzErrorNum WlzKrigOSetPosSV3D | ( | double * | posSV, |
WlzKrigModelFn * | modelFn, | ||
int | n, | ||
WlzDVertex3 * | nbr, | ||
WlzDVertex3 | pos | ||
) |
Computes the ordinary kriging position semi-variogram from the given neighbourhood vertices and the given position vertex.
posSV | Valid \((n + 1)\) column vector for the position semi-variogram. |
modelFn | The model value function. |
n | Number of neighbourhood vertices. |
nbr | The neighbourhood vertex positions. |
pos | The given position. |
References _WlzKrigModelFn::fn, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_VTX_3_LENGTH, and WLZ_VTX_3_SUB.
Referenced by WlzCMeshProduct().
WlzErrorNum WlzKrigOWeightsSolve | ( | AlgMatrix | modelSV, |
double * | posSV, | ||
int * | wSp, | ||
double | eps | ||
) |
Computes the ordinary kriging weights from the model and position semi-variograms.
modelSV | Valid \((n + 1)\times(n + 1)\) matrix containing the model semi-variogram. |
posSV | Valid \((n + 1)\) column vector containing the position semi-variogram and on return containing the weights. |
wSp | Workspace for AlgMatrixLUBackSub() with space for modelSV.core->nR values. |
eps | Epsilon value used to test for position semi-variogram value zero. |
References ALG_MATRIX_RECT, AlgMatrixLUBackSub(), _AlgMatrix::core, _AlgMatrixCore::nR, _AlgMatrixCore::type, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, WLZ_ERR_PARAM_TYPE, and WlzErrorFromAlg().
Referenced by WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), and WlzCMeshToDomObjValues().
WlzErrorNum WlzKrigReallocBuffers2D | ( | WlzDVertex2 ** | dstNbrPosBuf, |
double ** | dstPosSV, | ||
int ** | dstWSp, | ||
AlgMatrix * | dstModelSV, | ||
int * | dstMaxKrigBuf, | ||
int | nNbrC, | ||
int | nNbrL | ||
) |
A convinience function for allocating and reallocating the buffers needed for 2D kriging. All given pointers must be valid and on the first call all pointer values (eg *dstNbrPosBuf) must be NULL.
dstNbrPosBuf | Destination pointer for the neighbourhood position buffer. |
dstPosSV | Destination pointer for the position vector. |
dstWSp | Destination pointer for kriging matrix workspace. |
dstModelSV | Destination pointer for kriging model matrix. |
dstMaxKrigBuf | Destination pointer for the maximum number of neighbours the buffers have been reallocated for. |
nNbrC | Current number of neighbours. |
nNbrL | Last number of neighbours. |
References AlcRealloc(), ALG_MATRIX_RECT, AlgMatrixFree(), AlgMatrixNew(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), and WlzCMeshToDomObjValues().
WlzErrorNum WlzKrigReallocBuffers3D | ( | WlzDVertex3 ** | dstNbrPosBuf, |
double ** | dstPosSV, | ||
int ** | dstWSp, | ||
AlgMatrix * | dstModelSV, | ||
int * | dstMaxKrigBuf, | ||
int | nNbrC, | ||
int | nNbrL | ||
) |
A convinience function for allocating and reallocating the buffers needed for 3D kriging. All given pointers must be valid and on the first call all pointer values (eg *dstNbrPosBuf) must be NULL.
dstNbrPosBuf | Destination pointer for the neighbourhood position buffer. |
dstPosSV | Destination pointer for the position vector. |
dstWSp | Destination pointer for kriging matrix workspace. |
dstModelSV | Destination pointer for kriging model matrix. |
dstMaxKrigBuf | Destination pointer for the maximum number of neighbours the buffers have been reallocated for. |
nNbrC | Current number of neighbours. |
nNbrL | Last number of neighbours. |
References AlcRealloc(), ALG_MATRIX_RECT, AlgMatrixFree(), AlgMatrixNew(), WLZ_ERR_MEM_ALLOC, and WLZ_ERR_NONE.
Referenced by WlzCMeshProduct().
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.
obj | Input domain object with value type WLZ_GREY_RGBA |
colSpc | The colour space. |
dstErr | Destination error ponyer, may be NULL. |
References _WlzVoxelValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzVoxelValues::lastpl, _WlzIntervalWSpace::lftpos, _WlzCompoundArray::o, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::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, WlzAssignDomain(), WlzAssignObject(), WlzAssignValues(), WlzFreeObj(), WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyTableTypeToTableType(), WlzGreyTypeFromObj(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeCompoundArray(), WlzMakeEmpty(), WlzMakeMain(), WlzMakeVoxelValueTb(), 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.
cmpnd | Compound array object. |
colSpc | The colour space. |
dstErr | Destination error pointer may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzCompoundArray::n, _WlzCompoundArray::o, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzPixelV::type, _WlzObject::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_COMPOUND_ARR_2, WLZ_EMPTY_OBJ, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_DATA, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_ERR_VALUES_TYPE, WLZ_GREY_RGBA, WLZ_GREY_TAB_RAGR, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_RGBA_RGBA_SET, WLZ_RGBA_SPACE_CMY, WLZ_RGBA_SPACE_HSB, WLZ_RGBA_SPACE_RGB, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzBoundingBox3I(), WlzEndGreyScan(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeVoxelValueTb(), WlzGetBackground(), WlzGreyTableIsTiled(), WlzGreyValueFreeWSp(), WlzGreyValueGet(), WlzGreyValueMakeWSp(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeCompoundArray(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzNewValueTb(), WlzNextGreyInterval(), WlzUnionN(), WlzValueConvertPixel(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
Referenced by WlzRGBAGreyScale(), WlzRGBAImageArithmetic(), and WlzRGBAScalarBinaryOp().
WlzObject* WlzRGBAToModulus | ( | WlzObject * | obj, |
WlzErrorNum * | dstErr | ||
) |
Calculate the modulus of the rgb values and return in an image of grey type WLZ_GREY_SHORT.
obj | Input rgba object |
dstErr | error return |
References _WlzVoxelValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzVoxelValues::lastpl, _WlzIntervalWSpace::lftpos, _WlzPlaneDomain::line1, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzGreyV::shv, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::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_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_RGBA_MODULUS, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeVoxelValueTb(), WlzGetBackground(), WlzGreyTableTypeToTableType(), WlzGreyTypeFromObj(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeEmpty(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzNewValueTb(), and WlzNextGreyInterval().
Referenced by main(), and WlzGetPatchTreeToDepth().
WlzObject* WlzIndexToRGBA | ( | 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.
obj | Input object to be converted |
colormap | Colourmap array |
dstErr | Error return |
References _WlzObject::assoc, _WlzVoxelValues::bckgrnd, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzDomain::i, _WlzGreyP::inp, _WlzGreyV::inv, _WlzPlaneDomain::kol1, _WlzPlaneDomain::lastkl, _WlzPlaneDomain::lastln, _WlzPlaneDomain::lastpl, _WlzVoxelValues::lastpl, _WlzPlaneDomain::line1, _WlzVoxelValues::original_table, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzVoxelValues::plane1, _WlzObject::plist, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzPixelV::type, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_CLAMP, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VOXELVALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_RGBA_RGBA_SET, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzEndGreyScan(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeVoxelValueTb(), WlzGetBackground(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), WlzGreyValueTableType(), WlzInitGreyScan(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeVoxelValueTb(), WlzNewValueTb(), and WlzNextGreyInterval().
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.
obj | Input rgba woolz object |
width | width of gradient operator |
dstErr | error return |
References _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzGreyP::inp, _WlzCompoundArray::o, _WlzGreyP::shp, _WlzGreyV::shv, _WlzPixelV::type, _WlzObject::type, _WlzCompoundArray::type, _WlzCoreValues::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzPixelV::v, _WlzValues::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, WlzEndGreyScan(), WlzFreeObj(), WlzGauss2(), WlzGreyModGradient(), WlzGreyTableTypeToGreyType(), WlzGreyValueTableType(), 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.
pixVal | input pixel value structure |
chan | requested pixel channel |
dstErr | error destination |
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().
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.
obj | Given object with RGBA values. |
min | Destination pointer for minimum value. |
max | Destination pointer for maximum value. |
References _WlzObject::assoc, _WlzIntervalWSpace::colrmn, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzValues::obj, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::plist, _WlzGreyP::rgbp, _WlzObject::type, _WlzPlaneDomain::type, _WlzCoreValues::type, _WlzVoxelValues::type, _WlzGreyWSpace::u_grintptr, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_OBJ, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_ERR_VOXELVALUES_TYPE, WLZ_PLANEDOMAIN_DOMAIN, WLZ_RGBA_MODULUS, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzGreyTableIsTiled(), WlzInitGreyScan(), and WlzNextGreyInterval().
int WlzTiledValuesMode | ( | WlzTiledValues * | tv, |
WlzErrorNum * | dstErr | ||
) |
Determines how the tiled values of a tiles value table may be used. If memory mapping is in use then the mode in which the file (containing the memory mapped values) was opened determines the modes in which the tiled values can be accessed. Inappropriate access (eg attempting to change a grey value in a memory mapped tiled values table that was opened for read only) will generate a memory fault. The returned value is a bit mask in which WLZ_IOFLAGS_READ will be set iff grey values can be read and WLZ_IOFLAGS_WRITE will be set iff the grey values can be written to (ie modified).
tv | The given tiled values. |
dstErr | Destination error pointer, may be NULL. |
References _WlzTiledValues::fd, _WlzTiledValues::tiles, _WlzTiledValues::type, _WlzGreyP::v, WLZ_ERR_FILE_OPEN, WLZ_ERR_NONE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_TAB_TILED, WLZ_IOFLAGS_NONE, WLZ_IOFLAGS_READ, WLZ_IOFLAGS_WRITE, and WlzGreyTableIsTiled().
Referenced by WlzMakeTiledValueBuffer().
void WlzTiledValueBufferFlush | ( | WlzTiledValueBuffer * | tvb, |
WlzTiledValues * | tv | ||
) |
Flushes the values in the tiled values buffer to the tiled values table.
tvb | Given tiled values buffer. |
tv | Given tiled values table. |
References _WlzGreyP::dbp, _WlzGreyP::flp, _WlzTiledValueBuffer::gtype, _WlzTiledValues::indices, _WlzGreyP::inp, _WlzTiledValueBuffer::kl, _WlzTiledValueBuffer::li, _WlzTiledValueBuffer::lnbuf, _WlzTiledValueBuffer::lo, _WlzTiledValueBuffer::mode, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzGreyP::ubp, _WlzTiledValueBuffer::valid, _WlzTiledValues::vpe, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, and WLZ_IOFLAGS_WRITE.
Referenced by WlzEndGreyScan(), and WlzGreyInterval().
void WlzTiledValueBufferFill | ( | WlzTiledValueBuffer * | tvb, |
WlzTiledValues * | tv | ||
) |
Fills the tiled values buffer using values from the tiled values table.
tvb | Given tiled values buffer. |
tv | Given tiled values table. |
References _WlzTiledValues::bckgrnd, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzTiledValues::dim, _WlzGreyP::flp, _WlzGreyV::flv, _WlzTiledValueBuffer::gtype, _WlzTiledValues::indices, _WlzGreyP::inp, _WlzGreyV::inv, _WlzTiledValueBuffer::kl, _WlzTiledValueBuffer::li, _WlzTiledValueBuffer::ln, _WlzTiledValueBuffer::lnbuf, _WlzTiledValueBuffer::lo, _WlzTiledValueBuffer::mode, _WlzTiledValues::nIdx, _WlzTiledValueBuffer::pl, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzPixelV::v, _WlzTiledValueBuffer::valid, _WlzTiledValues::vpe, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, and WLZ_IOFLAGS_READ.
Referenced by WlzGreyInterval().
void WlzTiledValuesCopyLine | ( | WlzTiledValues * | tv, |
WlzGreyP | gP, | ||
int | pl, | ||
int | ln, | ||
int | kl1, | ||
int | lkl | ||
) |
Copies a single line of grey values to a tiled value table. This is done within the valid tiles which may lie outside of an object's domain, so care should be used when calling this function. All the given coordinate values are with respect to the tiled value table's origin. If the tiled values have a number of values per element greater than one then the given buffer must have too.
tv | Given tiled value table which must be valid. |
gP | Source grey pointer to grey values of the same type as the tiled value table. |
pl | Plane coordinate. |
ln | Line coordinate. |
kl1 | First column coordinate. |
lkl | Last column coordinate. |
References ALG_MAX, ALG_MIN, _WlzTiledValues::dim, _WlzTiledValues::indices, _WlzTiledValues::kol1, _WlzTiledValues::lastkl, _WlzTiledValues::lastln, _WlzTiledValues::lastpl, _WlzTiledValues::line1, _WlzTiledValues::nIdx, _WlzTiledValues::numTiles, _WlzTiledValues::plane1, _WlzTiledValues::tiles, _WlzTiledValues::tileSz, _WlzTiledValues::tileWidth, _WlzTiledValues::type, _WlzTiledValues::vpe, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_GREY_TABLE_TO_GREY_TYPE, and WlzValueCopyGreyToGrey().
Referenced by WlzFromArray1D().
int WlzTiledValuesValPerElm | ( | WlzTiledValues * | tVal | ) |
Computes the number of values per pixel/voxel for a tiled value table.
The number of values per pixel/voxel which is.\( \prod_i^\textrm{vRank}{\textrm{vDim}[i]} \) (value 1 when vRank = 0). Both WlzTiledValues::vRank and WlzTiledValues::vDim must have been set before calling this function. See also WlzTiledValues::vpe .
tVal | Given tiled value table which must be valid with respect to it's value rank and value dimension. |
References _WlzTiledValues::vDim, and _WlzTiledValues::vRank.
Referenced by WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), and WlzReadObj().
WlzObjectType WlzGreyValueTableType | ( | int | rank, |
WlzGreyTableType | tableType, | ||
WlzGreyType | greyType, | ||
WlzErrorNum * | dstErr | ||
) |
Computes a grey table type from table and grey types. This function is equivalent to the macro WLZ_GREY_TABLE_TYPE but with range checks.
rank | Grey array rank, 0 for a pixel/voxel value table or 1 for value arrays. |
tableType | The basic table type. |
greyType | The grey type. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_VALUES_TYPE, WLZ_GREY_BIT, 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_TABLE_TYPE, WLZ_GREY_UBYTE, and WLZ_NULL.
Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzBuildObj3(), WlzClassValCon4(), WlzCMeshCurvToImage(), WlzCMeshIntersectDom2D5(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCompDispIncGrey(), WlzCompoundArrayToScalar(), WlzCompoundToRGBA(), WlzContourRBFBndObj3D(), WlzConvertPix(), WlzDistanceTransform(), WlzDomainFill3D(), WlzDomainOccupancy(), WlzEffWriteObjNrrd(), WlzFillBlankPlanes(), WlzFilterNObjValues(), WlzFromArray1D(), WlzFromArray3D(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGetSubSectionFromObject(), WlzGreySetHilbertRankValues(), WlzGreySetIncValues(), WlzGreyTemplate(), WlzGreyTransfer(), WlzIndexObjFromCompound(), WlzIndexToRGBA(), WlzInteriority(), WlzIntersectN(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzLUTTransformObj(), WlzMakeCuboid(), WlzMakeRect(), WlzMakeTiledValuesObj2D(), WlzMakeTiledValuesObj3D(), WlzNewGrey(), WlzNObjGreyStats(), WlzReadObj(), WlzRGBAModGradient(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzRGBChanRatio(), WlzRsvFilterBuffer(), WlzSampleObjPoint2D(), WlzScalarBinaryOp2(), WlzScalarFn(), WlzScalarMulAdd(), WlzSepFilter(), WlzSetBackGroundNewObj(), WlzTensorGetComponent(), WlzTransposeObj(), WlzUnionN(), and WlzValuesFromCoords().
WlzGreyType WlzGreyTableTypeToGreyType | ( | WlzObjectType | gTabType, |
WlzErrorNum * | dstErr | ||
) |
Computes the type of grey from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_GREY_TYPE but with range checks.
gTabType | The basic table type. |
dstErr | Destination error pointer, may be NULL. |
References WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, 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_TABLE_TO_GREY_TYPE, WLZ_GREY_TABLE_TO_RANK, WLZ_GREY_TABLE_TO_TABLE_TYPE, and WLZ_GREY_UBYTE.
Referenced by WlzAffineTransformGMShell(), WlzClassValCon4(), WlzCMeshToDomObjValues(), WlzConvertPix(), WlzFillBlankPlanes(), WlzFreeTiledValues(), WlzGetMaskedSectionFromObject(), WlzGreyCrossing(), WlzGreyModGradient(), WlzGreyRange(), WlzGreyTemplate(), WlzGreyTypeFromObj(), WlzGreyValueMakeWSp(), WlzGreyVariance(), WlzIndexToRGBA(), WlzInitGreyWSpace(), WlzIntersectN(), WlzIntRescaleObj(), WlzLaplacian(), WlzMakeIntervalValues(), WlzMakeRectValueTb(), WlzMakeTiledValueBuffer(), WlzMakeTiledValuesTiles(), WlzMakeValueTb(), WlzNewGrey(), WlzNewObjectValueTable(), WlzNewValueTb(), WlzObjectFacts(), WlzPolarSample(), WlzReadObj(), WlzRGBAModGradient(), WlzRsvFilterBuffer(), WlzSampleObj(), WlzSampleObjPoint2D(), WlzScalarBinaryOp2(), WlzSepTrans(), WlzSetBackground(), WlzShadeCorrectBFDF(), WlzSobel(), WlzTensorGetComponent(), WlzTransposeObj(), WlzUnionN(), WlzWindow(), WlzWriteMeshTransform3D(), and WlzWriteObj().
WlzGreyTableType WlzGreyTableTypeToTableType | ( | WlzObjectType | gTabType, |
WlzErrorNum * | dstErr | ||
) |
Computes the type of table from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_TABLE_TYPE but with range checks.
gTabType | The basic table type. |
dstErr | Destination 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_TABLE_TO_GREY_TYPE, WLZ_GREY_TABLE_TO_RANK, WLZ_GREY_TABLE_TO_TABLE_TYPE, and WLZ_GREY_UBYTE.
Referenced by WlzConvertPix(), WlzCopyObjectGreyValues(), WlzGetBackground(), WlzGreyValueMakeWSp(), WlzIndexToRGBA(), WlzInitGreyWSpace(), WlzMakeIntervalValues(), WlzMakeRectValueTb(), WlzMakeValueTb(), WlzNewObjectValueTable(), WlzNewValueTb(), WlzObjectFacts(), WlzReadObj(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzRsvFilterBuffer(), WlzScalarMulAdd(), WlzSetBackground(), WlzShiftValues(), WlzStringFromObjValuesType(), and WlzTransposeObj().
int WlzGreyTableTypeToRank | ( | WlzObjectType | gTabType, |
WlzErrorNum * | dstErr | ||
) |
Computes the rank from a grey table type. This function is equivalent to the macro WLZ_GREY_TABLE_TO_RANK but with range checks.
gTabType | The basic table type. |
dstErr | Destination 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_TABLE_TO_GREY_TYPE, WLZ_GREY_TABLE_TO_RANK, WLZ_GREY_TABLE_TO_TABLE_TYPE, and WLZ_GREY_UBYTE.
Referenced by WlzMakeTiledValuesTiles(), and WlzReadObj().
WlzGreyTableType WlzGreyTableIsTiled | ( | WlzObjectType | gTabType | ) |
Determines whether the grey table type is tiled.
gTabType | The basic table type. |
References WLZ_GREY_TAB_TILED, and WLZ_GREY_TABLE_TO_TABLE_TYPE.
Referenced by WlzCbThreshold(), WlzCentreOfMassVtx3D(), WlzCMeshStrainTensorAtPts(), WlzCMeshTransformObj(), WlzCompDispIncGrey(), WlzCompoundArrayToScalar(), WlzCompoundToRGBA(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzConvertPix(), WlzConvolveObj(), WlzCopyObjectGreyValues(), WlzCopyValues(), WlzCutObjToValBox3D(), WlzDGTensorFeatures(), WlzEndGreyScan(), WlzFilterNObjValues(), WlzFreeObj(), WlzFreeTiledValues(), WlzGaussNoise(), WlzGetBackground(), WlzGetSubSectionFromObject(), WlzGreyDitherObj(), WlzGreyIncValuesInDomain(), WlzGreyInvertMinMax(), WlzGreyMask(), WlzGreyModGradient(), WlzGreyRange(), WlzGreySetHilbertRankValues(), WlzGreySetRange(), WlzGreySetRangeLut(), WlzGreySetValue(), WlzGreyStats(), WlzGreyTemplate(), WlzGreyTransfer(), WlzGreyTypeFromObj(), WlzGreyValueMakeWSp(), WlzImageArithmetic(), WlzIntersectN(), WlzIntRescaleObj(), WlzLUTTransformObj(), WlzMakeTiledValueBuffer(), WlzNewGrey(), WlzNewObjectValueTable(), WlzNObjGreyStats(), WlzObjectFacts(), WlzProjectObjToPlane(), WlzRankFilter(), WlzRGBAModulusRange(), WlzRGBAToCompound(), WlzRGBChanRatio(), WlzRsvFilterObj(), WlzSampleObj(), WlzScalarBinaryOp(), WlzSepTrans(), WlzSeqPar(), WlzShadeCorrectBFDF(), WlzShiftValues(), WlzTensorGetComponent(), WlzTensorSetComponent(), WlzTensorSmooth(), WlzThreshold(), WlzTiledValuesMode(), WlzTransposeObj(), WlzUnionN(), and WlzWriteObj().
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.
obj | Given object. |
dstErr | Destination ptr for error code, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzCoreDomain::type, _WlzCoreValues::type, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_EMPTY_DOMAIN, WLZ_EMPTY_VALUES, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_DATA, WLZ_ERR_VALUES_NULL, WLZ_GREY_ERROR, WlzGreyTableIsTiled(), and WlzGreyTableTypeToGreyType().
Referenced by main(), WlzAffineTransformGMShell(), WlzBuildObj3(), WlzCMeshTransformManyObjAsIdx(), WlzEffReadObjTiff(), WlzEffWriteObjAm(), WlzEffWriteObjJpeg(), WlzEffWriteObjNifti(), WlzEffWriteObjNrrd(), WlzEffWriteObjTxt(), WlzFilterNObjValues(), WlzGauss2(), WlzGaussFilter(), WlzGetPatchTreeToDepth(), WlzGetProjectionFromObject(), WlzGetSubSectionFromObject(), WlzGreySetIncValues(), WlzGreySetRange(), WlzGreyTransfer(), WlzIndexObjToCompound(), WlzLUTTransformObj(), WlzNewObjectValueTable(), WlzPatchTreeToObject(), WlzRankFilter(), WlzRGBAGreyScale(), WlzRGBAImageArithmetic(), WlzRGBAScalarBinaryOp(), WlzRGBAToChannel(), WlzRGBAToCompound(), WlzRGBAToModulus(), WlzSampleValuesAndCoords(), WlzScalarFn(), WlzSepFilter(), WlzShadeCorrectBFDF(), WlzSplitMontageObj(), and WlzTensorSmooth().
WlzDVertex3 WlzVozelSz | ( | WlzObject * | obj, |
WlzErrorNum * | dstErr | ||
) |
Gets the given 3D domain objects voxel size.
obj | Given 3D domain object. |
dstErr | Destination 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.
Referenced by WlzEffWriteObjAm().
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().
ixv | Indexed value table. |
idx | Given index. |
References AlcVectorItemGet(), and _WlzIndexedValues::values.
Referenced by WlzBasisFnSetCMesh2D(), WlzBasisFnSetCMesh3D(), WlzCMeshAffineProduct(), WlzCMeshClosePointDom2D5(), WlzCMeshCompSurfMap(), WlzCMeshComputeCurvaturesFromNodNorm(), WlzCMeshComputeNormalsElm(), WlzCMeshComputeNormalsIxv2D5(), WlzCMeshComputeNormalsNod(), WlzCMeshCurvToImage(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), WlzCMeshExpansion(), WlzCMeshExpValues(), WlzCMeshExtract2D(), WlzCMeshFlatten2D5(), WlzCMeshGetNodesAndEdges(), WlzCMeshIndexMaskFromValueRange(), WlzCMeshIntersect2Mesh2D(), WlzCMeshIntersectDom2D5(), WlzCMeshMeshMeshProduct(), WlzCMeshProduct(), WlzCMeshSetDispFromField(), WlzCMeshStrainTensorAtPts(), WlzCMeshToDomObjValues(), WlzCMeshTransformGetBBox2D(), WlzCMeshTransformGetBBox3D(), WlzCMeshTransformInvert(), WlzCMeshTransformManyObjAsIdx(), WlzCMeshTransformVtxAry2D(), WlzCMeshTransformVtxAry2D5(), WlzCMeshTransformVtxAry2F(), WlzCMeshTransformVtxAry2I(), WlzCMeshTransformVtxAry3D(), WlzCMeshTransformVtxAry3F(), WlzCMeshTransformVtxAry3I(), WlzCMeshValuesNormalise(), WlzCMeshValueTransfer(), WlzCopyValues(), WlzIndexedValueBufWeight(), WlzIndexedValuesSet(), WlzObjectFacts(), WlzReadMeshTransform3D(), and WlzWriteMeshTransform3D().
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().
ixv | Indexed value table. |
idx | Given index. |
References AlcVectorExtendAndGet(), and _WlzIndexedValues::values.
Referenced by WlzBasisFnSetCMesh2D(), WlzBasisFnSetCMesh3D(), WlzCMeshDistance2D(), WlzCMeshDistance3D(), and WlzIndexedValuesSet().
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.
obj | Given object which must be a CMesh object with indexed values. |
cnt | Size of the values to be copied. |
val | Basic value set for the indexed values. Type must be the same as the indexed value table value type. |
References AlcVectorItemGet(), _WlzIndexedValues::attach, _WlzDomain::cm2, _WlzDomain::cm2d5, _WlzDomain::cm3, _WlzDomain::core, _WlzObject::domain, _WlzCMeshRes::elm, _WlzCMeshNod2D::idx, _WlzCMeshNod2D5::idx, _WlzCMeshNod3D::idx, _WlzCMeshElm2D::idx, _WlzCMeshElm2D5::idx, _WlzCMeshElm3D::idx, _WlzCMeshP::m2, _WlzCMeshP::m2d5, _WlzCMeshP::m3, _WlzCMeshEntRes::maxEnt, _WlzCMeshRes::nod, _WlzCMesh2D::res, _WlzCMesh2D5::res, _WlzCMesh3D::res, _WlzObject::type, _WlzIndexedValues::type, _WlzCMesh2D::type, _WlzCMesh3D::type, _WlzObject::values, _WlzCMeshEntRes::vec, WLZ_CMESH_2D, WLZ_CMESH_2D5, WLZ_CMESH_3D, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_INDEXED_VALUES, WLZ_VALUE_ATTACH_ELM, WLZ_VALUE_ATTACH_NOD, WlzIndexedValueExtGet(), WlzIndexedValueGet(), and _WlzValues::x.
Referenced by WlzCMeshTransformFromObj().
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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number of vector elements to be set. |
Referenced by WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzHistogramObj(), WlzSampleObjPoint2D(), 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number of vector elements to be set. |
Referenced by WlzValueSetGrey().
Sets the elements of the given vector to a given value, where the vector type is WlzUByte.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number of vector elements to be set. |
Referenced by WlzCMeshFMarNodes3D(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzRankFilter(), WlzRsvFilterBuffer(), 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number of vector elements to be set. |
Referenced by WlzCMeshFMarNodes2D(), WlzCMeshFMarNodes3D(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzSampleObjPoint2D(), and WlzValueSetGrey().
Sets the elements of the given vector to a given value, where the vector type is rgb-alpha.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number 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.
vec | Vector who's elements are to be set. |
value | Value to use when setting the vector's elements. |
count | Number 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.
vec | Vector who's elements are to be set. |
vecOff | Offset from vec. |
value | Value to use when setting the vector's elements. |
gType | Grey type, ie: int, short.... |
count | Number 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().
Referenced by WlzCMeshValueTransfer(), WlzCutObjToValBox2D(), WlzCutObjToValBox3D(), WlzGetSubSectionFromObject(), and WlzMakeTiledValuesTiles().
WlzGreyP WlzValueSetGreyP | ( | WlzGreyP | base, |
WlzGreyType | gType, | ||
size_t | off | ||
) |
Sets a grey pointer using the given base grey pointer and an offset.
base | Base grey pointer. |
gType | Grey type. |
off | Offset. |
References _WlzGreyP::dbp, _WlzGreyP::flp, _WlzGreyP::inp, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzGreyP::ubp, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, and WLZ_GREY_UBYTE.
Referenced by WlzCutObjToValBox3D().
void WlzValueClampIntToShort | ( | int * | vec, |
size_t | count | ||
) |
Clamps a vector of int values to the limits of short.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzValueConvertPixel().
void WlzValueClampIntToUByte | ( | int * | vec, |
size_t | count | ||
) |
Clamps a vector of int values to the limits of WlzUByte.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzValueConvertPixel().
void WlzValueClampShortToUByte | ( | short * | vec, |
size_t | count | ||
) |
Clamps a vector of short values to the limits of WlzUByte.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzValueConvertPixel().
void WlzValueClampDoubleToInt | ( | double * | vec, |
size_t | count | ||
) |
Clamps a vector of double values to the limits of int.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzToArray3D(), and WlzValueConvertPixel().
void WlzValueClampDoubleToShort | ( | double * | vec, |
size_t | count | ||
) |
Clamps a vector of double values to the limits of short.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzToArray3D(), and WlzValueConvertPixel().
void WlzValueClampDoubleToUByte | ( | double * | vec, |
size_t | count | ||
) |
Clamps a vector of double values to the limits of WlzUByte.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzToArray3D(), and WlzValueConvertPixel().
void WlzValueClampDoubleToRGBA | ( | double * | vec, |
size_t | count | ||
) |
Clamps a vector of double values to the limits of RGBA.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzToArray3D().
void WlzValueClampDoubleToFloat | ( | double * | vec, |
size_t | count | ||
) |
Clamps a vector of double values to the limits of float.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzToArray3D(), and WlzValueConvertPixel().
void WlzValueClampFloatToInt | ( | float * | vec, |
size_t | count | ||
) |
Clamps a vector of float values to the limits of int.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzValueConvertPixel().
void WlzValueClampFloatToShort | ( | float * | vec, |
size_t | count | ||
) |
Clamps a vector of float values to the limits of short.
vec | Vector who's elements are to be clamped. |
count | Number of vector elements. |
Referenced by WlzValueConvertPixel().
void WlzValueClampFloatToUByte | ( | float * | vec, |
size_t | count | ||
) |
Clamps a vector of float values to the limits of WlzUByte.
vec | Vector who's elements are to be clamped. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number 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.
dst | Destination vector. |
src | Source vector. |
count | Number of vector elements. |
References WLZ_RGBA_RGBA_SET.
Referenced by WlzValueClampGreyIntoGrey(), and WlzValueCopyDoubleToRGBA().