segmentation

class trame_slicer.app.ui.segmentation.BrushParametersState(brush_diameter_slider: trame_slicer.app.ui.slider.SliderState = <factory>, brush_diameter_mode: trame_slicer.segmentation.paint_effect_parameters.BrushDiameterMode = <BrushDiameterMode.ScreenRelative: 2>, use_sphere_brush: bool = True)

Bases: object

brush_diameter_mode: BrushDiameterMode = 2
use_sphere_brush: bool = True
brush_diameter_slider: SliderState
class trame_slicer.app.ui.segmentation.BrushParametersUI(typed_state: TypedState[BrushParametersState], **kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.DrawEffectState(brush_interaction_mode: trame_slicer.segmentation.scissors_effect_parameters.BrushInteractionMode = <BrushInteractionMode.CONTINUOUS: 1>)

Bases: object

brush_interaction_mode: BrushInteractionMode = 1
class trame_slicer.app.ui.segmentation.DrawEffectUI(**kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.IslandsEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.IslandsState(mode: trame_slicer.segmentation.segmentation_effect_islands.SegmentationIslandsMode = <SegmentationIslandsMode.KEEP_LARGEST_ISLAND: 1>, minimum_size: int = 1000)

Bases: object

minimum_size: int = 1000
mode: SegmentationIslandsMode = 1
class trame_slicer.app.ui.segmentation.LogicalOperatorsEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.LogicalOperatorsSegmentationMode(*values)

Bases: Enum

COPY = 1
ADD = 2
SUBTRACT = 3
INTERSECT = 4
INVERT = 5
CLEAR = 6
FILL = 7
class trame_slicer.app.ui.segmentation.LogicalOperatorsState(logical_operator: trame_slicer.app.ui.segmentation.logical_operators_effect_ui.LogicalOperatorsSegmentationMode = <LogicalOperatorsSegmentationMode.COPY: 1>, reference_segment_id: str | None = None, available_segments: list[trame_slicer.app.ui.segmentation.segment_state.SegmentState] = <factory>)

Bases: object

logical_operator: LogicalOperatorsSegmentationMode = 1
reference_segment_id: str | None = None
available_segments: list[SegmentState]
class trame_slicer.app.ui.segmentation.PaintEffectState(brush_diameter_slider: trame_slicer.app.ui.slider.SliderState = <factory>, brush_diameter_mode: trame_slicer.segmentation.paint_effect_parameters.BrushDiameterMode = <BrushDiameterMode.ScreenRelative: 2>, use_sphere_brush: bool = True)

Bases: BrushParametersState

class trame_slicer.app.ui.segmentation.PaintEffectUI(**kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.ScissorsEffectState(brush_interaction_mode: trame_slicer.segmentation.scissors_effect_parameters.BrushInteractionMode = <BrushInteractionMode.CONTINUOUS: 1>, fill_mode: trame_slicer.segmentation.scissors_effect_parameters.ScissorsEffectFillMode = <ScissorsEffectFillMode.ERASE_INSIDE: 1>, range_mode: trame_slicer.segmentation.scissors_effect_parameters.ScissorsEffectRangeMode = <ScissorsEffectRangeMode.UNLIMITED: 1>, symmetric_distance: float = 0)

Bases: object

brush_interaction_mode: BrushInteractionMode = 1
fill_mode: ScissorsEffectFillMode = 1
range_mode: ScissorsEffectRangeMode = 1
symmetric_distance: float = 0
class trame_slicer.app.ui.segmentation.ScissorsEffectUI(**kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.SegmentDisplayState(border_thickness: trame_slicer.app.ui.slider.SliderState = <factory>, opacity_mode: trame_slicer.segmentation.segmentation_display.SegmentationOpacityEnum = <SegmentationOpacityEnum.BOTH: 3>, opacity_2d: trame_slicer.app.ui.slider.SliderState = <factory>, opacity_3d: trame_slicer.app.ui.slider.SliderState = <factory>, show_3d: bool = False, is_extended: bool = False)

Bases: object

is_extended: bool = False
opacity_mode: SegmentationOpacityEnum = 3
show_3d: bool = False
border_thickness: SliderState
opacity_2d: SliderState
opacity_3d: SliderState
class trame_slicer.app.ui.segmentation.SegmentDisplayUI(typed_state: TypedState[SegmentDisplayState], **kwargs)

Bases: VCard

class trame_slicer.app.ui.segmentation.SegmentEditAreaState(mask_select: trame_slicer.app.ui.dynamic_select.DynamicSelectState = <factory>, overwrite_mode: trame_slicer.segmentation.segmentation_overwrite_mode.SegmentationOverwriteMode = <SegmentationOverwriteMode.OVERWRITE_ALL: 0>, is_extended: bool = False)

Bases: object

is_extended: bool = False
overwrite_mode: SegmentationOverwriteMode = 0
mask_select: DynamicSelectState
class trame_slicer.app.ui.segmentation.SegmentEditAreaUI(segment_edit_area_typed_state: TypedState[SegmentEditAreaState], **kwargs)

Bases: VCard

class trame_slicer.app.ui.segmentation.SegmentEditState(segment_state: trame_slicer.app.ui.segmentation.segment_state.SegmentState = <factory>, is_color_dialog_visible: bool = False)

Bases: object

is_color_dialog_visible: bool = False
segment_state: SegmentState
class trame_slicer.app.ui.segmentation.SegmentEditUI(**kwargs)

Bases: AbstractElement

cancel_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

color_changed

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

name_changed

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.SegmentEditorState(segment_list: trame_slicer.app.ui.segmentation.segment_list.SegmentListState = <factory>, segment_display: trame_slicer.app.ui.segmentation.segment_display_ui.SegmentDisplayState = <factory>, segment_edit_area: trame_slicer.app.ui.segmentation.segment_edit_area_ui.SegmentEditAreaState = <factory>, can_undo: bool = False, can_redo: bool = False, active_effect_name: str = '')

Bases: object

active_effect_name: str = ''
can_redo: bool = False
can_undo: bool = False
segment_list: SegmentListState
segment_display: SegmentDisplayState
segment_edit_area: SegmentEditAreaState
class trame_slicer.app.ui.segmentation.SegmentEditorToolbarUI(editor_ui: SegmentEditorUI, **kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.SegmentEditorUI(**kwargs)

Bases: FlexContainer

add_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

build_effect_buttons(all: bool = True, **kwargs)
build_undo_redo_buttons()
delete_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

edit_segment_color_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

effect_button_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

get_effect_ui(effect_type: type[SegmentationEffect])
is_active_effect(effect_type: type[SegmentationEffect])
redo_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

select_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

sub_state(sub_name)
toggle_segment_visibility_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

undo_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.SegmentEditorUndoRedoUI(editor_ui: SegmentEditorUI, **kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.SegmentList(typed_state: TypedState[SegmentListState], edit_ui: SegmentEditUI, **kwargs)

Bases: VList

List view for the current active segments.

build_menu_items()
delete_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

edit_segment_color_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

select_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

toggle_segment_visibility_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.SegmentListState(segments: list[trame_slicer.app.ui.segmentation.segment_state.SegmentState] = <factory>, active_segment_id: str = '')

Bases: object

active_segment_id: str = ''
segments: list[SegmentState]
class trame_slicer.app.ui.segmentation.SegmentState(name: str = '', color: str = '', segment_id: str = '', is_visible: bool = True)

Bases: object

color: str = ''
is_visible: bool = True
name: str = ''
segment_id: str = ''
class trame_slicer.app.ui.segmentation.SmoothingEffectMode(*values)

Bases: Enum

MEDIAN = 1
OPENING = 2
CLOSING = 3
GAUSSIAN = 4
JOINT = 5
class trame_slicer.app.ui.segmentation.SmoothingEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.SmoothingState(mode: trame_slicer.app.ui.segmentation.smoothing_effect_ui.SmoothingEffectMode = <SmoothingEffectMode.MEDIAN: 1>, apply_to_all_visibile_segments: bool = False, kernel_size: float = 3.0, standard_deviation: float = 3.0, smoothing_factor: float = 0.5, brush: trame_slicer.app.ui.segmentation.brush_parameters_ui.BrushParametersState = <factory>)

Bases: object

apply_to_all_visibile_segments: bool = False
kernel_size: float = 3.0
mode: SmoothingEffectMode = 1
smoothing_factor: float = 0.5
standard_deviation: float = 3.0
brush: BrushParametersState
class trame_slicer.app.ui.segmentation.ThresholdEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

auto_threshold_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

use_as_mask_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

class trame_slicer.app.ui.segmentation.ThresholdState(threshold_slider: trame_slicer.app.ui.slider.RangeSliderState = <factory>)

Bases: object

threshold_slider: RangeSliderState
class trame_slicer.app.ui.segmentation.VolumeIntensityRangeMaskState(threshold_slider: trame_slicer.app.ui.slider.RangeSliderState = <factory>, is_visible: bool = False, is_enabled: bool = False)

Bases: object

is_enabled: bool = False
is_visible: bool = False
threshold_slider: RangeSliderState
class trame_slicer.app.ui.segmentation.VolumeIntensityRangeMaskUI(**kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.brush_parameters_ui module

class trame_slicer.app.ui.segmentation.brush_parameters_ui.BrushParametersState(brush_diameter_slider: trame_slicer.app.ui.slider.SliderState = <factory>, brush_diameter_mode: trame_slicer.segmentation.paint_effect_parameters.BrushDiameterMode = <BrushDiameterMode.ScreenRelative: 2>, use_sphere_brush: bool = True)

Bases: object

brush_diameter_slider: SliderState
brush_diameter_mode: BrushDiameterMode = 2
use_sphere_brush: bool = True
class trame_slicer.app.ui.segmentation.brush_parameters_ui.BrushParametersUI(typed_state: TypedState[BrushParametersState], **kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.draw_effect_ui module

class trame_slicer.app.ui.segmentation.draw_effect_ui.DrawEffectState(brush_interaction_mode: trame_slicer.segmentation.scissors_effect_parameters.BrushInteractionMode = <BrushInteractionMode.CONTINUOUS: 1>)

Bases: object

brush_interaction_mode: BrushInteractionMode = 1
class trame_slicer.app.ui.segmentation.draw_effect_ui.DrawEffectUI(**kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.islands_effect_ui module

class trame_slicer.app.ui.segmentation.islands_effect_ui.IslandsState(mode: trame_slicer.segmentation.segmentation_effect_islands.SegmentationIslandsMode = <SegmentationIslandsMode.KEEP_LARGEST_ISLAND: 1>, minimum_size: int = 1000)

Bases: object

mode: SegmentationIslandsMode = 1
minimum_size: int = 1000
class trame_slicer.app.ui.segmentation.islands_effect_ui.IslandsEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

trame_slicer.app.ui.segmentation.logical_operators_effect_ui module

class trame_slicer.app.ui.segmentation.logical_operators_effect_ui.LogicalOperatorsSegmentationMode(*values)

Bases: Enum

COPY = 1
ADD = 2
SUBTRACT = 3
INTERSECT = 4
INVERT = 5
CLEAR = 6
FILL = 7
class trame_slicer.app.ui.segmentation.logical_operators_effect_ui.LogicalOperatorsState(logical_operator: trame_slicer.app.ui.segmentation.logical_operators_effect_ui.LogicalOperatorsSegmentationMode = <LogicalOperatorsSegmentationMode.COPY: 1>, reference_segment_id: str | None = None, available_segments: list[trame_slicer.app.ui.segmentation.segment_state.SegmentState] = <factory>)

Bases: object

logical_operator: LogicalOperatorsSegmentationMode = 1
reference_segment_id: str | None = None
available_segments: list[SegmentState]
class trame_slicer.app.ui.segmentation.logical_operators_effect_ui.LogicalOperatorsEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

trame_slicer.app.ui.segmentation.paint_effect_ui module

class trame_slicer.app.ui.segmentation.paint_effect_ui.PaintEffectState(brush_diameter_slider: trame_slicer.app.ui.slider.SliderState = <factory>, brush_diameter_mode: trame_slicer.segmentation.paint_effect_parameters.BrushDiameterMode = <BrushDiameterMode.ScreenRelative: 2>, use_sphere_brush: bool = True)

Bases: BrushParametersState

class trame_slicer.app.ui.segmentation.paint_effect_ui.PaintEffectUI(**kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.scissors_effect_ui module

class trame_slicer.app.ui.segmentation.scissors_effect_ui.ScissorsEffectState(brush_interaction_mode: trame_slicer.segmentation.scissors_effect_parameters.BrushInteractionMode = <BrushInteractionMode.CONTINUOUS: 1>, fill_mode: trame_slicer.segmentation.scissors_effect_parameters.ScissorsEffectFillMode = <ScissorsEffectFillMode.ERASE_INSIDE: 1>, range_mode: trame_slicer.segmentation.scissors_effect_parameters.ScissorsEffectRangeMode = <ScissorsEffectRangeMode.UNLIMITED: 1>, symmetric_distance: float = 0)

Bases: object

brush_interaction_mode: BrushInteractionMode = 1
fill_mode: ScissorsEffectFillMode = 1
range_mode: ScissorsEffectRangeMode = 1
symmetric_distance: float = 0
class trame_slicer.app.ui.segmentation.scissors_effect_ui.ScissorsEffectUI(**kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.segment_display_ui module

class trame_slicer.app.ui.segmentation.segment_display_ui.SegmentDisplayState(border_thickness: trame_slicer.app.ui.slider.SliderState = <factory>, opacity_mode: trame_slicer.segmentation.segmentation_display.SegmentationOpacityEnum = <SegmentationOpacityEnum.BOTH: 3>, opacity_2d: trame_slicer.app.ui.slider.SliderState = <factory>, opacity_3d: trame_slicer.app.ui.slider.SliderState = <factory>, show_3d: bool = False, is_extended: bool = False)

Bases: object

border_thickness: SliderState
opacity_mode: SegmentationOpacityEnum = 3
opacity_2d: SliderState
opacity_3d: SliderState
show_3d: bool = False
is_extended: bool = False
class trame_slicer.app.ui.segmentation.segment_display_ui.SegmentDisplayUI(typed_state: TypedState[SegmentDisplayState], **kwargs)

Bases: VCard

trame_slicer.app.ui.segmentation.segment_edit_area_ui module

class trame_slicer.app.ui.segmentation.segment_edit_area_ui.SegmentEditAreaState(mask_select: trame_slicer.app.ui.dynamic_select.DynamicSelectState = <factory>, overwrite_mode: trame_slicer.segmentation.segmentation_overwrite_mode.SegmentationOverwriteMode = <SegmentationOverwriteMode.OVERWRITE_ALL: 0>, is_extended: bool = False)

Bases: object

mask_select: DynamicSelectState
overwrite_mode: SegmentationOverwriteMode = 0
is_extended: bool = False
class trame_slicer.app.ui.segmentation.segment_edit_area_ui.SegmentEditAreaUI(segment_edit_area_typed_state: TypedState[SegmentEditAreaState], **kwargs)

Bases: VCard

trame_slicer.app.ui.segmentation.segment_edit_ui module

class trame_slicer.app.ui.segmentation.segment_edit_ui.SegmentEditState(segment_state: trame_slicer.app.ui.segmentation.segment_state.SegmentState = <factory>, is_color_dialog_visible: bool = False)

Bases: object

segment_state: SegmentState
is_color_dialog_visible: bool = False
class trame_slicer.app.ui.segmentation.segment_edit_ui.SegmentEditUI(**kwargs)

Bases: AbstractElement

color_changed

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

cancel_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

name_changed

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

trame_slicer.app.ui.segmentation.segment_editor_ui module

class trame_slicer.app.ui.segmentation.segment_editor_ui.SegmentEditorState(segment_list: trame_slicer.app.ui.segmentation.segment_list.SegmentListState = <factory>, segment_display: trame_slicer.app.ui.segmentation.segment_display_ui.SegmentDisplayState = <factory>, segment_edit_area: trame_slicer.app.ui.segmentation.segment_edit_area_ui.SegmentEditAreaState = <factory>, can_undo: bool = False, can_redo: bool = False, active_effect_name: str = '')

Bases: object

segment_list: SegmentListState
segment_display: SegmentDisplayState
segment_edit_area: SegmentEditAreaState
can_undo: bool = False
can_redo: bool = False
active_effect_name: str = ''
class trame_slicer.app.ui.segmentation.segment_editor_ui.SegmentEditorUI(**kwargs)

Bases: FlexContainer

toggle_segment_visibility_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

edit_segment_color_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

delete_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

select_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

add_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

effect_button_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

undo_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

redo_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

build_effect_buttons(all: bool = True, **kwargs)
build_undo_redo_buttons()
sub_state(sub_name)
is_active_effect(effect_type: type[SegmentationEffect])
get_effect_ui(effect_type: type[SegmentationEffect])
class trame_slicer.app.ui.segmentation.segment_editor_ui.SegmentEditorToolbarUI(editor_ui: SegmentEditorUI, **kwargs)

Bases: FlexContainer

class trame_slicer.app.ui.segmentation.segment_editor_ui.SegmentEditorUndoRedoUI(editor_ui: SegmentEditorUI, **kwargs)

Bases: FlexContainer

trame_slicer.app.ui.segmentation.segment_list module

class trame_slicer.app.ui.segmentation.segment_list.SegmentListState(segments: list[trame_slicer.app.ui.segmentation.segment_state.SegmentState] = <factory>, active_segment_id: str = '')

Bases: object

segments: list[SegmentState]
active_segment_id: str = ''
class trame_slicer.app.ui.segmentation.segment_list.SegmentList(typed_state: TypedState[SegmentListState], edit_ui: SegmentEditUI, **kwargs)

Bases: VList

List view for the current active segments.

toggle_segment_visibility_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

edit_segment_color_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

delete_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

select_segment_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

build_menu_items()
class trame_slicer.app.ui.segmentation.segment_list.SegmentListMenu(segment_list_ui: SegmentList, **kwargs)

Bases: VMenu

trame_slicer.app.ui.segmentation.segment_state module

class trame_slicer.app.ui.segmentation.segment_state.SegmentState(name: str = '', color: str = '', segment_id: str = '', is_visible: bool = True)

Bases: object

name: str = ''
color: str = ''
segment_id: str = ''
is_visible: bool = True

trame_slicer.app.ui.segmentation.smoothing_effect_ui module

class trame_slicer.app.ui.segmentation.smoothing_effect_ui.SmoothingEffectMode(*values)

Bases: Enum

MEDIAN = 1
OPENING = 2
CLOSING = 3
GAUSSIAN = 4
JOINT = 5
class trame_slicer.app.ui.segmentation.smoothing_effect_ui.SmoothingState(mode: trame_slicer.app.ui.segmentation.smoothing_effect_ui.SmoothingEffectMode = <SmoothingEffectMode.MEDIAN: 1>, apply_to_all_visibile_segments: bool = False, kernel_size: float = 3.0, standard_deviation: float = 3.0, smoothing_factor: float = 0.5, brush: trame_slicer.app.ui.segmentation.brush_parameters_ui.BrushParametersState = <factory>)

Bases: object

mode: SmoothingEffectMode = 1
apply_to_all_visibile_segments: bool = False
kernel_size: float = 3.0
standard_deviation: float = 3.0
smoothing_factor: float = 0.5
brush: BrushParametersState
class trame_slicer.app.ui.segmentation.smoothing_effect_ui.SmoothingEffectUI(**kwargs)

Bases: FlexContainer

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

trame_slicer.app.ui.segmentation.threshold_effect_ui module

class trame_slicer.app.ui.segmentation.threshold_effect_ui.ThresholdState(threshold_slider: trame_slicer.app.ui.slider.RangeSliderState = <factory>)

Bases: object

threshold_slider: RangeSliderState
class trame_slicer.app.ui.segmentation.threshold_effect_ui.ThresholdEffectUI(**kwargs)

Bases: FlexContainer

auto_threshold_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

apply_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

use_as_mask_clicked

Signal implementation. Can be connected to one or more callables. When called, will call associated callables with the provided args and kwargs.

Provides utility methods and contextmanager to control signal execution. Can be used both as class property and instance.

Parameters:

type_info – Types of arguments expected by the signal.

trame_slicer.app.ui.segmentation.volume_intensity_range_mask_effect_ui module

class trame_slicer.app.ui.segmentation.volume_intensity_range_mask_effect_ui.VolumeIntensityRangeMaskState(threshold_slider: trame_slicer.app.ui.slider.RangeSliderState = <factory>, is_visible: bool = False, is_enabled: bool = False)

Bases: object

threshold_slider: RangeSliderState
is_visible: bool = False
is_enabled: bool = False
class trame_slicer.app.ui.segmentation.volume_intensity_range_mask_effect_ui.VolumeIntensityRangeMaskUI(**kwargs)

Bases: FlexContainer