Skip to main content

VolumeRenderPropertiesOperations

Other

Provides an interface for managing render properties of 3D volume objects. This class enables control over visual representation aspects of volume rendering, including opacity, color mapping, and masking, etc.

Import​

import ScriptingApi as api

# Access via Application
app = api.Application()
ops = app.get_volume_render_properties_operations()

Methods​

General​

masking​

Applies masking to a volume using one or more mask objects. Masks a volume image using the specified mask objects. If multiple masks are provided, they are combined using union boolean operation before masking.

Signature:

masking(volumeName: str, maskNames: list) -> None

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to mask.
maskNameslistNames of the mask objects to apply.

clear_masking​

Clears masking from the specified volumes. Removes all mask constraints previously applied to the specified volumes, restoring full visibility of masked voxels.

Signature:

clear_masking(volumeNames: list) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to unmask.

Properties​

set_blend_mode​

Sets the blend mode for the specified volumes. Controls how volumetric data is composited during rendering.

Signature:

set_blend_mode(volumeNames: list, blendMode: int) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
blendModeintBlend mode (0=Composite, 1=Maximum, 2=Minimum, 3=Average, 4=Additive, 5=Isosurface, 6=Slice).

set_interpolation​

Sets the interpolation type for the specified volumes. Controls how voxel values are interpolated during volume rendering.

Signature:

set_interpolation(volumeNames: list, interpolation: int) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
interpolationintInterpolation type (0=Nearest neighbor, 1=Linear).

set_shade_enabled​

Enables or disables shading for the specified volumes. Controls the application of lighting and shading effects to volume rendering.

Signature:

set_shade_enabled(volumeNames: list, enable: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
enableboolIf true, enables shading; if false, disables shading.

set_ambient_coefficient​

Sets the ambient lighting coefficient for the specified volumes. The ambient coefficient controls the intensity of ambient lighting applied to the volume.

Signature:

set_ambient_coefficient(volumeNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
coefficientfloatAmbient coefficient value (range: 0.0 to 1.0).

set_diffuse_coefficient​

Sets the diffuse lighting coefficient for the specified volumes. The diffuse coefficient controls the intensity of diffuse (directional) lighting.

Signature:

set_diffuse_coefficient(volumeNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
coefficientfloatDiffuse coefficient value (range: 0.0 to 1.0).

set_specular_coefficient​

Sets the specular lighting coefficient for the specified volumes. The specular coefficient controls the intensity of specular (shiny) highlights.

Signature:

set_specular_coefficient(volumeNames: list, coefficient: float) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
coefficientfloatSpecular coefficient value (range: 0.0 to 1.0).

set_specular_power​

Sets the specular power (shininess) for the specified volumes. Higher values produce sharper, smaller specular highlights.

Signature:

set_specular_power(volumeNames: list, power: float) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
powerfloatSpecular power value (higher values produce sharper highlights).

set_gradient_opacity_percentage​

Sets the gradient opacity percentage for the specified volumes. Controls the opacity applied based on image gradient magnitude.

Signature:

set_gradient_opacity_percentage(volumeNames: list, percentage: int) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
percentageintGradient opacity percentage (0 - 100).

set_3d_slice_plane_visibility​

Sets the visibility of a specific 3D slice plane for the specified volumes. Controls the display of orthogonal slice planes (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).

Signature:

set_3d_slice_plane_visibility(volumeNames: list, plane: int, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
planeintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).
visibleboolIf true, shows the plane; if false, hides it.

set_3d_slice_planes_visibility​

Sets the visibility of all 3D slice planes for the specified volumes. Simultaneously controls the display of all orthogonal slice planes.

Signature:

set_3d_slice_planes_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows all planes; if false, hides them.

set_3d_plane_texture_opacity​

Sets the texture opacity of a specific 3D slice plane for the specified volumes. Controls how transparent each slice plane appears.

Signature:

set_3d_plane_texture_opacity(volumeNames: list, planeIndex: int, opacity: float) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
planeIndexintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).
opacityfloatOpacity value (range: 0.0 to 1.0).

set_3d_axes_plane_visibility​

Sets the visibility of a specific 3D axes plane for the specified volumes. Controls the display of axes reference planes.

Signature:

set_3d_axes_plane_visibility(volumeNames: list, plane: int, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
planeintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).
visibleboolIf true, shows the axes plane; if false, hides it.

set_3d_axes_planes_visibility​

Sets the visibility of all 3D axes planes for the specified volumes. Simultaneously controls the display of all axes reference planes.

Signature:

set_3d_axes_planes_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows all axes planes; if false, hides them.

set_3d_slice_plane_render_settings​

Sets the render settings for 3D slice planes for the specified volumes.

Signature:

set_3d_slice_plane_render_settings(volumeNames: list, planeIndex: int, settings: SlicePlaneRenderSettings) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
planeIndexintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).
settingsSlicePlaneRenderSettingsThe settings indicating how the slice plane should be rendered. Create using api.SlicePlaneRenderSettings().

set_bounding_box_visibility​

Sets the visibility of the bounding box for the specified volumes. Controls the display of the volume bounding box outline.

Signature:

set_bounding_box_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows the bounding box; if false, hides it.

set_corner_bounding_box_visibility​

Sets the visibility of corner bounding box markers for the specified volumes. Controls the display of corner markers at bounding box vertices.

Signature:

set_corner_bounding_box_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows corner markers; if false, hides them.

set_bounding_box_labels_visibility​

Sets the visibility of bounding box labels for the specified volumes. Controls the display of dimension labels on the bounding box.

Signature:

set_bounding_box_labels_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows labels; if false, hides them.

set_origin_axes_visibility​

Sets the visibility of the origin axes indicator for the specified volumes. Controls the display of the coordinate origin axes at the volume origin.

Signature:

set_origin_axes_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows the origin axes; if false, hides them.

set_bounding_box_color​

Sets the color of the bounding box for the specified volumes. Customizes the RGBA color of the volume bounding box outline.

Signature:

set_bounding_box_color(volumeNames: list, rgba: list) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
rgbalistColor as RGBA array [r, g, b, a] (each 0.0-1.0).

set_corner_bounding_box_color​

Sets the color of corner bounding box markers for the specified volumes. Customizes the RGBA color of corner markers at bounding box vertices.

Signature:

set_corner_bounding_box_color(volumeNames: list, rgba: list) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
rgbalistColor as RGBA array [r, g, b, a] (each 0.0-1.0).

set_bounding_box_labels_color​

Sets the color of bounding box labels for the specified volumes. Customizes the RGBA color of dimension labels on the bounding box.

Signature:

set_bounding_box_labels_color(volumeNames: list, rgba: list) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
rgbalistColor as RGBA array [r, g, b, a] (each 0.0-1.0).

get_blend_mode​

Gets the blend mode for the specified volume.

Signature:

get_blend_mode(volumeName: str) -> int

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: int — Blend mode (0=Composite, 1=Maximum, 2=Minimum, 3=Average, 4=Additive, 5=Isosurface, 6=Slice).


get_interpolation​

Gets the interpolation type for the specified volume.

Signature:

get_interpolation(volumeName: str) -> int

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: int — Interpolation type (0=Nearest neighbor, 1=Linear).


get_gradient_opacity_percentage​

Gets the gradient opacity percentage for the specified volume. Returns the opacity applied based on image gradient magnitude.

Signature:

get_gradient_opacity_percentage(volumeName: str) -> int

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: int — Gradient opacity percentage (0-100).


get_ambient_coefficient​

Gets the ambient lighting coefficient for the specified volume.

Signature:

get_ambient_coefficient(volumeName: str) -> float

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: float — Ambient coefficient value (0.0 to 1.0).


get_diffuse_coefficient​

Gets the diffuse lighting coefficient for the specified volume.

Signature:

get_diffuse_coefficient(volumeName: str) -> float

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: float — Diffuse coefficient value (0.0 to 1.0).


get_specular_coefficient​

Gets the specular lighting coefficient for the specified volume.

Signature:

get_specular_coefficient(volumeName: str) -> float

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: float — Specular coefficient value (0.0 to 1.0).


get_specular_power​

Gets the specular power (shininess) for the specified volume.

Signature:

get_specular_power(volumeName: str) -> float

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: float — Specular power value.


is_shade_enabled​

Gets whether shading is enabled for the specified volume.

Signature:

is_shade_enabled(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if shading is enabled; false otherwise.


get_3d_slice_plane_visibility​

Gets the visibility of a specific 3D slice plane for the specified volume.

Signature:

get_3d_slice_plane_visibility(volumeName: str, plane: int) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.
planeintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).

Returns: bool — True if the plane is visible; false otherwise.


get_3d_plane_texture_opacity​

Gets the texture opacity of a specific 3D slice plane for the specified volume.

Signature:

get_3d_plane_texture_opacity(volumeName: str, planeIndex: int) -> float

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.
planeIndexintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).

Returns: float — Opacity value (0.0 to 1.0).


get_3d_axes_plane_visibility​

Gets the visibility of a specific 3D axes plane for the specified volume.

Signature:

get_3d_axes_plane_visibility(volumeName: str, plane: int) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.
planeintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).

Returns: bool — True if the axes plane is visible; false otherwise.


is_bounding_box_visible​

Gets whether the bounding box is visible for the specified volume.

Signature:

is_bounding_box_visible(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if the bounding box is visible; false otherwise.


is_corner_bounding_box_visible​

Gets whether corner bounding box markers are visible for the specified volume.

Signature:

is_corner_bounding_box_visible(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if corner markers are visible; false otherwise.


are_bounding_box_labels_visible​

Gets whether bounding box labels are visible for the specified volume.

Signature:

are_bounding_box_labels_visible(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if labels are visible; false otherwise.


is_origin_axes_visible​

Gets whether the origin axes indicator is visible for the specified volume.

Signature:

is_origin_axes_visible(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if the origin axes are visible; false otherwise.


Modification​

set_scale_axes_visibility​

Sets the visibility of the scale axes indicator for the specified volumes. Controls the display of the coordinate axes scale indicator.

Signature:

set_scale_axes_visibility(volumeNames: list, visible: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
visibleboolIf true, shows the scale axes; if false, hides them.

set_scale_axes_color​

Sets the color of the scale axes indicator for the specified volumes. Customizes the RGBA color of the coordinate axes scale indicator.

Signature:

set_scale_axes_color(volumeNames: list, rgba: list) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
rgbalistColor as RGBA array [r, g, b, a] (each 0.0-1.0).

set_clipping_enabled​

Enables or disables 3D clipping for the specified volumes. Controls whether the volume rendering is clipped to a region of interest.

Signature:

set_clipping_enabled(volumeNames: list, enable: bool) -> None

Parameters:

ParameterTypeDescription
volumeNameslistNames of the volumes to modify.
enableboolIf true, enables 3D clipping; if false, disables it.

get_3d_slice_plane_clipping_mode​

Gets the clipping mode of a specific 3D slice plane.

Signature:

get_3d_slice_plane_clipping_mode(volumeName: str, planeIndex: int) -> int

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.
planeIndexintPlane index (0=Plane 1/YZ, 1=Plane 2/XZ, 2=Plane 3/XY).

Returns: int — Clipping mode (0=off, 1=keep front, 2=keep back).


is_scale_axes_visible​

Gets whether the scale axes indicator is visible for the specified volume.

Signature:

is_scale_axes_visible(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if the scale axes are visible; false otherwise.


is_clipping_enabled​

Gets whether 3D clipping is enabled for the specified volume.

Signature:

is_clipping_enabled(volumeName: str) -> bool

Parameters:

ParameterTypeDescription
volumeNamestrName of the volume to query.

Returns: bool — True if 3D clipping is enabled; false otherwise.


See Also​