GXVOXD class

class GXVOXD(handle=0)[source]

GXVOXD class.

GXVOX Display object.

__init__(handle=0)[source]

Initialize self. See help(type(self)) for accurate signature.

classmethod create(vox, table, zone, contour)[source]

Create a new GXVOXD

Parameters
  • vox (GXVOX) – GXVOX Object

  • table (str) – Color table name, “” for default

  • zone (int) – ITR_ZONE constants

  • contour (float) – Color contour interval or rDUMMY

Returns

GXVOXD handle, terminates if creation fails

Return type

GXVOXD

New in version 6.2.

License: Geosoft Open License

Note: Fails if the GXVOX object is NOT thematic. (See the create_thematic function.)

classmethod create_itr(vox, itr)[source]

Create a new GXVOXD with our own GXITR

Parameters
Returns

GXVOXD handle, terminates if creation fails

Return type

GXVOXD

New in version 6.2.

License: Geosoft Open License

Note: Fails if the GXVOX object is thematic. (See the create_thematic function.)

classmethod create_thematic(vox)[source]

Create a new GXVOXD for a thematic GXVOX object.

Parameters

vox (GXVOX) – GXVOX Object

Returns

GXVOXD handle, terminates if creation fails

Return type

GXVOXD

New in version 7.0.

License: Geosoft Open License

Note: A thematic voxel is one where the stored integer values represent indices into an internally stored GXTPAT object. Thematic voxels contain their own color definitions, and normal numerical operations, such as applying ITRs for display, are not valid.

To determine if a GXVOX object is thematic, use the is_thematic function.

Fails if the GXVOX object is NOT thematic.

get_draw_controls(box, trans, min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the draw controls

Parameters

New in version 6.2.

License: Geosoft Open License

get_itr(itr)[source]

Get the GXITR of the GXVOXD

Parameters

itr (GXITR) – GXITR object

New in version 6.2.

License: Geosoft Open License

get_name(name)[source]

Gets the file name of the voxel.

Parameters

name (str_ref) – File name returned

New in version 8.2.

License: Geosoft Open License

get_render_mode(render_mode)[source]

Get voxel render mode.

Parameters

render_mode (int_ref) – VOXELRENDER_MODE constants

New in version 9.5.

License: Geosoft Open License

get_shell_controls(min, max)[source]

Get the shell controls

Parameters

New in version 6.2.

License: Geosoft Open License

get_thematic_info(tpat, vv)[source]

Get a copy of a thematic voxel’s GXTPAT object and a GXVV containing the current display selections.

Parameters
  • tpat (GXTPAT) – GXTPAT object to get

  • vv (GXVV) – GXVV (int) object to fill with current selections

New in version 9.3.

License: Geosoft Open License

is_null()[source]

Check if this is a null (undefined) instance

Returns

True if this is a null (undefined) instance, False otherwise.

Return type

bool

is_thematic()[source]

Is this a thematic voxel?

Returns

1 if GXVOX is thematic

Return type

int

New in version 9.3.

License: Geosoft Open License

Note: A thematic voxel is one where the stored integer values represent indices into an internally stored GXTPAT object. Thematic voxels contain their own color definitions, and normal numerical operations, such as applying ITRs for display, are not valid.

classmethod null()[source]

A null (undefined) instance of GXVOXD

Returns

A null GXVOXD

Return type

GXVOXD

set_draw_controls(box, trans, min_x, min_y, min_z, max_x, max_y, max_z)[source]

Set the draw controls

Parameters
  • box (int) – Draw Bounding Box

  • trans (float) – Transparency

  • min_x (float) – Min X

  • min_y (float) – Min Y

  • min_z (float) – Min Z

  • max_x (float) – Max X

  • max_y (float) – Max Y

  • max_z (float) – Max Z

New in version 6.2.

License: Geosoft Open License

set_itr(itr)[source]

Set the GXITR of the GXVOXD

Parameters

itr (GXITR) – GXITR object

New in version 6.2.

License: Geosoft Open License

set_render_mode(render_mode)[source]

Get voxel render mode.

Parameters

render_mode (int) – VOXELRENDER_MODE constants

New in version 9.5.

License: Geosoft Open License

set_shell_controls(min, max)[source]

Set the shell controls

Parameters
  • min (float) – Min Value (rDUMMY for no limit)

  • max (float) – Max Value (rDUMMY for no limit)

New in version 6.2.

License: Geosoft Open License

set_thematic_selection(vv)[source]

Get a copy of a thematic voxel’s GXTPAT object and a GXVV containing the current display selections.

Parameters

vv (GXVV) – GXVV (int) object to set the current selections to

New in version 9.3.

License: Geosoft Open License

VOXELRENDER_MODE constants

Render Modes

VOXELRENDER_FILL

Render voxel cells

gxapi.VOXELRENDER_FILL = 0
VOXELRENDER_EDGES

Render wireframe only

gxapi.VOXELRENDER_EDGES = 1
VOXELRENDER_FILL_EDGES

Render both voxel cells and wireframe

gxapi.VOXELRENDER_FILL_EDGES = 2
VOXELRENDER_SMOOTH

Trilinear interpolation

gxapi.VOXELRENDER_SMOOTH = 3