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
volumeNameanyName of the volume to mask.
maskNamesanyNames 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
volumeNamesanyNames 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
volumeNamesanyNames of the volumes to modify.
blendModeanyBlend 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
volumeNamesanyNames of the volumes to modify.
interpolationanyInterpolation 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
volumeNamesanyNames of the volumes to modify.
enableanyIf 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
volumeNamesanyNames of the volumes to modify.
coefficientanyAmbient 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
volumeNamesanyNames of the volumes to modify.
coefficientanyDiffuse 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
volumeNamesanyNames of the volumes to modify.
coefficientanySpecular 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
volumeNamesanyNames of the volumes to modify.
poweranySpecular 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
volumeNamesanyNames of the volumes to modify.
percentageanyGradient 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 (Right/Sagittal, Front/Coronal, or Top/Axial).

Signature:

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

Parameters:

ParameterTypeDescription
volumeNamesanyNames of the volumes to modify.
planeanyPlane index (0=Right/Sagittal, 1=Front/Coronal, 2=Top/Axial).
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
planeIndexanyPlane index (0=Right/Sagittal, 1=Front/Coronal, 2=Top/Axial).
opacityanyOpacity 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
volumeNamesanyNames of the volumes to modify.
planeanyPlane index (0=Right/Sagittal, 1=Front/Coronal, 2=Top/Axial).
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
planeIndexanyPlane index (0=Right/Sagittal, 1=Front/Coronal, 2=Top/Axial).
settingsanyThe settings indicating how the slice plane should be rendered. Create using SlicePlaneRenderSettings = 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
rgbaanyColor 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
volumeNamesanyNames of the volumes to modify.
rgbaanyColor 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
volumeNamesanyNames of the volumes to modify.
rgbaanyColor 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName of the volume to query.
planeanyPlane index (0=Sagittal, 1=Coronal, 2=Axial).

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
volumeNameanyName of the volume to query.
planeIndexanyPlane index (0=Sagittal, 1=Coronal, 2=Axial).

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
volumeNameanyName of the volume to query.
planeanyPlane index (0=Sagittal, 1=Coronal, 2=Axial).

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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNameanyName 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
volumeNamesanyNames of the volumes to modify.
visibleanyIf 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
volumeNamesanyNames of the volumes to modify.
rgbaanyColor 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
volumeNamesanyNames of the volumes to modify.
enableanyIf true, enables 3D clipping; if false, disables it.

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
volumeNameanyName 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
volumeNameanyName of the volume to query.

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


See Also