read_region ( : Region : FileName : )

Read HORUS regions.

The operator read_region reads regions from a binary file. The data is stored in packed form. Images are created from the regions that have been read. Several images can be stored (in one file) or read simultaneously via the operators write_region and read_region. All region files have the extension '.reg', which is not indicated when reading or writing the file. A search path ('image_dir') can be defined analogous to the operator read_image.


Parameters

Region (output_object)
region -> object

FileName (input_control)
filename.named -> string


Example
/* Reading of regions and giving them grey values. */
  read_image(Img::'bild_test5':) >
  read_region(Regs::'reg_test5':) >
  reduce_domain(Img,Regs:Res::).

Result

If the parameter values are correct the operator read_region returns the value TRUE. If the file cannot be opened FAIL is returned. Otherwise an exception is raised.


Possible Predecessors

read_image


Possible Successors

reduce_domain, disp_region


See also

write_region, read_image



Copyright © 1996-1997 MVTec Software GmbH