DEFROI

Loading…

Search Results

DEFROI

The DEFROI function defines an irregular region of interest of an image using the image display system and the cursor and mouse. DEFROI only works for interactive, pixel oriented devices with a cursor and an exclusive or writing mode. Regions may have at most 1000 vertices.

DEFROI does not function correctly when used with draw widgets. See CW_DEFROI.

This routine is written in the IDL language. Its source code can be found in the file defroi.pro in the lib subdirectory of the IDL distribution.

Example

; Create an image:TVSCL, DIST(200,200); Call DEFROI. The cursor becomes active in the graphics window.; Define a region and click the right mouse button:X = DEFROI(200, 200); Print subscripts of points included in the defined region:PRINT, X

Using DEFROI

After calling DEFROI, click in the image with the left mouse button to mark points on the boundary of the region of interest. The points are connected in sequence. Alternatively, press and hold the left mouse button and drag to draw a curved region. Click the middle mouse button to erase points. The most recently-placed point is erased first. Click the right mouse button to close the region. The function returns after the region has been closed.