SourceDisplay#
- class ansys.speos.core.source.SourceDisplay(project, name, description='', metadata=None, source_instance=None, default_parameters=None)#
Bases:
BaseSourceDisplay 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:
project (SourceDisplay.__init__.project)
name (str)
description (str)
source_instance (Optional[ansys.speos.core.kernel.scene.ProtoScene.SourceInstance])
default_parameters (Optional[ansys.speos.core.generic.parameters.DisplayParameters])
Overview#
Set display color space to a predefined color space. |
|
Set user-defined RGB color space for the display. |
|
Save feature: send the local data to the speos server database. |
|
Reset feature: override local data by the one from the speos server database. |
|
Delete display source from server (local data kept). |
Image file URI for the display. |
|
Source physical dimension: x_start in millimeters. |
|
Source physical dimension: x_end in millimeters. |
|
Source physical dimension: y_start in millimeters. |
|
Source physical dimension: y_end in millimeters. |
|
Luminance value for the display. |
|
Contrast ratio for the display. |
|
Axis system for the display. |
|
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:
strImage file URI referenced by the display.
- property SourceDisplay.x_start: float#
Source physical dimension: x_start in millimeters.
- Returns:
floatx_start in millimeters.
- property SourceDisplay.x_end: float#
Source physical dimension: x_end in millimeters.
- Returns:
floatx_end in millimeters.
- property SourceDisplay.y_start: float#
Source physical dimension: y_start in millimeters.
- Returns:
floaty_start in millimeters.
- property SourceDisplay.y_end: float#
Source physical dimension: y_end in millimeters.
- Returns:
floaty_end in millimeters.
- property SourceDisplay.luminance: float#
Luminance value for the display.
- Returns:
floatLuminous 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:
list12-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.IntensityIntensity 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.PredefinedColorSpaceHelper 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.UserDefinedColorSpaceHelper 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.SourceDisplayThis SourceDisplay instance (committed).
- SourceDisplay.reset()#
Reset feature: override local data by the one from the speos server database.
- Returns:
ansys.speos.core.source.SourceDisplayThis 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.SourceDisplayThis SourceDisplay instance (deleted on server).