SourceDisplay#

class ansys.speos.core.source.SourceDisplay(project, name, description='', metadata=None, source_instance=None, default_parameters=None)#

Bases: BaseSource

Display Source.

By default, image uri is empty and luminance values is 50.

This feature wraps both: - ansys.api.speos.source.v1.source_pb2.SourceTemplate.Display - ansys.api.speos.scene.v2.scene_pb2.Scene.SourceInstance.DisplayProperties

Parameters:

Overview#

set_pre_defined_color_space

Set display color space to a predefined color space.

set_userdefined_color_space

Set user-defined RGB color space for the display.

commit

Save feature: send the local data to the speos server database.

reset

Reset feature: override local data by the one from the speos server database.

delete

Delete display source from server (local data kept).

image_file_uri

Image file URI for the display.

x_start

Source physical dimension: x_start in millimeters.

x_end

Source physical dimension: x_end in millimeters.

y_start

Source physical dimension: y_start in millimeters.

y_end

Source physical dimension: y_end in millimeters.

luminance

Luminance value for the display.

contrast_ratio

Contrast ratio for the display.

axis_system

Axis system for the display.

intensity

Intensity settings for the display source.

Import detail#

from ansys.speos.core.source import SourceDisplay

Property detail#

property SourceDisplay.image_file_uri: str#

Image file URI for the display.

Supported formats include PNG, JPEG, BMP, TIFF, RGB, HDR/EXR where applicable.

Returns:
str

Image file URI referenced by the display.

property SourceDisplay.x_start: float#

Source physical dimension: x_start in millimeters.

Returns:
float

x_start in millimeters.

property SourceDisplay.x_end: float#

Source physical dimension: x_end in millimeters.

Returns:
float

x_end in millimeters.

property SourceDisplay.y_start: float#

Source physical dimension: y_start in millimeters.

Returns:
float

y_start in millimeters.

property SourceDisplay.y_end: float#

Source physical dimension: y_end in millimeters.

Returns:
float

y_end in millimeters.

property SourceDisplay.luminance: float#

Luminance value for the display.

Returns:
float

Luminous flux expressed as luminance (cd/m^2).

property SourceDisplay.contrast_ratio: int | None#

Contrast ratio for the display.

The underlying protobuf field is optional. When unset it behaves as None from the Python API perspective (the proto scalar default is 0). None means Infinite contrast ratio, while any integer value represents a finite contrast ratio.

Returns:
Optional[int]

Contrast ratio if set, otherwise 0 (unset behavior preserved by proto).

property SourceDisplay.axis_system: list#

Axis system for the display.

Returns:
list

12-element axis system vector describing origin and axes (Ox,Oy,Oz,Xx,Xy,Xz,Yx,Yy,Yz,Zx,Zy,Zz).

property SourceDisplay.intensity: ansys.speos.core.intensity.Intensity#

Intensity settings for the display source.

Returns:
ansys.speos.core.intensity.Intensity

Intensity object tied to the scene for this display.

Method detail#

SourceDisplay.set_pre_defined_color_space()#

Set display color space to a predefined color space.

This returns a helper object allowing selection of sRGB or AdobeRGB presets.

Returns:
ansys.speos.core.source.BaseSource.PredefinedColorSpace

Helper object for choosing a predefined color space.

SourceDisplay.set_userdefined_color_space()#

Set user-defined RGB color space for the display.

Returns:
ansys.speos.core.source.BaseSource.UserDefinedColorSpace

Helper providing access to red/green/blue spectrum selection and white point.

SourceDisplay.commit()#

Save feature: send the local data to the speos server database.

Returns:
ansys.speos.core.source.SourceDisplay

This SourceDisplay instance (committed).

SourceDisplay.reset()#

Reset feature: override local data by the one from the speos server database.

Returns:
ansys.speos.core.source.SourceDisplay

This SourceDisplay instance (reset).

SourceDisplay.delete()#

Delete display source from server (local data kept).

Deletes any locally-managed spectra created for a user-defined color space and deletes the feature from the server. Does not cascade-delete the intensity.

Returns:
ansys.speos.core.source.SourceDisplay

This SourceDisplay instance (deleted on server).