Herror ::dump_window (
    const HTuple &WindowHandle,
    const HTuple &Device,
    const HTuple &FileName
)
void HWindow::DumpWindow (
    const HTuple &Device,
    const HTuple &FileName
) const

Write the window content to a file.

::dump_window writes the content of the window to a file. You may continue to process this file by convenient printers or other programs. The content of a display is prepared for each special device (Device), i.e. it is formated in a manner, that you may print this file directly or it can be processed furthermore by a graphical program.

To transform gray values the current color table of the window is used, i.e. the values of ::set_lut_style remain unconsidered.

The gray values of the display have in general a poorer resolution then the original gray values of the output images. This results in a reduced resolution (default setting are e.g. 200 gray levels with 8 bit planes) for the representation of gray values (see also ::disp_channel). You may request the amount of actual disposable gray levels by ::get_system. To modify them before opening the first window you may use ::set_system.

Possible values for Device 'postscript' PostScript - file. Filetermination: <FileName>.ps ['postscript',Width,Height] PostScript - file with specification of the output size. $Width$ and $Height$ refer to the size. File extension: <FileName>.ps 'tiff' TIFF - file, 1 sample per pixel, 8 bit per sample, uncompressed. File extension: <FileName>.tiff 'tiff_rgb' TIFF - file, 1 byte per pixel incl. current color table or 3 bytes per sample (dependent on VGA card), uncompressed. File extension: <FileName>.tiff 'bmp' Windows-BMP format, gray value image, 1 byte per pixel. File extension: <FileName>.bmp 'bmp_rgb' Windows-BMP format, RGB image, 3 bytes per pixel. The color resolution pendends on the VGA card. File extension: <FileName>.bmp


Attention

Under X Windows, the HALCON window must be completely visible on the root window, because otherwise the contents of the window cannot be read due to limitations in X Windows. If larger graphical displays are to be written to a file, the window type 'pixmap' can be used.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window identifier.

Device (input_control)
string(-array) -> HTuple.char * / long
Name of the target device or of the graphic format.
Default value: 'postscript'
List of values: 'postscript', 'tiff', 'tiff_rgb', 'bmp', 'bmp_rgb'

FileName (input_control)
filename -> HTuple.char *
File name (without extension).
Default value: 'halcon_dump'


Example
/* PostScript - Dump of Image and Regions */
disp_image(Image,WindowHandle) ;
set_colored(WindowHandle,12) ;
disp_region(Regions,WindowHandle) ;
dump_window(WindowHandle,"postscript","/tmp/halcon_dump") ;
system_call("lp -d ps /tmp/halcon_dump.ps") ;

Result

If the appropriate window is valid and the specified parameters are correct ::dump_window returns H_MSG_TRUE. If necessary an exception handling is raised.


Possible Predecessors

::open_window, ::set_draw, ::set_color, ::set_colored, ::set_line_width, ::open_textwindow, ::disp_region


Possible Successors

::system_call


See also

::open_window, ::open_textwindow, ::set_system


Module

System



Copyright © 1996-2002 MVTec Software GmbH