Woolz Image Processing
Version 1.7.5
|
Files | |
file | WlzArray.c |
Functions for converting between domain objects and arrays. | |
Functions | |
WlzErrorNum | WlzToBArray2D (WlzIVertex2 *dstSizeArrayDat, WlzUByte ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc bit array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToIArray2D (WlzIVertex2 *dstSizeArrayDat, int ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc int array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToSArray2D (WlzIVertex2 *dstSizeArrayDat, short ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc short array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToUArray2D (WlzIVertex2 *dstSizeArrayDat, WlzUByte ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc unsigned byte array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToFArray2D (WlzIVertex2 *dstSizeArrayDat, float ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts aAlc float array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToDArray2D (WlzIVertex2 *dstSizeArrayDat, double ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc double array from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToRArray2D (WlzIVertex2 *dstSizeArrayDat, unsigned int ***dstArrayDat, WlzObject *srcObj, WlzIVertex2 origin, WlzIVertex2 size, int noiseFlag) |
Extracts a Alc unsigned int array for RGBA values from any Woolz 2D domain object. More... | |
WlzErrorNum | WlzToArray2D (void ***dstP, WlzObject *srcObj, WlzIVertex2 size, WlzIVertex2 origin, int noiseFlag, WlzGreyType dstGreyType) |
Extracts an Alc array from any Woolz 2D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range. More... | |
WlzErrorNum | WlzToBArray3D (WlzIVertex3 *dstSizeArrayDat, WlzUByte ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a bit Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToIArray3D (WlzIVertex3 *dstSizeArrayDat, int ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a int Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToSArray3D (WlzIVertex3 *dstSizeArrayDat, short ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a short Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToUArray3D (WlzIVertex3 *dstSizeArrayDat, WlzUByte ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a unsigned byte Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToFArray3D (WlzIVertex3 *dstSizeArrayDat, float ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a float Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToDArray3D (WlzIVertex3 *dstSizeArrayDat, double ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts a double Alc array from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToRArray3D (WlzIVertex3 *dstSizeArrayDat, unsigned int ****dstArrayDat, WlzObject *srcObj, WlzIVertex3 origin, WlzIVertex3 size, int noiseFlag) |
Extracts an unsigned int Alc array for RGBA values from any Woolz 3D domain object. More... | |
WlzErrorNum | WlzToArray3D (void ****dstP, WlzObject *srcObj, WlzIVertex3 size, WlzIVertex3 origin, int noiseFlag, WlzGreyType dstGreyType) |
Extracts an Alc array from any Woolz 3D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range. More... | |
WlzObject * | WlzFromBArray2D (WlzIVertex2 arraySizeDat, WlzUByte **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromIArray2D (WlzIVertex2 arraySizeDat, int **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromSArray2D (WlzIVertex2 arraySizeDat, short **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromUArray2D (WlzIVertex2 arraySizeDat, WlzUByte **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromFArray2D (WlzIVertex2 arraySizeDat, float **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromDArray2D (WlzIVertex2 arraySizeDat, double **arrayDat, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. More... | |
WlzObject * | WlzFromArray2D (void **arrayP, WlzIVertex2 arraySize, WlzIVertex2 arrayOrigin, WlzGreyType dstGreyType, WlzGreyType srcGreyType, double valOffset, double valScale, int clampFlag, int noCopyFlag, WlzErrorNum *dstErr) |
Creates a Woolz 2D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same. More... | |
WlzObject * | WlzFromBArray3D (WlzIVertex3 arraySizeDat, WlzUByte ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromIArray3D (WlzIVertex3 arraySizeDat, int ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromSArray3D (WlzIVertex3 arraySizeDat, short ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromUArray3D (WlzIVertex3 arraySizeDat, WlzUByte ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromFArray3D (WlzIVertex3 arraySizeDat, float ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromDArray3D (WlzIVertex3 arraySizeDat, double ***arrayDat, WlzIVertex3 arrayOrigin, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. More... | |
WlzObject * | WlzFromArray3D (void ***arrayP, WlzIVertex3 arraySize, WlzIVertex3 arrayOrigin, WlzGreyType dstGreyType, WlzGreyType srcGreyType, double valOffset, double valScale, int clampFlag, int noCopyFlag, WlzErrorNum *dstErr) |
Creates a Woolz 3D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same. More... | |
int | WlzArrayStats3D (void ***arrayP, WlzIVertex3 arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev) |
Calculates simple statistics for the given Alc array. More... | |
int | WlzArrayStats2D (void **arrayP, WlzIVertex2 arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev) |
Calculates simple statistics for the given Alc array. More... | |
int | WlzArrayStats1D (void *arrayP, int arraySize, WlzGreyType greyType, double *dstMin, double *dstMax, double *dstSum, double *dstSumSq, double *dstMean, double *dstStdDev) |
Calculates simple statistics for the given Alc array. More... | |
WlzObject * | WlzFromBArray1D (WlzIVertex2 arraySizeDat, WlzUByte *bitData, WlzIVertex2 arrayOrigin, WlzErrorNum *dstErr) |
Converts a 1D bit array as generated by the Java interfaces to a 2D woolz object. More... | |
WlzObject * | WlzFromArray1D (WlzObjectType oType, WlzIVertex3 sz, WlzIVertex3 org, WlzGreyType gType, unsigned int vpe, WlzGreyP gDat, int noCopy, WlzErrorNum *dstErr) |
Creates a new 2D or 3D domain object from the given 1D array. The object created is rectangular/cuboid with the given origin and size. The background value of the new object is set to zero. The returned object can be free'd using WlzFreeObj(), irespective of whether the noCopy flag is set, but if an object created with the noCopy flag set is free'd the data must be free'd independently after the returned object. The no copy option was originaly intended for efficient output of Woolz objects to a file in non-Woolz applications. More... | |
WlzErrorNum | WlzToArray1D (WlzGreyP gP, WlzGreyType gType, WlzIBox3 gBufBox, int gOffset, WlzObject *obj) |
Sets values in the given buffer to those of the given object. The given buffer must be large enough to hold the given bounding box of image values. Only values within the domain of the object are set. More... | |
WlzErrorNum WlzToBArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
WlzUByte *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc bit array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, and WlzToArray2D().
WlzErrorNum WlzToIArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
int *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc int array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_INT, and WlzToArray2D().
WlzErrorNum WlzToSArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
short *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc short array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_SHORT, and WlzToArray2D().
WlzErrorNum WlzToUArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
WlzUByte *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc unsigned byte array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_UBYTE, and WlzToArray2D().
WlzErrorNum WlzToFArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
float *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts aAlc float array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_FLOAT, and WlzToArray2D().
WlzErrorNum WlzToDArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
double *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc double array from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_DOUBLE, and WlzToArray2D().
WlzErrorNum WlzToRArray2D | ( | WlzIVertex2 * | dstSizeArrayDat, |
unsigned int *** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex2 | origin, | ||
WlzIVertex2 | size, | ||
int | noiseFlag | ||
) |
Extracts a Alc unsigned int array for RGBA values from any Woolz 2D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_RGBA, and WlzToArray2D().
WlzErrorNum WlzToArray2D | ( | void *** | dstP, |
WlzObject * | srcObj, | ||
WlzIVertex2 | size, | ||
WlzIVertex2 | origin, | ||
int | noiseFlag, | ||
WlzGreyType | dstGreyType | ||
) |
Extracts an Alc array from any Woolz 2D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range.
dstP | Destination pointer (assumed valid if *dstP is non-NULL). |
srcObj | Given Woolz object. |
size | Size of array. |
origin | Array origin wrt given object. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
dstGreyType | Destination array data type. |
References ALC_ER_NONE, AlcBit2Malloc(), AlcFree(), AlcFreeStackPop(), AlcMalloc(), _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzGreyP::flp, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, _WlzValues::r, _WlzGreyP::rgbp, _WlzIntervalWSpace::rgtpos, _WlzGreyP::shp, _WlzObject::type, _WlzGreyP::ubp, _WlzObject::values, _WlzRectValues::values, _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_2D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_2, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_RASTERDIR_ILIC, WlzBitLnSetItv(), WlzCutObjToValBox2D(), WlzFreeObj(), WlzGreyStats(), WlzInitRasterScan(), WlzNextInterval(), _WlzIBox2::xMax, _WlzIBox2::xMin, _WlzIBox2::yMax, and _WlzIBox2::yMin.
Referenced by WlzAutoCor(), WlzContourFromPoints(), WlzContourGrdObj2D(), WlzContourRBFBndObj3D(), WlzEffWriteObjAnl(), WlzEffWriteObjNifti(), WlzEffWriteObjNrrd(), WlzFourierTransformObj(), WlzImageBlendObjToBufRGBA(), WlzMakeTiledValuesObj2D(), WlzRankFilter(), WlzRegCCorObjs(), WlzToArray1D(), WlzToBArray2D(), WlzToDArray2D(), WlzToFArray2D(), WlzToIArray2D(), WlzToRArray2D(), WlzToSArray2D(), and WlzToUArray2D().
WlzErrorNum WlzToBArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
WlzUByte **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a bit Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc bit array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, and WlzToArray3D().
WlzErrorNum WlzToIArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
int **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a int Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc int array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_INT, and WlzToArray3D().
WlzErrorNum WlzToSArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
short **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a short Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc short array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_SHORT, and WlzToArray3D().
WlzErrorNum WlzToUArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
WlzUByte **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a unsigned byte Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc unsigned byte array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_UBYTE, and WlzToArray3D().
WlzErrorNum WlzToFArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
float **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a float Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc float array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_FLOAT, and WlzToArray3D().
WlzErrorNum WlzToDArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
double **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts a double Alc array from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc double array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_DOUBLE, and WlzToArray3D().
WlzErrorNum WlzToRArray3D | ( | WlzIVertex3 * | dstSizeArrayDat, |
unsigned int **** | dstArrayDat, | ||
WlzObject * | srcObj, | ||
WlzIVertex3 | origin, | ||
WlzIVertex3 | size, | ||
int | noiseFlag | ||
) |
Extracts an unsigned int Alc array for RGBA values from any Woolz 3D domain object.
dstSizeArrayDat | Destination pointer for array size, may be NULL. |
dstArrayDat | Destination pointer for Alc double array. |
srcObj | Given Woolz object. |
origin | Array origin wrt given object. |
size | Required region size. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
References WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, WLZ_GREY_RGBA, and WlzToArray3D().
WlzErrorNum WlzToArray3D | ( | void **** | dstP, |
WlzObject * | srcObj, | ||
WlzIVertex3 | size, | ||
WlzIVertex3 | origin, | ||
int | noiseFlag, | ||
WlzGreyType | dstGreyType | ||
) |
Extracts an Alc array from any Woolz 3D domain object. If the destination pointer points to a non-NULL pointer then it is assumed to be a suitable Alc array. The data are assumed to be within the valid range.
dstP | Destination pointer (assumed valid if *dstP is non-NULL). |
srcObj | Given Woolz object. |
size | Size of the array. |
origin | Array origin wrt given object. |
noiseFlag | Fill background with random noise with the same mean and std. dev. as the given object if non-zero. |
dstGreyType | Destination array data type. |
References ALC_ER_NONE, AlcBit3Malloc(), AlcFree(), AlcFreeStackPop(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzVoxelValues::freeptr, _WlzGreyP::inp, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzObject::type, _WlzCoreDomain::type, _WlzGreyP::ubp, _WlzObject::values, _WlzValues::vox, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_2, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_DATA, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_DOMAIN_TYPE, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_PLANEDOMAIN_DOMAIN, WlzCutObjToValBox3D(), WlzFreeObj(), WlzGreyStats(), WlzMakeMain(), WlzValueClampDoubleToFloat(), WlzValueClampDoubleToInt(), WlzValueClampDoubleToRGBA(), WlzValueClampDoubleToShort(), WlzValueClampDoubleToUByte(), WlzValueCopyGreyToGrey(), _WlzIBox3::xMax, _WlzIBox3::xMin, _WlzIBox3::yMax, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.
Referenced by WlzEffWriteObjAm(), WlzEffWriteObjAnl(), WlzEffWriteObjDen(), WlzEffWriteObjIcs(), WlzEffWriteObjIPL(), WlzEffWriteObjNifti(), WlzEffWriteObjNrrd(), WlzEffWriteObjPic(), WlzEffWriteObjPvl(), WlzEffWriteObjSlc(), WlzEffWriteObjVff(), WlzEffWriteObjVtk(), WlzFourierTransformObj(), WlzMakeTiledValuesObj3D(), WlzToBArray3D(), WlzToDArray3D(), WlzToFArray3D(), WlzToIArray3D(), WlzToRArray3D(), WlzToSArray3D(), and WlzToUArray3D().
WlzObject* WlzFromBArray2D | ( | WlzIVertex2 | arraySizeDat, |
WlzUByte ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_BIT, and WlzFromArray2D().
Referenced by WlzFromBArray1D().
WlzObject* WlzFromIArray2D | ( | WlzIVertex2 | arraySizeDat, |
int ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_INT, and WlzFromArray2D().
WlzObject* WlzFromSArray2D | ( | WlzIVertex2 | arraySizeDat, |
short ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_SHORT, and WlzFromArray2D().
WlzObject* WlzFromUArray2D | ( | WlzIVertex2 | arraySizeDat, |
WlzUByte ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_UBYTE, and WlzFromArray2D().
WlzObject* WlzFromFArray2D | ( | WlzIVertex2 | arraySizeDat, |
float ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_FLOAT, and WlzFromArray2D().
WlzObject* WlzFromDArray2D | ( | WlzIVertex2 | arraySizeDat, |
double ** | arrayDat, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_DOUBLE, and WlzFromArray2D().
WlzObject* WlzFromArray2D | ( | void ** | arrayP, |
WlzIVertex2 | arraySize, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzGreyType | dstGreyType, | ||
WlzGreyType | srcGreyType, | ||
double | valOffset, | ||
double | valScale, | ||
int | clampFlag, | ||
int | noCopyFlag, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 2D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same.
arrayP | Given Alc array. |
arraySize | Dimensions of the array. |
arrayOrigin | Array origin wrt given object. |
dstGreyType | Destination object grey type. |
srcGreyType | Array data type. |
valOffset | Offset added to each value. |
valScale | Scale factor by which each value is multiplied before adding the offset. |
clampFlag | Values are clamped to the destination type range if the clamp flag is non-zero. |
noCopyFlag | Use the array data for the Woolz object values in-place. Take care when using this option! |
dstErr | stination pointer for error number, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyP::flp, _WlzRectValues::freeptr, _WlzDomain::i, _WlzGreyP::inp, _WlzIntervalDomain::intvlines, _WlzDynItvPool::itvBlock, _WlzDynItvPool::itvsInBlock, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzPixelV::type, _WlzGreyP::ubp, _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_ERR_EOO, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_INTVL, WlzDynItvLnFromBitLn(), WlzFreeIntervalDomain(), WlzFreeObj(), WlzMakeEmpty(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakeRect(), WlzStandardIntervalDomain(), and WlzValueCopyGreyToGrey().
Referenced by WlzAffineTransformGMShell(), WlzAutoCor(), WlzEffReadObjGif(), WlzEffWriteObjStack(), WlzFourierTransformObj(), WlzFromBArray2D(), WlzFromDArray2D(), WlzFromFArray2D(), WlzFromIArray2D(), WlzFromSArray2D(), WlzFromUArray2D(), WlzImageBlendObjToBufRGBA(), WlzProjectObjToPlane(), WlzRegCCorObjs(), and WlzToArray1D().
WlzObject* WlzFromBArray3D | ( | WlzIVertex3 | arraySizeDat, |
WlzUByte *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_BIT, and WlzFromArray3D().
WlzObject* WlzFromIArray3D | ( | WlzIVertex3 | arraySizeDat, |
int *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_INT, and WlzFromArray3D().
WlzObject* WlzFromSArray3D | ( | WlzIVertex3 | arraySizeDat, |
short *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_SHORT, and WlzFromArray3D().
WlzObject* WlzFromUArray3D | ( | WlzIVertex3 | arraySizeDat, |
WlzUByte *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_UBYTE, and WlzFromArray3D().
WlzObject* WlzFromFArray3D | ( | WlzIVertex3 | arraySizeDat, |
float *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_FLOAT, and WlzFromArray3D().
WlzObject* WlzFromDArray3D | ( | WlzIVertex3 | arraySizeDat, |
double *** | arrayDat, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array.
arraySizeDat | Dimensions of the array. |
arrayDat | Given Alc array. |
arrayOrigin | Array origin wrt given object. |
dstErr | Destination pointer for error number, may be NULL. |
References WLZ_GREY_DOUBLE, and WlzFromArray3D().
WlzObject* WlzFromArray3D | ( | void *** | arrayP, |
WlzIVertex3 | arraySize, | ||
WlzIVertex3 | arrayOrigin, | ||
WlzGreyType | dstGreyType, | ||
WlzGreyType | srcGreyType, | ||
double | valOffset, | ||
double | valScale, | ||
int | clampFlag, | ||
int | noCopyFlag, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a Woolz 3D domain object from the given Alc array. The data are assumed to be within the valid range. If the noCopyFlag is set (non-zero) then the array data space is used for the onjects values without copying. For this to be valid both the source and destination grey type must be the same.
arrayP | Given Alc array. |
arraySize | Dimensions of the array. |
arrayOrigin | Array origin wrt given object. |
dstGreyType | Destination object grey type. |
srcGreyType | Array data type. |
valOffset | Offset added to each value. |
valScale | Scale factor by which each value is multiplied before adding the offset. |
clampFlag | Values are clamped to the destination type range if the clamp flag is non-zero. |
noCopyFlag | Use the array data for the Woolz object values in-place. |
dstErr | Destination pointer for error number, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzRectValues::freeptr, _WlzVoxelValues::freeptr, _WlzDomain::i, _WlzGreyP::inp, _WlzDomain::p, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzPixelV::type, _WlzObject::type, _WlzGreyP::ubp, _WlzPixelV::v, _WlzVoxelValues::values, _WlzValues::vox, _WlzPlaneDomain::voxel_size, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_2, WLZ_DBG_LVL_FN, WLZ_EMPTY_OBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_BIT, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RECT, WLZ_GREY_UBYTE, WLZ_INTERVALDOMAIN_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeValues(), WlzGreyValueTableType(), WlzMakeIntervalDomain(), WlzMakeMain(), WlzMakePlaneDomain(), WlzMakeRectValueTb(), WlzMakeVoxelValueTb(), WlzStandardPlaneDomain(), and WlzValueCopyGreyToGrey().
Referenced by WlzEffReadObjDen(), WlzEffReadObjIcs(), WlzEffReadObjIPL(), WlzEffReadObjPic(), WlzEffReadObjSlc(), WlzEffReadObjVff(), WlzEffWriteObjAm(), WlzEffWriteObjStack(), WlzFourierTransformObj(), WlzFromBArray3D(), WlzFromDArray3D(), WlzFromFArray3D(), WlzFromIArray3D(), WlzFromSArray3D(), WlzFromUArray3D(), WlzRasterLineSetItv2D(), and WlzRegICPVerticesWSD2D().
int WlzArrayStats3D | ( | void *** | arrayP, |
WlzIVertex3 | arraySize, | ||
WlzGreyType | greyType, | ||
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev | ||
) |
Calculates simple statistics for the given Alc array.
arrayP | Given 3D Alc array. |
arraySize | Dimensions of the array. |
greyType | Array data type. |
dstMin | Destination ptr for minimum value, may be NULL. |
dstMax | Destination ptr for maximum value, may be NULL. |
dstSum | Destination ptr for sum of values, may be NULL. |
dstSumSq | Destination ptr for sum of squares of values, may be NULL. |
dstMean | Destination ptr for mean of values, may be NULL. |
dstStdDev | Destination ptr for standard deviation of values, may be NULL. |
References _WlzGreyP::dbp, _WlzGreyP::flp, _WlzGreyP::inp, _WlzGreyP::rgbp, _WlzGreyP::shp, _WlzGreyP::ubp, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_GREY_TYPE, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, and WLZ_GREY_UBYTE.
Referenced by WlzArrayStats2D().
int WlzArrayStats2D | ( | void ** | arrayP, |
WlzIVertex2 | arraySize, | ||
WlzGreyType | greyType, | ||
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev | ||
) |
Calculates simple statistics for the given Alc array.
arrayP | Given 2D Alc array. |
arraySize | Dimensions of the array. |
greyType | Array data type. |
dstMin | Destination ptr for minimum value, may be NULL. |
dstMax | Destination ptr for maximum value, may be NULL. |
dstSum | Destination ptr for sum of values, may be NULL. |
dstSumSq | Destination ptr for sum of squares of values, may be NULL. |
dstMean | Destination ptr for mean of values, may be NULL. |
dstStdDev | Destination ptr for standard deviation of values, may be NULL. |
References _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, and WlzArrayStats3D().
Referenced by WlzArrayStats1D(), and WlzRegCCorObjs().
int WlzArrayStats1D | ( | void * | arrayP, |
int | arraySize, | ||
WlzGreyType | greyType, | ||
double * | dstMin, | ||
double * | dstMax, | ||
double * | dstSum, | ||
double * | dstSumSq, | ||
double * | dstMean, | ||
double * | dstStdDev | ||
) |
Calculates simple statistics for the given Alc array.
arrayP | Given 1D Alc array. |
arraySize | Dimension of the array. |
greyType | Array data type. |
dstMin | Destination ptr for minimum value, may be NULL. |
dstMax | Destination ptr for maximum value, may be NULL. |
dstSum | Destination ptr for sum of values, may be NULL. |
dstSumSq | Destination ptr for sum of squares of values, may be NULL. |
dstMean | Destination ptr for mean of values, may be NULL. |
dstStdDev | Destination ptr for standard deviation of values, may be NULL. |
References _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, and WlzArrayStats2D().
WlzObject* WlzFromBArray1D | ( | WlzIVertex2 | arraySizeDat, |
WlzUByte * | bitData, | ||
WlzIVertex2 | arrayOrigin, | ||
WlzErrorNum * | dstErr | ||
) |
Converts a 1D bit array as generated by the Java interfaces to a 2D woolz object.
arraySizeDat | Vertex giving the width and height of the corresponding domain. |
bitData | The bit data with the bits set contiguously. |
arrayOrigin | The origin of the Woolz object. |
dstErr | Destination pointer for error code, may be NULL. |
References AlcBit2Calloc(), AlcBit2Free(), _WlzIVertex2::vtX, _WlzIVertex2::vtY, WLZ_ERR_NONE, WLZ_ERR_PARAM_DATA, WLZ_ERR_PARAM_NULL, and WlzFromBArray2D().
Referenced by Wlz3DViewTransformBitmap().
WlzObject* WlzFromArray1D | ( | WlzObjectType | oType, |
WlzIVertex3 | sz, | ||
WlzIVertex3 | org, | ||
WlzGreyType | gType, | ||
unsigned int | vpe, | ||
WlzGreyP | gDat, | ||
int | noCopy, | ||
WlzErrorNum * | dstErr | ||
) |
Creates a new 2D or 3D domain object from the given 1D array. The object created is rectangular/cuboid with the given origin and size. The background value of the new object is set to zero. The returned object can be free'd using WlzFreeObj(), irespective of whether the noCopy flag is set, but if an object created with the noCopy flag set is free'd the data must be free'd independently after the returned object. The no copy option was originaly intended for efficient output of Woolz objects to a file in non-Woolz applications.
oType | Required object type, must be WLZ_2D_DOMAINOBJ or WLZ_3D_DOMAINOBJ. |
sz | Size of the required object, ie the number of columns, lines and planes. The number of planes is ignored for WLZ_2D_DOMAINOBJ objects. |
org | The origin of the object. The plane origin is ignored for WLZ_2D_DOMAINOBJ objects. |
gType | The grey type of the given data and the resulting object. |
vpe | Values per pixel/voxel, 1 for scalar values. |
gDat | The 1D array of data. |
noCopy | If non-zero then the data are not copied but are used in place. Use with caution. This is never done with non-scalar data. |
dstErr | Destination error pointer, may be NULL. |
References AlcFree(), AlcFreeStackPush(), AlcMalloc(), _WlzValues::core, _WlzDomain::core, _WlzGreyP::dbp, _WlzGreyV::dbv, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyP::flp, _WlzGreyV::flv, _WlzRectValues::freeptr, _WlzGreyP::inp, _WlzGreyV::inv, _WlzDomain::p, _WlzValues::r, _WlzGreyP::rgbp, _WlzGreyV::rgbv, _WlzGreyP::shp, _WlzGreyV::shv, _WlzValues::t, _WlzPixelV::type, _WlzGreyP::ubp, _WlzGreyV::ubv, _WlzGreyP::v, _WlzPixelV::v, _WlzObject::values, _WlzVoxelValues::values, _WlzTiledValues::vDim, _WlzValues::vox, _WlzIVertex3::vtX, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_GREY_TYPE, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_DATA, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_TAB_RECT, WLZ_GREY_TAB_TILED, WLZ_GREY_UBYTE, WLZ_TILEDVALUES_TILE_SIZE, WLZ_VOXELVALUETABLE_GREY, WlzAssignDomain(), WlzAssignValues(), WlzFreeDomain(), WlzFreeObj(), WlzFreePlaneDomain(), WlzFreeValues(), WlzFreeVoxelValueTb(), WlzGreyValueTableType(), WlzMakeCuboid(), WlzMakeMain(), WlzMakeRect(), WlzMakeRectValueTb(), WlzMakeTiledValuesFromObj(), WlzMakeTiledValuesTiles(), WlzMakeVoxelValueTb(), and WlzTiledValuesCopyLine().
Referenced by WlzEffWriteObjNrrd(), and WlzToArray1D().
WlzErrorNum WlzToArray1D | ( | WlzGreyP | gP, |
WlzGreyType | gType, | ||
WlzIBox3 | gBufBox, | ||
int | gOffset, | ||
WlzObject * | obj | ||
) |
Sets values in the given buffer to those of the given object. The given buffer must be large enough to hold the given bounding box of image values. Only values within the domain of the object are set.
gP | Grey pointer to allocated buffer. |
gType | Grey type of the buffer. |
gBufBox | Buffer bounding box. The z component is ignored if the object is a 2D object. |
gOffset | Offset into the buffer. |
obj | Given object. |
References AlcFree(), AlcMalloc(), _WlzDomain::core, _WlzObject::domain, _WlzPlaneDomain::domains, getopt(), _WlzPlaneDomain::lastpl, _WlzIntervalWSpace::lftpos, _WlzIntervalWSpace::linpos, main(), optarg, opterr, optind, optopt, _WlzDomain::p, _WlzGreyWSpace::pixeltype, _WlzPlaneDomain::plane1, _WlzIntervalWSpace::rgtpos, _WlzObject::type, _WlzGreyWSpace::u_grintptr, _WlzGreyP::ubp, _WlzGreyP::v, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, _WlzIVertex2::vtX, _WlzIVertex3::vtX, _WlzIVertex2::vtY, _WlzIVertex3::vtY, _WlzIVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_CLAMP, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_EOO, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PARAM_NULL, WLZ_GREY_BIT, WLZ_GREY_UBYTE, WLZ_NINT, WlzBoundingBox2I(), WlzEndGreyScan(), WlzFreeObj(), WlzFromArray1D(), WlzFromArray2D(), WlzInitGreyScan(), WlzMakeMain(), WlzNextGreyInterval(), WlzReadObj(), WlzStringFromErrorNum(), WlzToArray2D(), WlzValueCopyGreyToGrey(), WlzWriteObj(), _WlzIBox2::xMax, _WlzIBox3::xMax, _WlzIBox2::xMin, _WlzIBox3::xMin, _WlzIBox2::yMax, _WlzIBox3::yMax, _WlzIBox2::yMin, _WlzIBox3::yMin, _WlzIBox3::zMax, and _WlzIBox3::zMin.