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:
QWidget
Widget 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 chanel 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:
QComboBox
Combobox showing colormap instead of text
- Parameters
id_num (
int
) – id which be emmit 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
- channel_colormap_changed(int, str)¶
Signal with information about colormap change. (ch_num, name_of_colormap)
- channel_visible_changed(int, bool)¶
Signal with information about change of channel visibility (ch_num, visible)
- clicked(int)¶
Information about mouse click event on widget
- 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)[source]¶
- class PartSeg.common_gui.channel_control.ColorComboBoxGroup(settings, viewer_name, channel_property=None, height=40)[source]¶
Bases:
QWidget
Group of
ColorComboBox
for control visibility and chose colormap for channels.- change_channel(str, int)¶
information which channel change
- coloring_update¶
information about global change of coloring
- property current_colormaps: List[Optional[napari.utils.colormaps.colormap.Colormap]]¶
List of current colormaps. None if channel is not selected
- property current_colors: List[Optional[str]]¶
List of current colors. None if channel is not selected.
- class PartSeg.common_gui.channel_control.ColorStyledDelegate(base_height, color_dict, **kwargs)[source]¶
Bases:
QStyledItemDelegate
Class for paint
ColorComboBox
elements when list trigger- Parameters
base_height (
int
) – height of single list elementcolor_dict (
MutableMapping
[str
,Tuple
[Colormap
,bool
]]) – Dict mapping name to colors