Standard Library function that defines an irregularregion of interest within an image by using the image display system and the mouse.
sizey
yverts
Xo
Yo
Zoom
The write mask for the display is set so that only bit 0 may be written. Bit 0 is erased for all pixels and is used to draw the outline of the region. (This may have to be changed to fit the capabilities and procedures of your device.) The common block COLORS is used to obtain the current color table, which is modified and then restored. The color tables are loaded with odd values complemented and even values unchanged.
A message is printed to assist you in selecting the region with the mouse. The POLYFILLV function is used to compute the subscripts within the region.
OPENR, unit, FILEPATH('whirlpool.img', $
Subdir = 'data'), /Get_Lun
.
a = ASSOC(unit, BYTARR(512, 512))
g = a(0)
FREE_LUN, unit
!Order = 1 LOADCT, 3
g = BYTSCL(g, Top = !D.N_Colors)
WINDOW, 0, Xsize = 512, Ysize = 512 TV, g subs = DEFROI(512, 512)
Figure 2-25 Galaxy image with region of interest defined by DEFROI.
Figure 2-26 Galaxy image with region of interest defined by DEFROI.
g(subs) = !D.N_Colors - g(subs)
TV, g
Figure 2-27 Galaxy image with region of interest inverted.
Figure 2-28 Galaxy image with region of interest inverted.