This routine is obsolete and has been replaced with the following ENVIROI methods: AddGeometry, AddPixels, AddThreshold, and AddVectorRecords.

Use this procedure to define point, polyline, and polygon objects in an ROI. Each ROI can be composed of multiple and/or mixed objects. For example, a single ROI may have 100 individual points and three polygons. Using a ROI_ID returned from ENVI_CREATE_ROI, each call to ENVI_DEFINE_ROI adds one object to the ROI definition (multiple points may be added with a single call). Once you create an ROI, you can use it in processing routines or save it to an ROI file.

Syntax


ENVI_DEFINE_ROI, ROI_ID [, /NO_UPDATE] [, /POINT] [, /POLYGON] [, /POLYLINE], XPTS=array, YPTS=array

Arguments


ROI_ID

This is a single ID returned from the function ENVI_CREATE_ROI or ENVI_GET_ROI_IDS.

Keywords


NO_UPDATE (optional)

Set this keyword to indicate the newly created ROI should not appear in the ROI Tool dialog.

POINT (optional)

Set this keyword to indicate that the x and y arrays define a set of points. When you set POINT, you cannot set POLYLINE and POLYGON.

POLYLINE (optional)

Set this keyword to indicate that the x and y arrays define a polyline. A polyline is a series of x,y points that are connected with a straight line. You can define only one polyline with each call to ENVI_DEFINE_ROI. When you set POLYLINE, you cannot set POINT and POLYGON.

POLYGON (optional)

Set this keyword to indicate that the x and y arrays define a polygon. A polygon is a closed area that is defined by a series of connected x,y points. In order to properly close the polygon, the first and last point in XPTS and YPTS must be the same. When you set POLYGON, you cannot set POINT and POLYLINE.

XPTS

Use this keyword to specify an array of x points of the specified type. XPTS is in file coordinates. You must set one of the keywords POINT, POLYLINE, or POLYGON, to indicate the type of XPTS.

YPTS

Use this keyword to specify an array of y points of the specified type. YPTS is in file coordinates. You must set one of the keywords POINT, POLYLINE, or POLYGON, to indicate the type ‘of YPTS.