Routines (alphabetical) > Object Classes > Graphics Object Classes > IDLgrVolume::PickVoxel

# IDLgrVolume::PickVoxel

Syntax | Arguments | Keywords | Version History

The IDLgrVolume::PickVoxel function method computes the coordinates of the voxel projected to a location specified by the 2-D device coordinates point, [xi, yi], and the current Z-buffer. The function returns the volume indices as a a vector of three long integers. If the selected point is not within the volume, this function returns [-1,-1,-1].

## Syntax

Result = Obj->[IDLgrVolume::]PickVoxel ( Win, View, Point [, PATH=objref(s)] )

## Return Value

Returns the volume indices as a a vector of three long integers. If the selected point is not within the volume, this function returns [-1,-1,-1].

## Arguments

### Win

The IDLgrWindow object from which the Z-buffer is to be used.

### View

The IDLgrView object that contains the volume.

### Point

The [x, y] viewport coordinates of the point chosen.

## Keywords

### PATH

Set this keyword to a single object reference or a vector of object references. This keyword specifies the path in the graphics hierarchy to map the device position to a voxel coordinate. Each path object reference specified with this keyword must contain an alias. The voxel coordinate is computed for the version of the object falling within the specified path. If this keyword is not set, the PARENT properties determine the path from the current object to the top of the graphics hierarchy and no alias paths are pursued.

Note: For more information on aliases, refer to the ALIAS keyword in IDLgrModel::Add.

## Version History

5.0 | Introduced