NAME:
SCAN2D_ROI
PURPOSE:
This program let the user interactively define the ROI for a given
2D image array, calculate the 2D-ROI statistics, and generate ROI
report.
It supports 3 types of ROI: rectangle, polygon, and pixel value
range filter.
CATEGORY:
Widgets.
CALLING SEQUENCE:
SCAN2D_ROI, Im, X, Y [,HEADER=header] [,ROIFILE=roifile] $
[,RPTFILE=rptfile] [,MODE=mode] [,COMMENT=comment] [GROUP=group]
INPUTS:
IM: Input 2D image array
X: X data vector
Y: Y data vector
KEYWORD PARAMETERS:
HEADER: A string list which holds two strings. If specified it
will be plotted at the top left corner of the TV screen.
COMMENT: A string used to annotate the special ROI. If specified
it will be put in the statistic report.
ROIFILE: A string to specifies the default RectROI filename used.
RPTFILE: A string to specifies the default ROI report filename used.
MODE: Starts the scan2d_roi with desired ROI mode, default is
RectROI mode.
SIDE EFFECTS:
A directory ROI will be created at the current directory. All the
ROI related files will be saved under this directory.
If the keyword rptfile is defined on the command line, then the
location of ROI directory will be determined from the rptfile.
The default filenames used for ROI report, rectangle ROI, polygon
ROI are 'tmproi.rpt', 'tmproi.xdr', 'tmproi.xdr.poly' respectively.
RESTRICTIONS:
The ROI filename entered in the file selection dialog is used by the
rectangle ROI. The ROI filename is automatically suffixed by '.poly'
for the polygon ROI.
EXAMPLE:
For a given 2D image array IM corresponding to X and Y vectors,
to run the scan2d_roi program to get various 2D-ROI statistic
report:
scan2d_roi,im,x,y
MODIFICATION HISTORY:
Written by: Ben-chin Cha, June 23, 1999.
01-24-2001 bkc R1.1
Handle large image array, improve the efficiency
12-05-2003 bkc Fix the problem of inverse order of ROI
08-07-2004 bkc Add support for true color devices
(See scan2d_roi.pro)