set_system ( : : Systemparameter, Value : )

Setting of HORUS system parameters.

The operator set_system allows to change different system parameters with relation to the runlength.

Available system parameters:

'neighbourhood'
                This parameter is used with all procedures which examine
                neighborhood relations: connection,
                fetch_contour, fetch_chain, 
                fetch_polygon, fetch_thickness,
                boundary, neighbour, 
                paint_region__, disp_region,
                fill_up, contlength.
                Value:   4 or 8
                default: 8

'default_font'
                Whenever a window is opened, a font will be set for the
                text output, whereby the 'default_font' will be used.
                If the preset font cannot be found, another fontname can
                be set before opening the window.
                Value:   Filename of the fonts
                default: Fixed

'image_dir'
                Image files (e.g.\ read_image and
                read_sequence) will be looked for in the
                currently used directory and in 'image_dir' (if no absolute
                paths are indicated). More than one directory name 
                (searchpaths) can be indicated, seperated by spaces.
                The path can also be determined using the environment variable
                HORUSIMAGES.
                Value:   pathname
                default: '/usr/local/horus/images'

'lut_dir'
                Color tables (set_lut) which are realized as an
                ASCII-file will be looked for in the currently used directory
                and in 'lut_dir' (if no absolute paths are indicated).
                If HORUSROOT is set, HORUS\ will search the color tables in
                the subdirectory "lut".
                Value:   pathname
                default: '/usr/local/horus/lut'

'reference_dir'
                The HTML and postscript sources of the HORUS\ documentation
                will be looked for in the currently used directory or in
                'reference_dir'.
                This system parameter is necessary for example using
                the operator disp_info.
                This parameter can also be set by the environment variable 
                HORUSROOT before initializing HORUS. In this case the
                variable must indicate the directory above the help 
                directories (that is the HORUS-Homedirectory):
                e.g.: '/usr/local/horus'
                Value:   pathname
                default: '/usr/local/horus/doc/ps/reference/c'

'help_dir'
                The online textfiles {german, english}.hlp, .sta, .key,
                .num and .idx will be looked for in the currently used 
                directory or in 'help_dir'. This system parameter is necessary
                for instance using the operators proc_info and
                param_info. 
                This parameter can also be set by the environment variable 
                HORUSROOT before initializing HORUS. 
                In this case the variable must indicate the directory above 
                the help directories (that is the HORUS-Homedirectory): 
                e.g.: '/usr/local/horus'
                Value:   pathname
                default: '/usr/local/horus/help'

'user_help_dir'
                User defined helpfiles will be looked for in this directory.
                Their layout must be the same as the layout of the system
                immanent helpfiles and they must also be generated from the
                .def-file by using the HComp.
                This path may also be set by the environment variable
                HORUSHELP. If this path has not been set, the helpfiles will
                be searched in the directory 'help_dir'. In this case the
                filenames must be marked by .user, otherwise this marking is
                optional:
                {german or english}[.user].hlp, .sta, .key, .num und .idx

'init_new_image'
                Determines whether new images shall be set to 0 before using 
                filters. This is not necessary if always the whole image is
                filtered or if the data of not filtered image areas are
                unimportant.
                Value:   'true' or 'false'
                default: 'true'

'store_empty_region'
                Quite a number of operations will lead to the creation
                of objects with an empty region (= no imagepoints)
                (e.g.\ intersection,threshold__, etc.).
                This parameter determines whether the object with
                an empty region will be returned as a result ('true')
                or whether it will be ignored ('false') that is no result
                will be returned.
                Value:   'true' or 'false'
                default: 'false'

'no_object_result'
                Determines how operations processing iconic objects shall
                react if the object tuplet is empty (= no objects).
                Available values for Value:
                'true':       the error will be ignored 
                'false':      the procedure returns FALSE
                'fail':       the procedure returns FAIL
                'void':       the procedure returns VOID
                'exception':  an exception is raised
                default: 'exception'

'empty_region_result'
                Controls the reaction of procedures concerning input
                objects with empty regions which actually are not
                useful for such objects (e.g.\ certain region features,
                segmentation, etc.).
                Available values for Value:
                'true':       the error will be ignored if possible
                'false':      the procedure returns FALSE
                'fail':       the procedure returns FAIL
                'void':       the procedure returns VOID
                'exception':  an exception is raised
                default: 'true'

'backing_store'
                Determines whether the window content will be 
                refreshed in case of overlapping of the windows. Some 
                implementations of X Window are faulty; in order to
                avoid these errors, the storing of contents can be
                deactivated.
                It may be recommendable in some cases to deactivate
                the security mechanism, if e.g. performance / memory
                is what matters.
                Value:   true or false
                default: true

'flush_graphic'
                After each HORUS\ procedure which creates a graphic output,
                a flush operation will be executed in order to display the
                data immediately on screen. This is not necessary with all 
                programs (e.g.\ if everything is done with the help of the
                mouse). In this case 'flush_graphic' can be set to 'false'
                to improve the performance.
                Value:   'true' or 'false'
                default: 'true'

'flush_file'
                This parameter determines whether the output into a file
                (also to the terminal) shall be buffered or not.
                If the output is to be buffered, in general the data will be 
                displayed on the terminal only after entering the operator
                fnew_line.
                Value:   'true' or 'false'
                default: 'true'

'compact_obj'
                Some host languages like IF/Prolog offer the possibility
                to operate image object processing in two different modes.
                The first mode implies that an individual key is used 
                for each object. Thereby the typical tuplets or lists of
                image objects are created. The second mode implies that all
                objects which result from a whole procedure will be combined
                in one common key (which can be recognized from the bigger
                numerical values). As in this mode less data have to be
                translated into the host language, the performance can hereby
                be improved. As object keys and so called compact keys can
                be distinguished quite clearly, the modes can be switched 
                at the runtime of the program. Please note that
                switching the mode is not possible in all host languages 
                (C and OPS5).
                Value:   'true' or 'false'
                default: 'false'

'x_package'
                The output of image data via the network may cause errors
                owing to the heavy load on the computer or on the network.
                In order to avoid this, the data are
                transmitted in small packages. If the computer is used
                locally, these units can be enlarged at will. This can
                lead to a notably improved output performance.
                Value:   package size (in bytes)
                default: 4096
                
'num_grey_4' 
                Number of the colors to be reserved under X Windows to allow
                the output of graylevels (disp_grey) on a machine 
                with 4 bitplanes (16 colors).
                Please note! This value may only be changed before the first 
                window has been opened on the machine.
                    Value:   2 - 12
                    default: 8
'num_grey_6' 
                Number of the colors to be reserved under X Windows to allow
                the output of graylevels (disp_grey) on a machine
                with 6 bitplanes (64 colors).
                Please note! This value may only be changed before the first 
                window has been opened on the machine.
                Value:   2 - 62
                    default: 50
                
'num_grey_8' 
                Number of the colors to be reserved under X Windows to allow
                the output of graylevels (disp_grey) on a machine
                with 8 bitplanes (256 colors).
                Please note! This value may only be changed before the first 
                window has been opened on the machine.
                Value:   2 - 254
                    default: 200
                
'num_grey_percentage'
                Under X Windows HORUS\ reserves a part of the available
                colors for the representation of gray values 
                (disp_grey).
                This shall interfere with other X applications as little as
                possible. However, if HORUS\ does not succeed in reserving
                a miminum percentage of 'num_grey_percentage' of the necessary
                colors on the X server, a certain amount of the lookup table
                will be claimed for the HORUS\ graylevels regardless of the
                consequences. This may result in undesired shifts of color
                when switching between HORUS\ windows and windows of other
                applications, or (outside HORUS) if a window-dump is
                generated. 
                The number of the real graylevels to be reserved depends on 
                the number of available bitplanes on the outputmachine (see 
                also 'num_grey_*'. Naturally no colors will be reserved on
                monochrome machines - the graylevels will instead be dithered
                when displayed. If graylevel-displays are used, only different
                shades of gray will be applied ('black', 'white', 'grey',
                etc.). Machines with 2 or 3 bitplanes will be
                considered monochrome machines, machines with 5 (7) bitplanes
                like machines with 4 (6) bitplanes, and machines having more
                than 8 bitplanes like machines with 8 bitplanes. A special
                case are machines providing a 24 bit display (true color
                machines). Naturally no colors are reserved for the display
                of graylevels in this case.
                Attention: This value may only be changed before the first
                window has been opened on the machine. Before opening the 
                first window on a machine with x bitplanes, num_grey_x 
                indicates the number of colors which have to be reserved for 
                the display of graylevels, afterwards, however, it will 
                indicate the number of colors which actually have been 
                reserved.
                Value:   0 - 100
                default: 60
                
'num_graphic_2' 
                Number of the graphic colors to be reserved by HORUS\ under
                X Windows (concerning the operators disp_region
                etc.) on a machine with 2 bitplanes (4 colors).
                Attention: This value may only be changed before the first
                window has been opened on the machine. 
                Values:  0 - 2
                default: 2
                
'num_graphic_4' 
                Number of the graphic colors to be reserved by HORUS\ under
                X Windows (concerning the operators disp_region
                etc.) on a machine with 4 bitplanes (16 colors).
                Attention: This value may only be changed before the first
                window has been opened on the machine. 
                Values:  0 - 14
                default: 5
                
'num_graphic_6' 
                Number of the graphic colors to be reserved by HORUS\ under
                X Windows (concerning the operators disp_region
                etc.) on a machine with 6 bitplanes (64 colors).
                Attention: This value may only be changed before the first
                window has been opened on the machine. 
                Values:  0 - 62
                default: 10
                
'num_graphic_8' 
                Number of the graphic colors to be reserved by HORUS\ under
                X Windows (concerning the operators disp_region
                etc.) on a machine with 8 bitplanes (256 colors).
                Attention: This value may only be changed before the first
                window has been opened on the machine. 
                Values:  0 - 64
                default: 20
                
'graphic_colors'
                HORUS\ reserves the first num_graphic_x colors form this
                list of color names as graphic colors. As a default 
                HORUS\ uses this same list which is also returned by using
                query_all_colors.
                However, the list can be changed individually: hereby a
                tuplet of color names will be returned as value. It is
                recommendable that such a tuplet always includes the colors
                'black' and 'white', and optionally also 'red', 'green' and
                'blue'. If 'default' is set as value, HORUS\ returns to the
                initial setting.
                Note: On graylevel machines not the first x colors will be
                reserved, but the first x shades of gray from the list.
                Attention: This value may only be changed before the first
                window has been opened on the machine.  
                Value:   Tuplets of X Windows color names 
                default: see also query_all_colors

'last_pixel'
                With some graphic processors (255 colors) not all entries of
                the color table can be used, as this would lead to a breakdown
                of the program (e.g.\ M-Vax 2000). The value 'last_pixel' 
                indicates the pixel with the highest index 
                (0..255) that may still be used.
                Value:   highest index in the color table 
                default: 253

'current_runlength_number'
                Regions will be stored internally in a certain runlengthcode.
                This parameter can determine the maximum number of chords
                which may be used for representing a region.
                Please note that some procedures raise the number on their
                own if necessary.
                The value can be enlarged as well as reduced.
                Value:   maximum number of chords 
                default: 20000

'clip_region'
                Determines whether the regions of iconic objects of the
                HORUS\ database will be clipped to the currently
                used image size or not. This is the case for example
                in procedures like circle,
                rectangle1 or dilation1. 
                See also: init_horus
                Value:   'true' or 'false'
                default: 'true'

'update_lut'
                Determines whether the HORUS\ color lookup tables are adapted
                according to their environment or not.
                Value:   'true' or 'false'
                default: 'true'                 


Parameters

Systemparameter (input_control)
string(-array) -> string
Name of the system parameter to be changed.
Default value: 'image_dir'
List of values: 'neighbourhood', 'default_font', 'image_dir', 'lut_dir', 'reference_dir', 'help_dir', 'user_help_dir', 'init_new_image', 'store_empty_region', 'no_object_result', 'empty_region_result', 'backing_store', 'flush_graphic', 'flush_file', 'compact_object', 'x_package', 'num_grey_4', 'num_grey_6', 'num_grey_8', 'num_grey_percentage', 'num_graphic_2', 'num_graphic_4', 'num_graphic_6', 'num_graphic_8', 'num_graphic_percentage', 'graphic_colors', 'last_pixel', 'current_runlength_number', 'clip_region', 'update_lut'

Value (input_control)
string(-array) -> string / integer / real
New value of the system parameter.
Default value: 'true'
Suggested values: 'true', 'false', 0, 4, 8, 100, 140, 255


Result

The operator set_system returns the value TRUE if the parameters are correct. Otherwise an exception will be raised.


Possible Predecessors

init_horus, get_system, set_check


See also

get_system, set_check



Copyright © 1996-1997 MVTec Software GmbH