Herror ::write_region (
    Hobject Region,
    const HTuple &FileName
)
void HRegion::WriteRegion (
    const HTuple &FileName
) const
void HRegionArray::WriteRegion (
    const HTuple &FileName
) const

Write regions on file.

The operator ::write_region writes the regions of the input images (in runlength coding) to a binary file. The data is stored in packed form. The output data can be read via the operator ::read_region. The file name is <FileName>.reg. The extension is not indicated.


Parameters

Region (input_object)
region(-array) -> Hobject: HRegion(Array)
Region of the images which are returned.

FileName (input_control)
filename -> HTuple.char *
Name of region file without extension.
Default value: '/tmp/region'


Example
regiongrowing(Img,&Segmente,3,3,5,10) ;
write_region(Segmente,"result1") ;

Result

If the parameter values are correct the operator ::write_region returns the value H_MSG_TRUE. If the file cannot be opened H_MSG_FAIL is returned. Otherwise an exception handling is raised.


Possible Predecessors

::open_window, ::read_image, ::read_region, ::threshold, ::regiongrowing


See also

::read_region


Module

Image / region / XLD management



Copyright © 1996-2002 MVTec Software GmbH