The operator description starts with the header
extern_operator_name <- InternCProcedure
[InputObjects:OutputObjects:InputCtrlParams:OuputCtrlParams]
Note that in contrast to the short version described in section “Short Operator Description”, the header doesn't contain any information about the types of the control parameters (e.g. $f) and does not end with a semicolon (;).
The following example is a short version of the operator description for the dynamic threshold operator dyn_threshold. For better legibility there should be a comment at the beginning of every operator description, like
/*********************** dyn_threshold *************************/ dyn_threshold <- CIPDynThreshold [OrigImage,ThresholdImage:RegionDynThresh:Offset,LightDark:]
Comments within def-files are indicated according to the C syntax (/* ... */).
There are a couple of conventions/restrictions concerning the names of parameters: All word parts should begin with a capital letter (e.g., RegionDynThresh). They are directly concatenated without any separating character. Especially, they must not contain any underscore (`_')! The external operator name exclusively consists of lower-case characters with word parts separated by underscores. This operator name is used within C programs, low-level calls7) of the operator in C++, or within HDevelop.
The four parameter classes (input-/output iconic object/control) are separated by colons (:). One class is described by a list of all parameter names within the class separated by commas. If there is no member of a class for an operator, the list remains empty. The example described above defines the following mapping between parameters and parameter classes:
| parameter class | keyword (cf. this page) | parameter in the example |
| input iconic objects | input_object | OrigImage, ThresholdImage |
| output iconic objects | output_object | RegionDynThresh |
| input control parameters | input_control | Offset, LightDark |
| output control parameters | output_control | ∅ |
It is helpful to follow certain conventions, when choosing names for parameters. They should be meaningful (i.e. one should avoid names like `Aac') and consequently should be given in English. It is convention to denote parameters that specify a position within an image matrix by Row(s) (not Line!) and Column(s) or Col(s). Parameters defining a dimension are called Width and Height.
| 7) Within the
HALCON/C++ and HALCON/.NET class hierarchy corresponding methods
use slightly
different conventions: extern_operator_name is transformed into
ExternOperatorName.
|