size_distribution
sleap.gui.dialogs.size_distribution
¶
Dialog for viewing instance size distribution.
Provides a standalone dialog that wraps the SizeDistributionWidget with navigation support back to the main window.
Classes:
| Name | Description |
|---|---|
SizeDistributionDialog |
Dialog for viewing instance size distribution with navigation. |
SizeDistributionDialog
¶
Bases: QDialog
Dialog for viewing instance size distribution with navigation.
This dialog displays the SizeDistributionWidget and optionally connects navigation signals to the main window.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
'sio.Labels'
|
The Labels object containing labeled frames. |
required |
navigate_callback
|
Optional[Callable[[int, int, int], None]]
|
Optional callback function that takes (video_idx, frame_idx, instance_idx) arguments. Called when user clicks "Go to Frame" on a selected instance. |
None
|
parent
|
Optional[QWidget]
|
Parent widget. |
None
|
Methods:
| Name | Description |
|---|---|
__init__ |
Initialize the dialog. |
set_custom_angle |
Set the custom rotation angle on the widget. |
set_rotation_preset |
Set the rotation preset on the widget. |
Source code in sleap/gui/dialogs/size_distribution.py
__init__(labels, navigate_callback=None, parent=None)
¶
Initialize the dialog.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
'sio.Labels'
|
The Labels object containing labeled frames. |
required |
navigate_callback
|
Optional[Callable[[int, int, int], None]]
|
Optional callback for navigation. |
None
|
parent
|
Optional[QWidget]
|
Parent widget. |
None
|
Source code in sleap/gui/dialogs/size_distribution.py
set_custom_angle(angle)
¶
Set the custom rotation angle on the widget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
angle
|
int
|
Angle in degrees (0-180). |
required |
set_rotation_preset(preset)
¶
Set the rotation preset on the widget.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
preset
|
str
|
One of "Off", "±15", "±180", "Custom" |
required |