Woolz Image Processing Version 1.4.0
WlzAccess

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

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...

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.


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

WlzErrorNum read_WlzTiePoints (FILE *fp, int *nTiePP, WlzDVertex3 **vxVec01, WlzDVertex3 **vxVec11, const int ReadDisplacement)
 Get the index of the tetrahedrons which intersect with a giving z = constant plane.
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().
void WlzGreyValueFreeWSp (WlzGreyValueWSpace *gVWSp)
 Free's the given grey value work space created by WlzGreyValueMakeWSp().
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.
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:
WlzGreyType WlzGreyValueGetGreyType (WlzGreyValueWSpace *gVWSp, WlzErrorNum *dstErr)
 Access function to get the object's grey type.
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.
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.
int WlzInsideDomain2D (WlzIntervalDomain *iDom, int line, int kol, WlzErrorNum *dstErr)
 Looks to see if the given point is within the given interval domain.
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.
int WlzInsideDomain (WlzObject *obj, double plane, double line, double kol, WlzErrorNum *dstErr)
 Looks to see if the given point is within the objects domain.

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

WlzErrorNum read_WlzTiePoints ( FILE *  fp,
int *  nTiePP,
WlzDVertex3 **  vxVec01,
WlzDVertex3 **  vxVec11,
const int  ReadDisplacement 
)

Get the index of the tetrahedrons which intersect with a giving z = constant plane.

Returns:
None
Parameters:
zConstz = const plane.
fppointer pointing to a specific file.
wmt3Dmesh transform.
Author:
: J. Rao, R. Baldock and B. Hill
  • Project: Woolz
  • Return: none
  • Ingroup: WlzTransform
  • Title: validityOfMinAndMax
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: test the validity of the input
  • Parameters:
    1. nxmax: number of cuboids in x plane
    2. nymax: number of cuboids in y plane
    3. nzmax: number of cuboids in z plane
    4. xmin: the starting positoin in x-direction.
    5. ymin: the starting positoin in y-direction.
    6. zmin: the starting positoin in z-direction.
    7. xmax: the maximum positoin in x-direction.
    8. ymax: the maximum positoin in y-direction.
    9. zmax: the maximum positoin in z-direction.
  • Project: Woolz
  • Return: none
  • Ingroup: WlzTransform
  • Title: ElementsGenerator
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: Generate wmt3D mesh element
  • Parameters:
    1. nxmax: number of cuboids in x plane
    2. nymax: number of cuboids in y plane
    3. nzmax: number of cuboids in z plane
    4. *wmt3D: 3D mesh transform. output
    5. *intersectionTable: intersect table. output.
  • Project: Woolz
  • Return: none
  • Ingroup: WlzTransform
  • Title: GetIntersectionTable
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: Get intersection table
  • Parameters:
    1. nxmax: number of cuboids in x plane
    2. nymax: number of cuboids in y plane
    3. nzmax: number of cuboids in z plane
    4. xmin: the starting positoin in x-direction.
    5. ymin: the starting positoin in y-direction.
    6. zmin: the starting positoin in z-direction.
    7. xdelta: the size of the cuboid in x-direction.
    8. ydelta: the size of the cuboid in y-direction.
    9. zdelta: the size of the cuboid in z-direction.
    10. *wobjC: Woolz source obejct.
    11. *intersectionTable: intersect table. output.
  • Project: Woolz
  • Return: none
  • Ingroup: WlzGeometry
  • Title: Read tiepoints
  • Date: 18 January 2002
  • Author: J. Rao, R. Baldock and B. Hill
  • Brief: Read tiepoints from a file
  • Parameters:
    1. *fp: a file pointer pointing to the file contains tiepoints.
    2. **vxVec01: an array pointer will contain tiepoints position. output.
    3. **vxVec11: an array pointer will contain tiepoints displacement or corresponding points depents on the ReadDisplacement value. output.
    4. nTiePP: number of tiepoints. output.
    5. ReadDisplacement: input to decide whether read displacement or corresponding position. 1 for yes 0 for no.

References AlcRealloc(), IN_RECORD_MAX, _WlzDVertex3::vtX, _WlzDVertex3::vtY, _WlzDVertex3::vtZ, WLZ_ERR_MEM_ALLOC, WLZ_ERR_NONE, and WLZ_ERR_READ_INCOMPLETE.

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(), _WlzTiledValues::bckgrnd, _WlzIntervalValues::bckgrnd, _WlzRectValues::bckgrnd, _WlzRagRValues::bckgrnd, _WlzValues::core, _WlzDomain::core, _WlzGreyValueWSpace::domain, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzGreyValueWSpace::gBkd, _WlzGreyValueWSpace::gTabType, _WlzGreyValueWSpace::gTabType2D, _WlzGreyValueWSpace::gTabTypes3D, _WlzGreyValueWSpace::gType, _WlzDomain::i, _WlzValues::i, _WlzGreyValueWSpace::iDom2D, _WlzGreyValueWSpace::invTrans, _WlzPlaneDomain::lastpl, _WlzValues::obj, _WlzGreyValueWSpace::objType, _WlzDomain::p, _WlzGreyValueWSpace::plane, _WlzPlaneDomain::plane1, _WlzValues::r, _WlzDomain::t, _WlzValues::t, _WlzCoreDomain::type, _WlzIntervalDomain::type, _WlzCoreValues::type, _WlzObject::type, _WlzPixelV::type, _WlzGreyV::ubv, _WlzValues::v, _WlzPixelV::v, _WlzVoxelValues::values, _WlzGreyValueWSpace::values, _WlzObject::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(), WlzCCorS2D(), WlzCMeshFromBalLBTDom2D(), WlzCMeshFromBalLBTDom3D(), WlzCMeshIntersectDom2D5(), WlzGetProjectionFromObject(), WlzGreyValueMixing_s(), WlzLBTBalanceDomain2D(), WlzLBTBalanceDomain3D(), WlzLBTIndexObjSetAllNodes2D(), WlzLBTIndexObjSetAllNodes3D(), WlzLBTMakeNodeIndexObj2D(), WlzLBTMakeNodeIndexObj3D(), WlzPolarSample(), WlzProjectObjToPlane(), 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.

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, _WlzDVertex3::vtX, _WlzDVertex2::vtX, _WlzDVertex3::vtY, _WlzDVertex2::vtY, _WlzDVertex3::vtZ, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_GREY_TAB_TILED, WLZ_NINT, WlzAffineTransformVertexD2(), and WlzAffineTransformVertexD3().

Referenced by Wlz3DViewTransformObj(), WlzCCorS2D(), WlzCMeshIntersectDom2D5(), WlzGetProjectionFromObject(), WlzGreyValueGetD(), WlzGreyValueGetDir(), WlzGreyValueGetI(), WlzLBTClassifyNode2D(), WlzLBTClassifyNodeFace3D(), WlzLBTCountNodNbrDir2D(), WlzPolarSample(), 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).
*		
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.

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 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.

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 WlzInsideDomain().