PixelConfigurationWidget
PixelConfigurationWidget
#
Bases: QWidget
A Widget to define the pixel size configurations.
Each pixel size configuration can be linked to any device and property. However, it's important to note that all pixel size configurations must include the same devices and properties. The only variation allowed between different configurations is in the values of the device properties.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parent
|
QWidget | None
|
Optional parent widget, by default None |
None
|
mmcore
|
CMMCorePlus | None
|
Optional |
None
|
_check_for_errors() -> bool
#
Check for errors in the pixel configurations.
_on_affine_value_changed() -> None
#
Update the affine transformations in the configuration map.
_on_apply() -> None
#
Update the current pixel size configurations.
_on_px_table_selection_changed() -> None
#
Update property and viewer table when selection in the px table changes.
_on_px_table_value_changed() -> None
#
Update the data of the pixel table when the value changes.
_on_px_value_changed() -> None
#
Update the pixel size value in the configuration map.
_on_resolutionID_name_changed(item: QTableWidgetItem) -> None
#
Update the resolutionID name in the configuration map.
_on_rows_inserted(parent: Any, start: int, end: int) -> None
#
Set the data of a newly inserted resolutionID in the _px_table.
_show_error_message(msg: str) -> bool
#
Show an error message.
_update_affine_transformations(px_value: float) -> None
#
Update the affine transformations.
_update_other_resolutionIDs(selected_resID_row: int, selected_resID_props: list[Setting]) -> None
#
Update the data of in all resolutionIDs if different than the data of the selected resolutionID. All the resolutionIDs should have the same devices and properties.
_value_to_dict(value: list[PixelSizePreset]) -> dict[str, PixelSizePreset]
#
list[PixelSizePreset] to dict[PixelSizePreset.name: PixelSizePreset].
setValue(value: list[PixelSizePreset]) -> None
#
Set the state of the widget describing the pixel configurations.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value
|
list[PixelSizePreset][PixelSizePreset]
|
The list of pixel configurations data to set. |
required |
Example:
input = [
PixelSizePreset(
name='Res10x',
settings=[Setting('Objective', 'Label', 'Nikon 10X S Fluor')],
pixel_size_um=1.0
),
...
]
value() -> list[PixelSizePreset]
#
Return the current state of the widget describing the pixel configurations.
Returns:
Type | Description |
---|---|
list[PixelSizePreset][PixelSizePreset]
|
A list of pixel configurations data. |
Example:
output = [
PixelSizePreset(
name='Res10x',
settings=[Setting('Objective', 'Label', 'Nikon 10X S Fluor')],
pixel_size_um=1.0
),
...
]
Example#
pixel_configuration_widget.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|