HOME | Research | Media | Careers | Contacts | Products | Search | Publications | Site Map
CSIRO Mathematics, Informatics and Statistics

 

 

Image Analysis
Biotech Imaging Group
Application Areas
 Biotechnology
 Cellular Screening
 Health
 Asset Monitoring
 Exploration
 Other Areas
Skills
 Segmentation
 Feature Extraction
 Statistical Analysis
 Stereo Vision
 Image Motion
 
Projects
Imaging Services
Imaging Products
Track Record
Publications
Patents
Staff
next up previous contents
Next: LIAR coding Style Up: No Title Previous: Compiling Issues

Data types and portability

Not only do LIAR functions need to interface to different IAS, they must also be portable across different platforms. C's int type is a very rubbery type, on some systems it is two bytes long and on others it is 4 bytes long. This makes it a nuisance for portability. Hence to capture the importance of integer types the LIAR has a standard header called liarlmts.h which deal exculsively with the range of data types. It differs from the standard C header files limits.h and float.h in that it includes definitions where the size of the data is explicity defined in the definition itself.

The LIAR type definitions for a typical 32bit workstation are given in Table 2 along with their max and min values. For example: the SEED_TYPE maximum is SEED_TYPE_MAX and its minimum is SEED_TYPE_MIN.

 

TYPE DEFAULT TYPE_MAX TYPE_MIN
PIX_TYPE unsigned char 0xFF 0
SEED_TYPE int 0x7FFFFFFF -0x80000000
SHRT_TYPE short int 0x7FFF -0x8000
USHRT_TYPE unsigned short 0xFFFF 0
INT_TYPE int 0x7FFFFFFF -0x80000000
UINT_TYPE unsigned 0xFFFFFFFF 0
LONG_TYPE long 0x7FFFFFFF -0x80000000
ULONG_TYPE unsigned long 0xFFFFFFFF 0
FLT_TYPE float 3.40282347e+38 2.93873588e-39
DBL_TYPE double 1.7976931348623157e+308 2.93873587705571880e-308
INT1_TYPE char 127 -127
UINT1_TYPE unsigned char 0xFF 0
INT2_TYPE short int 0x7FFF -0x8000
UINT2_TYPE unsigned short 0xFFFF 0
INT4_TYPE int 0x7FFFFFFF -0x80000000
UINT4_TYPE unsigned 0xFFFFFFFF 0
Table 2:   liarlmts.h Definitions


next up previous contents
Next: LIAR coding Style Up: No Title Previous: Compiling Issues

Ed Breen
Tue Sep 3 17:19:31 EST 1996

© Copyright 2013, CSIRO Australia
Use of this web site and information available from
it is subject to our
Legal Notice and Disclaimer and Privacy Statement