|
| |
Next: The Image Header
Up: No Title
Previous: Introduction
Firstly, a LIAR function/routine or module is any C/C++ function or group
of functions that:
- are of generic value;
- do not make
assumptions about the environment in which they will run;
-
do not have undesirable side effects, such as: calls to
printf or exit functions and nor do they contain the
definition of a main. The reasons for this are:
other programmers will most probably not use any functions
that takes control and makes assumptions about how messages
are to be displayed on the screen. Therefore LIAR functions
use an established method (see below) for passing
messages. The main aim of the message passing method
is for reporting errors, but this does not rule out its
use in other areas; such as, knowledge based message passing;
-
have low coupling and tight cohesion (see below);
-
are highly observable; that is, it is easy to see what a
function or module is doing. Observability is enhanced by
clear meaningful names for functions and parameters, and by
the use of comments. However, one has to sensible here, long
parameters can also reduce observality especially when several
such long names are strung together to form a given statement.
Observability is also reduced by having your code splattered
with debugging statements and machine dependent ifdef
statements;
-
are prototyped, use well defined macros and associated
types and have appropriate documentation;
-
and - are you ready for it - are a work of ART that
demonstrates the programmer's skills, knowledge and mastery of
the problem at hand and the C/C++ programming language.
While the above list of attributes could pertain to the construction of
any library of source code, to fully understand the LIAR methodology (as
described below) one must understand that a LIAR function must be able
to interface to a variety of image analysis system (IAS). To this end,
we have identified three levels of interface. These are:
- The interpreter or interface level: I-level (NON-LIAR)
- This is how the user, via the IAS, interacts with
the lower-level image analysis routines. The implementation
may be through pop-down menus or via a command line.
It is highly specific to a given IAS.
- In some IAS's this level will simply involve attaching
the new routine. In others, it is more comprehensive,
consisting of making menu entries via templates, adding
usage information and adding default parameters.
- It is through the I-level that calls and arguments
are passed to the ASC-level.
- At this level, initial error checking can be performed;
such as parameter checking.
- The application specific code: ASC-level (HALF-LIAR)
- This is the intermediate level. This level is also
specific to a given IAS. However, methods of implementation,
as discussed below, help to ensure the portability of this
level to other IAS's.
- At this, level error checking - such as
memory allocation validation - is carried out, and any pre or
post processing is also done.
- It is through the ASC-level that calls and arguments
are passed to the LIAR-level.
- The library of image analysis routines: The LIAR-level (100% LIAR)
- This is the lowest-level and it consists of
portable image analysis routines.
- The code at this level must be independent of
image data structures.
The context of how we envisage the LIAR interfacing with the plethora of
IAs is shown in Fig. 1.
Figure 1: LIAR context diagram
Next: The Image Header
Up: No Title
Previous: Introduction
Ed Breen
Tue Sep 3 17:19:31 EST 1996
|