PartSeg.common_gui.channel_control¶
This module contains widgets used to control channel information like channel visibility, cololrmap selection, decision if use fixed range or image minimum/maximum brightness, using gauss blur.
Note
Future plans: add histogram.
- class PartSeg.common_gui.channel_control.BlurInfoWidget(size=25, margin=1)[source]¶
Bases:
QWidgetWidget used to present info about blur selection in class
ColorComboBox.
- class PartSeg.common_gui.channel_control.ChannelProperty(settings, start_name)[source]¶
Bases:
QWidget- For manipulate channel properties.
Apply gaussian blur to channel
Fixed range for coloring
In future should be extended
- Parameters:
settings (
ViewSettings) – for storing internal state. allow keep state between sessionsstart_name (
str) – name used to select proper information from settings object. Introduced for case with multiple image view.
- change_current(name, channel)[source]¶
Change to show values connected with channel channel from viewer viewer
- register_widget(widget)[source]¶
Register new viewer by its color combo box group
- Parameters:
widget (
ColorComboBoxGroup) – viewer widget for color control- Return type:
- class PartSeg.common_gui.channel_control.ColorComboBox(id_num, colors, color_dict, colormap='', base_height=50, lock=False, blur=NoiseFilterType.No, gamma=1)[source]¶
Bases:
QComboBoxCombobox showing colormap instead of text
- Parameters:
id_num (
int) – id which be emit in signals. Designed to inform which channel information is changedcolors (
list[str]) – list of colors which should be able to choose. All needs to be keys in color_dictcolor_dict (
MutableMapping[str,tuple[Colormap,bool]]) – dict from name to colormap definitioncolormap (
str) – initial colormapbase_height – initial height of widget
lock – show lock padlock to inform that fixed range is used
blur – show info about blur selected
- property colormap_changed¶
alias for signal, return color name
- property is_blur¶
check if blur property is set
- property is_lock¶
check if lock property is set
- mouseMoveEvent(self, a0: QMouseEvent | None)[source]¶
- class PartSeg.common_gui.channel_control.ColorComboBoxGroup(settings, viewer_name, channel_property=None, height=40)[source]¶
Bases:
QWidgetGroup of
ColorComboBoxfor control visibility and chose colormap for channels.- property current_colormaps: list[Colormap | None]¶
List of current colormaps. None if channel is not selected
- class PartSeg.common_gui.channel_control.ColorStyledDelegate(base_height, color_dict, **kwargs)[source]¶
Bases:
QStyledItemDelegateClass for paint
ColorComboBoxelements when list trigger- Parameters:
base_height (
int) – height of single list elementcolor_dict (
MutableMapping[str,tuple[Colormap,bool]]) – Dict mapping name to colors