logic
- class trame_slicer.app.logic.AbstractDynamicSelectLogic(state: TypedState[DynamicSelectState])
-
Abstract logic handling VSelect with dynamic complex VSelect content and value. Not to be used for simple VSelect to static Enum list.
- Deriving classes need to implement:
_set_slicer_state: Set Slicer state to input IDynamicSelectItem instance
_get_slicer_state: Get current Slicer state as IDynamicSelectItem instance
_get_current_items: List of all available items
Select trame state can be refreshed manually by calling the update_ui_from_slicer method.
- current_index_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.
- select_item(item: T)
- update_available_items()
- update_ui_from_slicer()
- class trame_slicer.app.logic.BaseLogic(server: Server, slicer_app: SlicerApp, state_type: type[T] | None)
Bases:
Generic[T]- property data: T
- property name: T
- property scene: vtkMRMLScene
- property server: Server
- property state: State
- sub_state(sub_name) TypedState
- class trame_slicer.app.logic.DrawEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[DrawEffectState,U],Generic[U]- property effect: SegmentationEffectDraw
- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.IDynamicSelectItem
Bases:
ABC- abstractmethod matches(other: IDynamicSelectItem) bool
- class trame_slicer.app.logic.IslandsEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[IslandsState,SegmentationEffectIslands]- set_effect_ui(islands_ui: IslandsEffectUI) None
- set_ui(ui: SegmentEditorUI) None
- class trame_slicer.app.logic.LoadVolumeLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[LoadVolumeState]- set_ui(ui: LoadVolumeUI)
- volume_loaded
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.logic.LogicalOperatorsEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[LogicalOperatorsState,SegmentationEffectLogicalOperators]- set_effect_ui(logical_operators_ui: LogicalOperatorsEffectUI)
- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.MarkupsButtonLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic- set_ui(ui: MarkupsButton)
- class trame_slicer.app.logic.MedicalViewerLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[ViewerLayoutState]- property layout_manager: LayoutManager
- set_ui(ui: MedicalViewerUI)
- class trame_slicer.app.logic.PaintEraseEffectLogic(server: Server, slicer_app: SlicerApp, effect_type: type[U])
Bases:
BrushEffectLogic[PaintEffectState,U]
- class trame_slicer.app.logic.ScissorsEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[ScissorsEffectState,U],Generic[U]- property effect: SegmentationEffectScissors
- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.SegmentEditLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseSegmentationLogic[SegmentEditState]- set_ui(ui: SegmentEditUI)
- show_color_dialog()
- class trame_slicer.app.logic.SegmentEditorLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseSegmentationLogic[SegmentEditorState]- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.SegmentationAppLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[ViewerLayoutState]- property layout_manager: LayoutManager
- set_ui(ui: SegmentationAppUI)
- class trame_slicer.app.logic.SmoothingEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BrushEffectLogic[SmoothingState,SegmentationEffectSmoothing]- set_effect_ui(smoothing_ui: SmoothingEffectUI)
- set_smoothing_mode(mode: SmoothingEffectMode)
- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.ThresholdEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[ThresholdState,SegmentationEffectThreshold]- set_effect_ui(threshold_ui: ThresholdEffectUI)
- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.VolumeIntensityRangeMaskEffectLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseEffectLogic[VolumeIntensityRangeMaskState,SegmentationEffectVolumeIntensityMask]- set_ui(ui: SegmentEditorUI)
- class trame_slicer.app.logic.VolumePropertyLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[VolumePropertyState]- on_volume_changed(volume_node: vtkMRMLVolumeNode)
- set_ui(ui: VolumePropertyUI)
- trame_slicer.app.logic.connect_slice_view_slider_to_state(server: Server, view: SliceView, *_) TypedState[SliderState]
- trame_slicer.app.logic.get_view_slider_typed_state(server: Server, view: SliceView) TypedState[SliderState]
- Returns:
Typed Slider state associated with input view
- trame_slicer.app.logic.get_view_trame_id(server: Server, view: AbstractViewChild)
- Returns:
Trame server translated singleton id for the input view.
- segmentation
BaseEffectLogicBaseSegmentationLogicBrushEffectLogicDrawEffectLogicEraseEffectLogicIslandsEffectLogicLogicalOperatorsEffectLogicPaintEffectLogicPaintEraseEffectLogicScissorsEffectLogicSegmentEditLogicSegmentEditorLogicSegmentMaskSelectLogicSmoothingEffectLogicThresholdEffectLogicVolumeIntensityRangeMaskEffectLogic- trame_slicer.app.logic.segmentation.base_segmentation_logic module
- trame_slicer.app.logic.segmentation.brush_effect_logic module
- trame_slicer.app.logic.segmentation.draw_effect_logic module
- trame_slicer.app.logic.segmentation.islands_effect_logic module
- trame_slicer.app.logic.segmentation.logical_operators_effect_logic module
- trame_slicer.app.logic.segmentation.paint_erase_effect_logic module
- trame_slicer.app.logic.segmentation.scissors_effect_logic module
- trame_slicer.app.logic.segmentation.segment_edit_logic module
- trame_slicer.app.logic.segmentation.segment_editor_logic module
- trame_slicer.app.logic.segmentation.segment_mask_select_logic module
- trame_slicer.app.logic.segmentation.smoothing_effect_logic module
- trame_slicer.app.logic.segmentation.threshold_effect_logic module
- trame_slicer.app.logic.segmentation.volume_intensity_range_mask_effect_logic module
trame_slicer.app.logic.base_logic module
trame_slicer.app.logic.download_scene_logic module
trame_slicer.app.logic.dynamic_select_logic module
- class trame_slicer.app.logic.dynamic_select_logic.IDynamicSelectItem
Bases:
ABC- abstractmethod matches(other: IDynamicSelectItem) bool
- class trame_slicer.app.logic.dynamic_select_logic.AbstractDynamicSelectLogic(state: TypedState[DynamicSelectState])
-
Abstract logic handling VSelect with dynamic complex VSelect content and value. Not to be used for simple VSelect to static Enum list.
- Deriving classes need to implement:
_set_slicer_state: Set Slicer state to input IDynamicSelectItem instance
_get_slicer_state: Get current Slicer state as IDynamicSelectItem instance
_get_current_items: List of all available items
Select trame state can be refreshed manually by calling the update_ui_from_slicer method.
- current_index_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.
- update_available_items()
- update_ui_from_slicer()
- select_item(item: T)
trame_slicer.app.logic.load_volume_logic module
- class trame_slicer.app.logic.load_volume_logic.LoadVolumeLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[LoadVolumeState]- volume_loaded
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.
- set_ui(ui: LoadVolumeUI)
trame_slicer.app.logic.medical_viewer_logic module
- class trame_slicer.app.logic.medical_viewer_logic.MedicalViewerLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[ViewerLayoutState]- property layout_manager: LayoutManager
- set_ui(ui: MedicalViewerUI)
trame_slicer.app.logic.segmentation_app_logic module
- class trame_slicer.app.logic.segmentation_app_logic.SegmentationAppLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[ViewerLayoutState]- property layout_manager: LayoutManager
- set_ui(ui: SegmentationAppUI)
trame_slicer.app.logic.slab_logic module
trame_slicer.app.logic.slice_view_logic module
- trame_slicer.app.logic.slice_view_logic.get_view_trame_id(server: Server, view: AbstractViewChild)
- Returns:
Trame server translated singleton id for the input view.
- trame_slicer.app.logic.slice_view_logic.get_view_slider_typed_state(server: Server, view: SliceView) TypedState[SliderState]
- Returns:
Typed Slider state associated with input view
- trame_slicer.app.logic.slice_view_logic.connect_slice_view_slider_to_state(server: Server, view: SliceView, *_) TypedState[SliderState]
trame_slicer.app.logic.volume_property_logic module
- class trame_slicer.app.logic.volume_property_logic.VolumePropertyLogic(server: Server, slicer_app: SlicerApp)
Bases:
BaseLogic[VolumePropertyState]- set_ui(ui: VolumePropertyUI)
- on_volume_changed(volume_node: vtkMRMLVolumeNode)