Routines (alphabetical) > Object Classes > Analysis Object Classes > IDLanROI::ContainsPoints

# IDLanROI::ContainsPoints

The IDLanROI::ContainsPoints function method determines whether the given data coordinates are contained within the closed polygon region.

## Syntax

Result = Obj->[IDLanROI::]ContainsPoints( X [, Y [, Z]] )

## Return Value

The return value is a vector of values, one per provided point, indicating whether that point is contained. Valid values within this return vector include:

- 0 = Exterior. The point lies strictly out of bounds of the ROI
- 1 = Interior. The point lies strictly inside the bounds of the ROI
- 2 = On edge. The point lies on an edge of the ROI boundary
- 3 = On vertex. The point matches a vertex of the ROI

A point is considered to be exterior if:

- The point falls within the boundary of an interior region (hole)
- The point does not lie in the plane of the region
- The region TYPE property is set to 0 (points) or 1 (path)

## Arguments

### X

A vector providing the X components of the points to be tested. If the Y and Z arguments are not specified, X must be a two-dimensional array with the leading dimension either 2 or 3 ([2,*] or [3,*]), in which case, X[0,*] represents the X values, X[1,*] represents the Y values, and X[2,*] represents the Z values.

### Y

A vector providing the Y components of the points to be tested.

### Z

A scalar or vector providing the Z component(s) of the points to be tested. If not provided, the Z components default to 0.0.

## Keywords

None.

## Examples

See "Testing an ROI for Point Containment" (Chapter 6, Image Processing in IDL in the `help/pdf` directory of your IDL installation).

## Version History

5.3 | Introduced