Herror ::set_part (
    const HTuple &WindowHandle,
    const HTuple &Row1,
    const HTuple &Column1,
    const HTuple &Row2,
    const HTuple &Column2
)
void HWindow::SetPart (
    const HTuple &Row1,
    const HTuple &Column1,
    const HTuple &Row2,
    const HTuple &Column2
) const

Modify the displayed image part.

::set_part modifies the image part that is displayed in the window. (Row1,Column1) denotes the upper left corner and (Row2,Column2) the lower right corner of the image part to display. The changed values are used by grayvalue output operators (::disp_image, ::disp_color) as well as region output operators (::disp_region)).

If only part of an image is displayed, it will be zoomed to full window size. The zooming interpolation method can be set with ::set_part_style. ::get_part returns the values of the image part to display.


Attention

After a call of ::set_part, some operators like ::draw_region, ::draw_ellipse, etc. can no longer be used.


Parameters

WindowHandle (input_control)
window -> HTuple.long
Window_id.

Row1 (input_control)
rectangle.origin.y -> HTuple.long
Row of the upper left corner of the chosen image part.
Default value: 0

Column1 (input_control)
rectangle.origin.x -> HTuple.long
Column of the upper left corner of the chosen image part.
Default value: 0

Row2 (input_control)
rectangle.corner.y -> HTuple.long
Row of the lower right corner of the chosen image part.
Default value: 512
Restriction: Row2 >= Row1

Column2 (input_control)
rectangle.corner.x -> HTuple.long
Column of the lower right corner of the chosen image part.
Default value: 512
Restriction: Column2 >= Column1


Example
get_system("width",Width) ;
get_system("height",Height) ;
set_part(WindowHandle,0,0,Height-1,Width-1) ;
disp_image(Image,WindowHandle) ;
draw_rectangle1(WindowHandle,&Row1,&Column1,&Row2,&Column2) ;
set_part(WindowHandle,Row1,Column1,Row2,Column2) ;
disp_image(Image,WindowHandle) ;

Result

::set_part returns H_MSG_TRUE if the window is valid. Otherwise an exception handling is raised.


Possible Predecessors

::get_part


Possible Successors

::set_part_style, ::disp_image, ::disp_region


Alternatives

::affine_trans_image


See also

::get_part, ::set_part_style, ::disp_region, ::disp_image, ::disp_color


Module

System



Copyright © 1996-2002 MVTec Software GmbH