geosoft.gxpy.vox_display submodule¶
Geosoft vox display handling, which manages the rendering of a geosoft.gxpy.vox.Vox
in a 3d view.
Classes: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Constants: |
|
Note
Regression tests provide usage examples: vox_display tests
New in version 9.3.1.
-
class
VoxDisplay
(vox, name=None)¶ Bases:
object
Creation and handling of vox displays. Vox displays can be placed into a 3D view for display.
Constructors: solid
:create as a solid, each cell colored from a geosoft.gxpy.group.Color_map
vector
:create as a vector voxel as vectors colored from a geosoft.gxpy.group.Color_map
gxapi_gxvoxd
:create from an existing geosoft.gxapi.GXVOXD
instanceNew in version 9.3.1.
-
color_map
¶ Return the colour map for this vox
-
draw_controls
¶ Vox drawing settings, returned as a tuple:
(box_on, opacity, extent) as (boolean, float, (min_x, min_y, min_z, max_x, max_y, max_z))
Can be set.
New in version 9.3.1.
-
figure_map
(file_name=None, overwrite=True, title=None, legend_label=None, features=('LEGEND', 'NEATLINE'), **kwargs)¶ Create a figure view file from the instance.
Parameters: - file_name – the name of a file for the 3d view. If None a temporary 3d view created.
- overwrite – True to overwrite existing file
- title – Title added to the image
- legend_label – If plotting a legend make this the legned title. The default is the title in the first aggregate layer colour map.
- features –
list of features to place on the map, default is (‘SCALE’, ‘LEGEND’, ‘NEATLINE’)
’LEGEND’ show the colour legend ’NEATLINE’ draw a neat-line around the image - kwargs – passed to
geosoft.gxpy.map.Map.new
New in version 9.3.
-
classmethod
gxapi_gxvoxd
(gxapi_voxd, name=None)¶ Create a VoxDisplay instance from a
geosoft.gxapi.GXVOXD
or ageosoft.gxapi.GXVECTOR3D
instance.Parameters: - gxapi_voxd –
geosoft.gxapi.VOXD
orgeosoft.gxapi.GXVECTOR3D
instance - name – name of the voxel, required for a vector voxel.
- gxapi_voxd –
-
gxvoxd
¶ The
geosoft.gxapi.GXVOXD
instance handle, None for a vector display.
-
is_thematic
¶ True if this is a thematic vox display
-
is_vector
¶ True if this is a vector style display
-
name
¶ instance name, same as the contained Vox name
-
opacity
¶ Opacity between 0. (invisible) and 1. (opaque) can be set.
-
render_mode
¶
-
shell_limits
¶ The data limits of the visible data shell for scalar data. Can be set.
returns: (min, max) limits, data outside this range is transparent, None for no limit
-
classmethod
solid
(vox, color_map=None, zone=0, contour=None)¶ Create a solid colored vox_display from a
geosoft.gxpy.vox.Vox
instance.Parameters: - vox –
geosoft.gxpy.vox.Vox
instance - color_map –
gxpy.group.Color_map
instance, or the name of a file, which may betbl
,zon
,itr
, oragg
. - zone –
Colour distribution method:
ZONE_DEFAULT as set by user global default settings ZONE_LINEAR linearly distributed ZONE_NORMAL normal (Gaussian) distribution ZONE_EQUALAREA each color will occupy an equal area on the image ZONE_LOGLINEAR logarithmic linear distribution ZONE_LAST last used coloring for this vox - contour – break colours on even multiples of contour
New in version 9.3.1.
- vox –
-
unit_of_measure
¶ Unit of data measurement for the contained vox data.
-
classmethod
vector
(vox, vector_cone_specs=(1.0, 4.0, 0.25, 5000), color_map=None, zone=0, contour=None)¶ Create a vector symbol vox_display from a
geosoft.gxpy.vox.Vox
instance.Parameters: - vox –
geosoft.gxpy.vox.Vox
instance - vector_cone_specs – Vector plotting specs
(scale_cell_ratio, height_base_ratio, base_cell_ratio, max_cones).
Default is (1., 4., 0.25, 5000). See
vector_cone_specs
property. - color_map –
gxpy.group.Color_map
instance, or the name of a file, which may betbl
,zon
,itr
, oragg
. - zone –
Colour distribution method:
ZONE_DEFAULT as set by user global default settings ZONE_LINEAR linearly distributed ZONE_NORMAL normal (Gaussian) distribution ZONE_EQUALAREA each color will occupy an equal area on the image ZONE_LOGLINEAR logarithmic linear distribution ZONE_LAST last used coloring for this vox
- contour – break colours on even multiples of contour
New in version 9.3.1.
- vox –
-
vector_cone_specs
¶ Vector plotting specs: (scale_cell_ratio, height_base_ratio, base_cell_ratio, max_cones). Can be set.
scale_cell_ratio scales the maximum cone length to the size of the smallest cell. If None, default is 1.
height_base_ratio is the ration of the cone height to the base size. If None, default is 4.
base_cell_ratio is the maximum base size relative to the minimum cell size. If None, default is 0.25.
max_cones is the maximum number of cones to draw. Voxel is decimated to limit the cones. None to plot all cones, though typically this is limited to about 2000 to improve display performance.
New in version 9.3.1.
-
view_3d
(file_name=None, overwrite=True, plane_2d=False)¶ Create a 3d view (
geosoft.gxpy.view.View_3d
) from the instance.Parameters: - file_name – the name of a file for the 3d view. If None a temporary 3d view created.
- overwrite – True to overwrite existing file
- plane_2d – True to keep the 2D plane. Only keep it if you intend to draw on it otherwise a grey plane will appear in the view.
New in version 9.3.
-
vox
¶ geosoft.gxpy.vox.Vox
instance
-
-
exception
VoxDisplayException
(message)¶ Bases:
geosoft.GXRuntimeError
Exceptions from
geosoft.gxpy.vox_display
.New in version 9.2.