next up previous contents
Next: Generating a low level Up: Commands for working with Previous: Finding objects from a

Executing macros according to a selection in a graphic structure

 

tabular2819

The command executes a given macro for all the objects defined by (x,y)-points. If one point has been given, then an object matching to it is tried to be found. If several points have been given, then the points are interpreted as corner points of the region and all the objects in the region are found. The points are converted to the identifiers of objects' owners, and then for each identifier the given macro is executed as follows: runcmd <macro> <graphic> <id>.

The objects are found from a low level image and, thus, the coordinates given to the command are typically in the space tex2html_wrap_inline6564 . In practice, points to this procedure are got by mouse events.

Note that <macro> is finished by the mark ";". Thus one can also give parameters for a macro.

Example: A graphic structure has been created and the layer 2 is selected to be displayed. Then the topmost object for the point (0.2,0.2) is found. Secondly, all the objects with different owners are found from the region which is located in the left-bottom corner of the graphic structure.

...
NDA> mkgrp grp1 -s s1
NDA> layer grp1 -l 2
...
NDA> runevent grp1 -mac selectNeuron; 0.2 0.2
...

The macro "selectNeuron" can select neurons to a classified data (the grouping of the neurons). It may seem as the following:

...
addcld -c $1grp
addcld -c $1grp -cl $1grp.sel
updcld -cl $1grp.sel $2
...



Erkki Hakkinen
Thu Sep 24 11:51:34 EET DST 1998