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 C prototyping standard Up: LIAR coding Style Previous: Handling dimensionality

Handling variants

Functions are usually written with a specific data type in mind. However, image data comes in a variety of types, such as char, int, float etc. Therefore, functions should be written to cope with different types. In the LIAR, functions cope with different data types by either: 1) being passed the data type in the argument list; or 2) there exists different versions of the same function specifically written to handle each data type expected. The latter approach is often the simplist. Figure 10 provides an example of how different versions of the same function can be declared. Note, these two functions are just copies of each other, with the appropriate data type changed. Also note, that the name of the function reflects the data type expected by the function.



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