Woolz Image Processing  Version 1.7.0
WlzAccess

Domain and grey-value access procedures. More...

Files

file  WlzGreyValue.c
 Provides functions for random access to the grey values of 2D and 3D domain objects.
 
file  WlzInsideDomain.c
 Functions which check whether a given vertex lies within an object's domain.
 

Data Structures

struct  _WlzIntervalWSpace
 The standard workspace structure for interval objects. Typedef: WlzIntervalWSpace. More...
 
struct  _WlzGreyWSpace
 The standard workspace for grey value table manipulations. Typedef: WlzGreyWSpace. More...
 
struct  _WlzIterateWSpace
 A workspace structure for interval objects which allows iteration through an object's pixels/voxels. Typedef: WlzIterateWSpace. More...
 
struct  _WlzGreyValueWSpace
 Workspace for random access grey value manipulations. Typedef: WlzGreyValueWSpace. More...
 

Enumerations

enum  _WlzRasterDir {
  WLZ_RASTERDIR_DC = (1),
  WLZ_RASTERDIR_DL = (1 << 1),
  WLZ_RASTERDIR_DP = (1 << 2),
  WLZ_RASTERDIR_ILIC = (0),
  WLZ_RASTERDIR_ILDC = WLZ_RASTERDIR_DC,
  WLZ_RASTERDIR_DLIC = WLZ_RASTERDIR_DL,
  WLZ_RASTERDIR_DLDC = (WLZ_RASTERDIR_DL | WLZ_RASTERDIR_DC),
  WLZ_RASTERDIR_IPILIC = WLZ_RASTERDIR_ILIC,
  WLZ_RASTERDIR_IPILDC = WLZ_RASTERDIR_ILDC,
  WLZ_RASTERDIR_IPDLIC = WLZ_RASTERDIR_DLIC,
  WLZ_RASTERDIR_IPDLDC = WLZ_RASTERDIR_DLDC,
  WLZ_RASTERDIR_DPILIC = (WLZ_RASTERDIR_DP | WLZ_RASTERDIR_ILIC),
  WLZ_RASTERDIR_DPILDC = (WLZ_RASTERDIR_DP | WLZ_RASTERDIR_ILDC),
  WLZ_RASTERDIR_DPDLIC = (WLZ_RASTERDIR_DP | WLZ_RASTERDIR_DLIC),
  WLZ_RASTERDIR_DPDLDC = (WLZ_RASTERDIR_DP | WLZ_RASTERDIR_DLDC)
}
 Raster scan directions as used by WlzIntervalWSpace and WlzIterateWSpace. These are built using bit masks with bits set for decreasing in each of the directions. Typedef: WlzRasterDir. More...
 

Functions

WlzGreyValueWSpaceWlzGreyValueMakeWSp (WlzObject *obj, WlzErrorNum *dstErrNum)
 Creates a grey value work space from the given object. The resulting grey value work space should be freed using WlzGreyValueFreeWSp(). More...
 
void WlzGreyValueFreeWSp (WlzGreyValueWSpace *gVWSp)
 Free's the given grey value work space created by WlzGreyValueMakeWSp(). More...
 
void WlzGreyValueGet (WlzGreyValueWSpace *gVWSp, double plane, double line, double kol)
 Gets a single grey value/pointer for the given point from the object with which the given work space was initialised. When the object has a non-scalar value table then only the first value will be returned, however when the value is not background all values can be accessed via the grey pointer. More...
 
void WlzGreyValueGetCon (WlzGreyValueWSpace *gVWSp, double plane, double line, double kol)
 Gets the four/eight connected grey values/pointers for the given point which lie at: More...
 
WlzGreyType WlzGreyValueGetGreyType (WlzGreyValueWSpace *gVWSp, WlzErrorNum *dstErr)
 Access function to get the object's grey type. More...
 
int WlzGreyValueGetI (WlzGreyValueWSpace *gVWSp, double plane, double line, double kol)
 Gets a single grey value for the given point from the object with which the given work space was initialised. More...
 
double WlzGreyValueGetD (WlzGreyValueWSpace *gVWSp, double plane, double line, double kol)
 Gets a single grey value for the given point from the object with which the given work space was initialised. More...
 
int WlzInsideDomain2D (WlzIntervalDomain *iDom, int line, int kol, WlzErrorNum *dstErr)
 Looks to see if the given point is within the given interval domain. More...
 
int WlzInsideDomain3D (WlzPlaneDomain *pDom, int plane, int line, int kol, WlzErrorNum *dstErr)
 Looks to see if the given point is within the given 3D domain. More...
 
int WlzInsideDomain (WlzObject *obj, double plane, double line, double kol, WlzErrorNum *dstErr)
 Looks to see if the given point is within the objects domain. More...
 

Detailed Description

Domain and grey-value access procedures.

Enumeration Type Documentation

Raster scan directions as used by WlzIntervalWSpace and WlzIterateWSpace. These are built using bit masks with bits set for decreasing in each of the directions. Typedef: WlzRasterDir.

Enumerator
WLZ_RASTERDIR_DC 

Used to build directions .

WLZ_RASTERDIR_DL 

Used to build directions.

WLZ_RASTERDIR_DP 

Used to build directions.

WLZ_RASTERDIR_ILIC 

Increasing lines, increasing columns.

WLZ_RASTERDIR_ILDC 

Increasing lines, decreasing columns.

WLZ_RASTERDIR_DLIC 

Decreasing lines, increasing columns.

WLZ_RASTERDIR_DLDC 

Decreasing lines, decreasing columns.

WLZ_RASTERDIR_IPILIC 

Increasing planes, increasing lines, increasing columns.

WLZ_RASTERDIR_IPILDC 

Increasing planes, increasing lines, decreasing columns.

WLZ_RASTERDIR_IPDLIC 

Increasing planes, decreasing lines, increasing columns.

WLZ_RASTERDIR_IPDLDC 

Increasing planes, decreasing lines, decreasing columns.

WLZ_RASTERDIR_DPILIC 

Decreasing planes, increasing lines, increasing columns.

WLZ_RASTERDIR_DPILDC 

Decreasing planes, increasing lines, decreasing columns.

WLZ_RASTERDIR_DPDLIC 

Decreasing planes, decreasing lines, increasing columns.

WLZ_RASTERDIR_DPDLDC 

Decreasing planes, decreasing lines, decreasing columns.

Function Documentation

WlzGreyValueWSpace* WlzGreyValueMakeWSp ( WlzObject obj,
WlzErrorNum dstErrNum 
)

Creates a grey value work space from the given object. The resulting grey value work space should be freed using WlzGreyValueFreeWSp().

Returns
Grey value work space or NULL on error.
Parameters
objGiven object.
dstErrNumDestination error pointer, may be NULL.

References AlcCalloc(), _WlzRagRValues::bckgrnd, _WlzRectValues::bckgrnd, _WlzIntervalValues::bckgrnd, _WlzTiledValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzGreyValueWSpace::domain, _WlzPlaneDomain::domains, _WlzGreyValueWSpace::gBkd, _WlzGreyValueWSpace::gTabType, _WlzGreyValueWSpace::gTabType2D, _WlzGreyValueWSpace::gTabTypes3D, _WlzGreyValueWSpace::gType, _WlzValues::i, _WlzDomain::i, _WlzGreyValueWSpace::iDom2D, _WlzGreyValueWSpace::invTrans, _WlzPlaneDomain::lastpl, _WlzValues::obj, _WlzGreyValueWSpace::objType, _WlzDomain::p, _WlzGreyValueWSpace::plane, _WlzPlaneDomain::plane1, _WlzValues::r, _WlzValues::t, _WlzDomain::t, _WlzPixelV::type, _WlzObject::type, _WlzCoreDomain::type, _WlzIntervalDomain::type, _WlzCoreValues::type, _WlzGreyV::ubv, _WlzPixelV::v, _WlzValues::v, _WlzObject::values, _WlzVoxelValues::values, _WlzGreyValueWSpace::values, _WlzGreyValueWSpace::values2D, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_DUMMY_ENTRY, 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_ERR_PARAM_DATA, WLZ_ERR_VALUES_DATA, WLZ_ERR_VALUES_NULL, WLZ_ERR_VALUES_TYPE, WLZ_GREY_DOUBLE, WLZ_GREY_ERROR, 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_INTVL, WLZ_INTERVALDOMAIN_RECT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WLZ_VOXELVALUETABLE_GREY, WlzAffineTransformCopy(), WlzAffineTransformInverse(), WlzAffineTransformProduct(), WlzFreeAffineTransform(), WlzGreyTableIsTiled(), WlzGreyTableTypeToGreyType(), WlzGreyTableTypeToTableType(), and WlzGreyValueFreeWSp().

Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzCCorS2D(), WlzClassValCon4(), WlzCMeshFromBalLBTDom2D(), WlzCMeshFromBalLBTDom3D(), WlzCMeshIntersectDom2D5(), WlzCMeshSetDispFromField(), WlzCMeshStrainTensorAtPts(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCMeshValueTransfer(), WlzCompoundToRGBA(), WlzConComThreshold(), WlzCopyObjectGreyValues(), WlzDGTensorPDFeature(), WlzDGTensorSDFeature(), WlzDomainFill3D(), WlzFilterNObjValues(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGreyValueMixing_s(), WlzIntRescaleObj(), WlzLBTBalanceDomain2D(), WlzLBTBalanceDomain3D(), WlzLBTIndexObjSetAllNodes2D(), WlzLBTIndexObjSetAllNodes3D(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzPointsFromDomObj(), WlzPointValuesFromDomObj(), WlzPolarSample(), WlzProjectObjToPlane(), WlzRankFilter(), WlzSepFilter(), and WlzTransposeObj().

void WlzGreyValueGet ( WlzGreyValueWSpace gVWSp,
double  plane,
double  line,
double  kol 
)

Gets a single grey value/pointer for the given point from the object with which the given work space was initialised. When the object has a non-scalar value table then only the first value will be returned, however when the value is not background all values can be accessed via the grey pointer.

Returns
void
Parameters
gVWSpGrey value work space.
planePlane (z) coordinate of point.
lineLine (y) coordinate of point.
kolColumn (x) coordinate of point.

References _WlzGreyValueWSpace::gTabType, _WlzGreyValueWSpace::invTrans, _WlzGreyValueWSpace::objType, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_GREY_TAB_TILED, WLZ_NINT, WlzAffineTransformVertexD2(), and WlzAffineTransformVertexD3().

Referenced by Wlz3DViewTransformObj(), WlzAffineTransformGMShell(), WlzCCorS2D(), WlzClassValCon4(), WlzCMeshIntersectDom2D5(), WlzCMeshSetDispFromField(), WlzCMeshStrainTensorAtPts(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCMeshValueTransfer(), WlzCompoundToRGBA(), WlzConComThreshold(), WlzCopyObjectGreyValues(), WlzDGTensorPDFeature(), WlzDomainFill3D(), WlzFilterNObjValues(), WlzGetMaskedSectionFromObject(), WlzGetProjectionFromObject(), WlzGreyValueGetD(), WlzGreyValueGetDir(), WlzGreyValueGetI(), WlzIntRescaleObj(), WlzLBTClassifyNode2D(), WlzLBTClassifyNodeFace3D(), WlzLBTCountNodNbrDir2D(), WlzPointsFromDomObj(), WlzPointValuesFromDomObj(), WlzPolarSample(), WlzProjectObjToPlane(), WlzRankFilter(), WlzSepFilter(), and WlzTransposeObj().

void WlzGreyValueGetCon ( WlzGreyValueWSpace gVWSp,
double  plane,
double  line,
double  kol 
)

Gets the four/eight connected grey values/pointers for the given point which lie at:

Returns
void
                  (p, k, l),          (p, k + 1, l),
                  (p, k, l + 1),      (p, k + 1, l + 1),
                  (p + 1, k, l),      (p + 1, k + 1, l),
                  (p + 1, k, l + 1),  (p + 1, k + 1, l + 1).
*               

When the object has a non-scalar value table then only the first value will be returned, however when the value is not background all values can be accessed via the grey pointer.

Parameters
gVWSpGrey value work space.
planePlane (z) coordinate of point.
lineLine (y) coordinate of point.
kolColumn (x) coordinate of point.

References _WlzGreyValueWSpace::gTabType, _WlzGreyValueWSpace::invTrans, _WlzGreyValueWSpace::objType, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, and WLZ_GREY_TAB_TILED.

Referenced by WlzAffineTransformGMShell(), WlzClassValCon4(), WlzCMeshSetDispFromField(), WlzCMeshToDomObjValues(), WlzCMeshTransformManyObjAsIdx(), WlzCMeshValueTransfer(), and WlzGetMaskedSectionFromObject().

WlzGreyType WlzGreyValueGetGreyType ( WlzGreyValueWSpace gVWSp,
WlzErrorNum dstErr 
)

Access function to get the object's grey type.

Returns
The workspace's object's grey type.
Parameters
gVWSpGrey value work space.
dstErrDestination error pointer, may be NULL.

References _WlzGreyValueWSpace::gType, WLZ_ERR_NONE, WLZ_ERR_PARAM_NULL, and WLZ_GREY_ERROR.

int WlzGreyValueGetI ( WlzGreyValueWSpace gVWSp,
double  plane,
double  line,
double  kol 
)

Gets a single grey value for the given point from the object with which the given work space was initialised.

Returns
The grey value as an int.
Parameters
gVWSpGrey value work space.
planePlane (z) coordinate of point.
lineLine (y) coordinate of point.
kolColumn (x) coordinate of point.

References _WlzGreyV::dbv, _WlzGreyV::flv, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzGreyV::inv, _WlzGreyV::lnv, _WlzGreyV::rgbv, _WlzGreyV::shv, _WlzGreyV::ubv, WLZ_CLAMP, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, WLZ_NINT, and WlzGreyValueGet().

double WlzGreyValueGetD ( WlzGreyValueWSpace gVWSp,
double  plane,
double  line,
double  kol 
)

Gets a single grey value for the given point from the object with which the given work space was initialised.

Returns
The grey value as a double.
Parameters
gVWSpGrey value work space.
planePlane (z) coordinate of point.
lineLine (y) coordinate of point.
kolColumn (x) coordinate of point.

References _WlzGreyV::dbv, _WlzGreyV::flv, _WlzGreyValueWSpace::gType, _WlzGreyValueWSpace::gVal, _WlzGreyV::inv, _WlzGreyV::lnv, _WlzGreyV::rgbv, _WlzGreyV::shv, _WlzGreyV::ubv, WLZ_GREY_DOUBLE, WLZ_GREY_FLOAT, WLZ_GREY_INT, WLZ_GREY_LONG, WLZ_GREY_RGBA, WLZ_GREY_SHORT, WLZ_GREY_UBYTE, and WlzGreyValueGet().

int WlzInsideDomain2D ( WlzIntervalDomain iDom,
int  line,
int  kol,
WlzErrorNum dstErr 
)

Looks to see if the given point is within the given interval domain.

Returns
Non zero if point is inside.
Parameters
iDomGiven interval domain.
lineLine (y) position.
kolColumn (x) position.
dstErrDestination error pointer, may be NOT NULL.

References _WlzIntervalDomain::intvlines, _WlzIntervalLine::intvs, _WlzIntervalDomain::kol1, _WlzIntervalDomain::line1, _WlzIntervalLine::nintvs, _WlzIntervalDomain::type, WLZ_ERR_DOMAIN_TYPE, WLZ_INTERVALDOMAIN_INTVL, and WLZ_INTERVALDOMAIN_RECT.

Referenced by WlzDomainFill3D(), WlzDomainNearby(), WlzInsideDomain(), WlzInsideDomain3D(), and WlzLBTKeyToBox2I().

int WlzInsideDomain3D ( WlzPlaneDomain pDom,
int  plane,
int  line,
int  kol,
WlzErrorNum dstErr 
)

Looks to see if the given point is within the given 3D domain.

Returns
Non zero if point is inside.
Parameters
pDomGiven plane domain.
planePlane (z) position.
lineLine (y) position.
kolColumn (x) position.
dstErrDestination error pointer, may be NOT NULL.

References _WlzPlaneDomain::domains, _WlzDomain::i, _WlzPlaneDomain::plane1, and WlzInsideDomain2D().

Referenced by WlzDomainNearby(), WlzGMModelCutDom(), WlzInsideDomain(), and WlzLBTKeyToBox2I().

int WlzInsideDomain ( WlzObject obj,
double  plane,
double  line,
double  kol,
WlzErrorNum dstErr 
)