Woolz Image Processing  Version 1.7.5
WlzError

Files

file  WlzError.c
 Error related functions for the Woolz library.
 
file  WlzError.h
 Definitions of Woolz error codes.
 
file  WlzVerifyObj.c
 Functions for verifying and fixing objects.
 

Enumerations

enum  _WlzErrorNum {
  WLZ_ERR_NONE = 0,
  WLZ_ERR_EOO,
  WLZ_ERR_OBJECT_NULL,
  WLZ_ERR_OBJECT_TYPE,
  WLZ_ERR_OBJECT_DATA,
  WLZ_ERR_DOMAIN_NULL,
  WLZ_ERR_DOMAIN_TYPE,
  WLZ_ERR_DOMAIN_DATA,
  WLZ_ERR_VALUES_NULL,
  WLZ_ERR_VALUES_TYPE,
  WLZ_ERR_VALUES_DATA,
  WLZ_ERR_PROPERTY_NULL,
  WLZ_ERR_PROPERTY_TYPE,
  WLZ_ERR_GMELM_NULL,
  WLZ_ERR_GMELM_TYPE,
  WLZ_ERR_GMELM_DATA,
  WLZ_ERR_PARAM_NULL,
  WLZ_ERR_PARAM_TYPE,
  WLZ_ERR_PARAM_DATA,
  WLZ_ERR_INT_DATA,
  WLZ_ERR_SHORT_DATA,
  WLZ_ERR_UBYTE_DATA,
  WLZ_ERR_FLOAT_DATA,
  WLZ_ERR_DOUBLE_DATA,
  WLZ_ERR_GREY_TYPE,
  WLZ_ERR_GREY_DATA,
  WLZ_ERR_PLANEDOMAIN_TYPE,
  WLZ_ERR_PLANEDOMAIN_DATA,
  WLZ_ERR_INTERVALDOMAIN_NULL,
  WLZ_ERR_INTERVALDOMAIN_TYPE,
  WLZ_ERR_INTERVALLINE_NULL,
  WLZ_ERR_INTERVAL_NULL,
  WLZ_ERR_INTERVAL_DATA,
  WLZ_ERR_INTERVAL_ADJACENT,
  WLZ_ERR_INTERVAL_BOUND,
  WLZ_ERR_INTERVAL_NUMBER,
  WLZ_ERR_TRANSFORM_NULL,
  WLZ_ERR_TRANSFORM_DATA,
  WLZ_ERR_TRANSFORM_TYPE,
  WLZ_ERR_VOXELVALUES_TYPE,
  WLZ_ERR_COLUMN_DATA,
  WLZ_ERR_LINE_DATA,
  WLZ_ERR_PLANE_DATA,
  WLZ_ERR_BINARY_OPERATOR_TYPE,
  WLZ_ERR_COMPTHRESH_TYPE,
  WLZ_ERR_CONNECTIVITY_TYPE,
  WLZ_ERR_INTERPOLATION_TYPE,
  WLZ_ERR_POLYGON_TYPE,
  WLZ_ERR_RASTERDIR_TYPE,
  WLZ_ERR_LINKCOUNT_DATA,
  WLZ_ERR_MEM_ALLOC,
  WLZ_ERR_MEM_FREE,
  WLZ_ERR_READ_EOF,
  WLZ_ERR_READ_INCOMPLETE,
  WLZ_ERR_WRITE_EOF,
  WLZ_ERR_WRITE_INCOMPLETE,
  WLZ_ERR_ALG,
  WLZ_ERR_ALG_SINGULAR,
  WLZ_ERR_ALG_HOMOGENEOUS,
  WLZ_ERR_ALG_CONDITION,
  WLZ_ERR_ALG_CONVERGENCE,
  WLZ_ERR_ALG_NONGLOBAL,
  WLZ_ERR_UNIMPLEMENTED,
  WLZ_ERR_UNSPECIFIED,
  WLZ_ERR_FILE_OPEN,
  WLZ_ERR_FILE_FORMAT,
  WLZ_ERR_IMAGE_TYPE,
  WLZ_ERR_DEGENERATE,
  WLZ_ERR_COUNT
}
 Woolz error codes (or error numbers) have an integer value with WLZ_ERR_NONE, the no error code, defined to be zero. Typedef: WlzErrorNum. More...
 

Functions

WlzErrorNum WlzErrorFromAlg (AlgError algErr)
 Converts an Alg error code to a Woolz error code. More...
 
WlzErrorNum WlzVerifyObject (WlzObject *obj, int fix)
 Verify the object data, fix if possible if paramter fix != 0. Curretnly only the domains of 2D and 3D objects can be verified. More...
 
WlzErrorNum WlzVerifyIntervalDomain (WlzDomain dom, int fix)
 Verify the input interval domain, check domain parameters, intervals etc. Fix errors if requested. More...
 
WlzErrorNum WlzVerifyIntervalLine (WlzIntervalLine *intvline, int fix)
 Detect errors in an interval line structure, fix if requested. More...
 
WlzErrorNum WlzVerifyInterval (WlzInterval *intv, int fix)
 Check an interval structure, fix if requested. More...
 

Detailed Description

Enumeration Type Documentation

Woolz error codes (or error numbers) have an integer value with WLZ_ERR_NONE, the no error code, defined to be zero. Typedef: WlzErrorNum.

Enumerator
WLZ_ERR_NONE 

No error, defined to be zero.

WLZ_ERR_EOO 

End of objects, not necessarily an error.

WLZ_ERR_OBJECT_NULL 

Object pointer NULL.

WLZ_ERR_OBJECT_TYPE 

Object type is invalid or inappropriate.

WLZ_ERR_OBJECT_DATA 

Object data is invalid or inappropriate.

WLZ_ERR_DOMAIN_NULL 

Domain pointer NULL.

WLZ_ERR_DOMAIN_TYPE 

Domain type is invalid or inappropriate.

WLZ_ERR_DOMAIN_DATA 

Domain data is invalid or inappropriate.

WLZ_ERR_VALUES_NULL 

Values pointer NULL.

WLZ_ERR_VALUES_TYPE 

Values type is invalid or inappropriate.

WLZ_ERR_VALUES_DATA 

Values data is invalid or inappropriate.

WLZ_ERR_PROPERTY_NULL 

Property pointer NULL.

WLZ_ERR_PROPERTY_TYPE 

Property type is invalid or inappropriate.

WLZ_ERR_GMELM_NULL 

Geometric model element pointer is NULL.

WLZ_ERR_GMELM_TYPE 

Geometric model element type is invalid or inappropriate.

WLZ_ERR_GMELM_DATA 

Geometric model element data is invalid or inappropriate.

WLZ_ERR_PARAM_NULL 

A library function parameter is NULL.

WLZ_ERR_PARAM_TYPE 

A library function parameter's type is invalid or inappropriate.

WLZ_ERR_PARAM_DATA 

A library function parameter's data is invalid or inappropriate.

WLZ_ERR_INT_DATA 

Data is not int.

WLZ_ERR_SHORT_DATA 

Data is not short.

WLZ_ERR_UBYTE_DATA 

Data is not unsigned byte.

WLZ_ERR_FLOAT_DATA 

Data is not float.

WLZ_ERR_DOUBLE_DATA 

Data is not double.

WLZ_ERR_GREY_TYPE 

Grey value type is invalid or inappropriate.

WLZ_ERR_GREY_DATA 

Grey value data is invalid or inappropriate.

WLZ_ERR_PLANEDOMAIN_TYPE 

Plane domain type is invalid or inappropriate.

WLZ_ERR_PLANEDOMAIN_DATA 

Plane domain data is invalid or inappropriate.

WLZ_ERR_INTERVALDOMAIN_NULL 

Interval domain pointer is NULL.

WLZ_ERR_INTERVALDOMAIN_TYPE 

Interval domain type is invalid or inappropriate.

WLZ_ERR_INTERVALLINE_NULL 

Interval line pointer is NULL.

WLZ_ERR_INTERVAL_NULL 

Interval pointer is NULL.

WLZ_ERR_INTERVAL_DATA 

Interval data is invalid.

WLZ_ERR_INTERVAL_ADJACENT 

Interval is adjacent to another interval.

WLZ_ERR_INTERVAL_BOUND 

Interval bounds are invalid.

WLZ_ERR_INTERVAL_NUMBER 

Number of intervals is incorrect.

WLZ_ERR_TRANSFORM_NULL 

Transform is NULL.

WLZ_ERR_TRANSFORM_DATA 

Transform data is invalid or inappropriate.

WLZ_ERR_TRANSFORM_TYPE 

Transform type is invalid or inappropriate.

WLZ_ERR_VOXELVALUES_TYPE 

Voxel values type is invalid or inappropriate.

WLZ_ERR_COLUMN_DATA 

Domain column bounds are invalid.

WLZ_ERR_LINE_DATA 

Domain line bounds are invalid.

WLZ_ERR_PLANE_DATA 

Domain plane bounds are invalid.

WLZ_ERR_BINARY_OPERATOR_TYPE 

Binary operator type is invalid.

WLZ_ERR_COMPTHRESH_TYPE 

Automatic threshold computation method is invalid.

WLZ_ERR_CONNECTIVITY_TYPE 

Connectivity type is invalid or inappropriate.

WLZ_ERR_INTERPOLATION_TYPE 

Interpolation method is invalid or inappropriate.

WLZ_ERR_POLYGON_TYPE 

Polygon type is invalid or inappropriate.

WLZ_ERR_RASTERDIR_TYPE 

Raster direction is invalid or inappropriate.

WLZ_ERR_LINKCOUNT_DATA 

Link count value is invalid because an object, domain or value table or some other element has been freed.

WLZ_ERR_MEM_ALLOC 

Memory allocation failure.

WLZ_ERR_MEM_FREE 

Memory freeing failure.

WLZ_ERR_READ_EOF 

End of file encountered when reading an object, not necessarily an error.

WLZ_ERR_READ_INCOMPLETE 

End of file or some other error during an object being read.

WLZ_ERR_WRITE_EOF 

End of file encountered when writing to a file.

WLZ_ERR_WRITE_INCOMPLETE 

End of file or some other error during an object being written.

WLZ_ERR_ALG 

General algorithm failure.

WLZ_ERR_ALG_SINGULAR 

Algorithm failure due to a singular matrix or value.

WLZ_ERR_ALG_HOMOGENEOUS 

Algorithm failure due to a homogeneous matrix.

WLZ_ERR_ALG_CONDITION 

Algorithm matrix condition number.

WLZ_ERR_ALG_CONVERGENCE 

Algorithm convergence failure.

WLZ_ERR_ALG_NONGLOBAL 

Algorithm convergence to local not global solution.

WLZ_ERR_UNIMPLEMENTED 

A function has not been implemented.

WLZ_ERR_UNSPECIFIED 

All other errors.

WLZ_ERR_FILE_OPEN 

Error opening a file

WLZ_ERR_FILE_FORMAT 

Format error in input stream or file

WLZ_ERR_IMAGE_TYPE 

Invalid image type for Woolz

WLZ_ERR_DEGENERATE 

Degenerate case, eg planar not volume or all vertices equal.

WLZ_ERR_COUNT 

Not an error but the number of errors!

Function Documentation

WlzErrorNum WlzVerifyObject ( WlzObject obj,
int  fix 
)

Verify the object data, fix if possible if paramter fix != 0. Curretnly only the domains of 2D and 3D objects can be verified.

Returns
Error detected. If fix != 0 then the error may be fixed.
Parameters
objInput object to be verified
fixIf fix != 0 then attempt to fix the error detected.
Source:
WlzVerifyObj.c

References _WlzValues::core, _WlzObject::domain, _WlzPlaneDomain::domains, _WlzPlaneDomain::lastpl, _WlzDomain::p, _WlzPlaneDomain::plane1, _WlzObject::type, _WlzPlaneDomain::type, _WlzObject::values, _WlzVoxelValues::values, _WlzValues::vox, WLZ_2D_DOMAINOBJ, WLZ_3D_DOMAINOBJ, WLZ_ERR_NONE, WLZ_ERR_OBJECT_NULL, WLZ_ERR_PLANEDOMAIN_DATA, WLZ_PLANEDOMAIN_DOMAIN, WlzFreeObj(), WlzMakeMain(), and WlzVerifyIntervalDomain().

WlzErrorNum WlzVerifyIntervalDomain ( WlzDomain  dom,
int  fix 
)

Verify the input interval domain, check domain parameters, intervals etc. Fix errors if requested.

Returns
Error detected in the woolz interval domain. Possible values are WLZ_ERR_INTERVALDOMAIN_NULL, WLZ_ERR_LINE_DATA, WLZ_ERR_COLUMN_DATA, WLZ_ERR_NONE and errors from WlzVerifyIntervalLine().
Parameters
domInput interval domain to be checked.
fixAttempt to fix errors if fix != 0
Source:
WlzVerifyObj.c

References _WlzDomain::i, _WlzIntervalDomain::intvlines, _WlzIntervalDomain::kol1, _WlzIntervalDomain::lastkl, _WlzIntervalDomain::lastln, _WlzIntervalDomain::line1, _WlzIntervalDomain::type, WLZ_ERR_COLUMN_DATA, WLZ_ERR_INTERVALDOMAIN_NULL, WLZ_ERR_LINE_DATA, WLZ_ERR_NONE, WLZ_INTERVALDOMAIN_INTVL, and WlzVerifyIntervalLine().

Referenced by WlzVerifyObject().

WlzErrorNum WlzVerifyIntervalLine ( WlzIntervalLine intvline,
int  fix 
)

Detect errors in an interval line structure, fix if requested.

Returns
Detected error, one of WLZ_ERR_NONE, WLZ_ERR_INTERVALLINE_NULL, WLZ_ERR_INTERVAL_ADJACENT or errors returned by WlzVerifyInterval().
Parameters
intvlineInterval line to be checked
fixFix error if parameter fix != 0
Source:
WlzVerifyObj.c

References _WlzIntervalLine::intvs, _WlzInterval::iright, _WlzIntervalLine::nintvs, WLZ_ERR_INTERVAL_ADJACENT, WLZ_ERR_INTERVAL_NUMBER, WLZ_ERR_INTERVALLINE_NULL, WLZ_ERR_NONE, and WlzVerifyInterval().

Referenced by WlzVerifyIntervalDomain().

WlzErrorNum WlzVerifyInterval ( WlzInterval intv,
int  fix 
)

Check an interval structure, fix if requested.

Returns
Error detected in interval, one of WLZ_ERR_INTERVAL_NULL, WLZ_ERR_INTERVAL_DATA, WLZ_ERR_INTERVAL_BOUND, WLZ_ERR_NONE.
Parameters
intvInterval structure to be tested.
fixFix error if parameter fix != 0.
Source:
WlzVerifyObj.c

References _WlzInterval::ileft, _WlzInterval::iright, WLZ_ERR_INTERVAL_BOUND, WLZ_ERR_INTERVAL_DATA, WLZ_ERR_INTERVAL_NULL, and WLZ_ERR_NONE.

Referenced by WlzVerifyIntervalLine().