PartSeg.common_gui.colormap_creator¶
This module contains class used to create and manage colormaps.
- class PartSeg.common_gui.colormap_creator.ChannelPreview(colormap, accepted, name, removable=False, used=False, parent=None)[source]¶
Bases:
QWidgetclass for preview single colormap. Witch checkbox for change selection.
- Parameters:
- property is_checked¶
If colormap is selected
- property state_changed¶
Inner checkbox stateChanged signal
- class PartSeg.common_gui.colormap_creator.ColormapCreator(parent=None)[source]¶
Bases:
QWidgetWidget for creating colormap.
- class PartSeg.common_gui.colormap_creator.ColormapEdit[source]¶
Bases:
QWidgetPreview of colormap. Double click used for add/remove colors. Single click on marker allows moving them
- add_color(position, color)[source]¶
Add color to current colormap
- Parameters:
color (
Color) – Color with position.
- class PartSeg.common_gui.colormap_creator.ColormapList(colormap_map, selected=None, parent=None)[source]¶
Bases:
QWidgetShow list of colormaps
- get_colormap_widget(name)[source]¶
Access to widget showing colormap. Created for testing purpose.
- Return type:
- class PartSeg.common_gui.colormap_creator.ColormapLoad[source]¶
Bases:
LoadBase- classmethod get_name()[source]¶
Algorithm name. It will be used during interface generating and in registering to proper
PartSeg.PartSegCore.algorithm_describe_base.Register.- Return type:
- Returns:
name of algorithm
- classmethod load(load_locations, range_changed=None, step_changed=None, metadata=None)[source]¶
Function for load data
- Parameters:
load_locations (
list[Union[str,BytesIO,Path]]) – list of files to loadrange_changed (
Optional[Callable[[int,int],Any]]) – callback function for inform about number of steps to be donestep_changed (
Optional[Callable[[int],Any]]) – callback function for report that single step has been donemetadata (
Optional[dict]) – additional information needed by function. Like default spacing for load image
- Return type:
Colormap- Returns:
Project info or list of project info
- class PartSeg.common_gui.colormap_creator.ColormapSave[source]¶
Bases:
SaveBase- classmethod get_name()[source]¶
Algorithm name. It will be used during interface generating and in registering to proper
PartSeg.PartSegCore.algorithm_describe_base.Register.- Return type:
- Returns:
name of algorithm
- class PartSeg.common_gui.colormap_creator.PColormapCreator(settings)[source]¶
Bases:
PColormapCreatorMidColormapCreatorvariant which save result inViewSettings
- class PartSeg.common_gui.colormap_creator.PColormapCreatorMid(settings)[source]¶
Bases:
ColormapCreatorClass to add export and import buttons to ColormapCreator without full PColormapCreator
- class PartSeg.common_gui.colormap_creator.PColormapList(settings, control_names)[source]¶
Bases:
ColormapListShow list of colormaps. Integrated with
ViewSettings- Parameters:
settings (
ViewSettings) – used for store statecontrol_names (
list[str]) – list of names ofPartSeg.common_gui.stack_image_view.ImageViewfor protect used channels from uncheck or remove