Woolz Image Processing
Version 1.8.3
|
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 | |
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(). 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... | |
Domain and grey-value access procedures.
enum _WlzRasterDir |
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.
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().
obj | Given object. |
dstErrNum | Destination 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 WlzBSplineToDomain(), WlzCCorS2D(), WlzCMeshFromBalLBTDom2D(), WlzCMeshFromBalLBTDom3D(), WlzCMeshIntersectDom2D5(), WlzCMeshSetDispFromField(), WlzConComThreshold(), WlzDGTensorPDFeature(), WlzDGTensorSDFeature(), WlzDomainFill3D(), WlzGetProjectionFromObject(), WlzGreyValueMixing_s(), WlzLBTBalanceDomain2D(), WlzLBTBalanceDomain3D(), WlzLBTIndexObjSetAllNodes2D(), WlzLBTIndexObjSetAllNodes3D(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzLineSkeleton(), WlzLineSkeletonSegment(), WlzPointsFromDomObj(), WlzPointValuesFromDomObj(), and WlzProjectObjToPlane().
void WlzGreyValueFreeWSp | ( | WlzGreyValueWSpace * | gVWSp | ) |
Free's the given grey value work space created by WlzGreyValueMakeWSp().
gVWSp | Given grey value work space. |
References AlcFree(), _WlzGreyValueWSpace::gTabTypes3D, _WlzGreyValueWSpace::invTrans, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, and WlzFreeAffineTransform().
Referenced by WlzBSplineToDomain(), WlzCCorS2D(), WlzCMeshSetDispFromField(), WlzDomainFill3D(), WlzGreyValueMakeWSp(), WlzPointsFromDomObj(), and WlzPointValuesFromDomObj().
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.
gVWSp | Grey value work space. |
plane | Plane (z) coordinate of point. |
line | Line (y) coordinate of point. |
kol | Column (x) coordinate of point. |
References _WlzGreyValueWSpace::invTrans, _WlzGreyValueWSpace::objType, _WlzDVertex2::vtX, _WlzDVertex2::vtY, WLZ_2D_DOMAINOBJ, and WlzAffineTransformVertexD2().
Referenced by WlzBSplineToDomain(), WlzCCorS2D(), WlzCMeshSetDispFromField(), WlzDGTensorPDFeature(), WlzDomainFill3D(), WlzGetProjectionFromObject(), WlzGreyValueGetD(), WlzGreyValueGetDir(), WlzGreyValueGetI(), WlzLBTClassifyNode2D(), WlzLBTClassifyNodeFace3D(), WlzLBTCountNodNbrDir2D(), WlzLineSkeletonSegment(), WlzPointsFromDomObj(), and WlzPointValuesFromDomObj().
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:
(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.
gVWSp | Grey value work space. |
plane | Plane (z) coordinate of point. |
line | Line (y) coordinate of point. |
kol | Column (x) coordinate of point. |
References _WlzGreyValueWSpace::invTrans.
Referenced by WlzCMeshSetDispFromField().
WlzGreyType WlzGreyValueGetGreyType | ( | WlzGreyValueWSpace * | gVWSp, |
WlzErrorNum * | dstErr | ||
) |
Access function to get the object's grey type.
gVWSp | Grey value work space. |
dstErr | Destination 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.
gVWSp | Grey value work space. |
plane | Plane (z) coordinate of point. |
line | Line (y) coordinate of point. |
kol | Column (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.
gVWSp | Grey value work space. |
plane | Plane (z) coordinate of point. |
line | Line (y) coordinate of point. |
kol | Column (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.
iDom | Given interval domain. |
line | Line (y) position. |
kol | Column (x) position. |
dstErr | Destination 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 WlzDomainNearby(), WlzInsideDomain(), and WlzInsideDomain3D().
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.
pDom | Given plane domain. |
plane | Plane (z) position. |
line | Line (y) position. |
kol | Column (x) position. |
dstErr | Destination error pointer, may be NOT NULL. |
References _WlzPlaneDomain::domains, _WlzDomain::i, _WlzPlaneDomain::plane1, and WlzInsideDomain2D().
Referenced by WlzDomainNearby(), and WlzInsideDomain().
int WlzInsideDomain | ( | WlzObject * | obj, |
double | plane, | ||
double | line, | ||
double | kol, | ||
WlzErrorNum * | dstErr | ||
) |
Looks to see if the given point is within the objects domain.
obj | Given object. |
plane | Plane (z) position, only used if the object has a 3D domain. |
line | Line (y) position. |
kol | Column (x) position. |
dstErr | Destination error pointer, may be NULL. |
References _WlzValues::core, _WlzDomain::core, _WlzObject::domain, _WlzDomain::i, _WlzValues::obj, _WlzDomain::p, _WlzDomain::t, _WlzObject::type, _WlzCoreDomain::type, _WlzObject::values, _WlzDVertex2::vtX, _WlzDVertex3::vtX, _WlzDVertex2::vtY, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_DBG, WLZ_DBG_LVL_1, WLZ_DBG_LVL_FN, WLZ_ERR_DOMAIN_NULL, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_OBJECT_TYPE, WLZ_ERR_PLANEDOMAIN_TYPE, WLZ_ERR_TRANSFORM_TYPE, WLZ_ERR_VALUES_NULL, WLZ_NINT, WLZ_PLANEDOMAIN_DOMAIN, WLZ_TRANS_OBJ, WlzAffineTransformDimension(), WlzAffineTransformInverse(), WlzAffineTransformVertexD2(), WlzAffineTransformVertexD3(), WlzFreeAffineTransform(), WlzInsideDomain2D(), and WlzInsideDomain3D().
Referenced by Wlz2DContains(), WlzCMeshBoundConform2D(), WlzCMeshBoundConform3D(), WlzGeomObjLineSegIntersect2D(), WlzGeomObjLineSegIntersect3D(), WlzGetProjectionFromObject(), WlzLBTDomain2DFromIDomain(), WlzLBTDomain3DFromPDomain(), WlzLineSkeletonSegment(), and WlzPointsDither().