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:
QWidget
class for preview single colormap. Witch checkbox for change selection.
- Parameters
- edit_request([str][, Colormap])¶
send after pressing edit signal (name) (ColorMap object)
- property is_checked¶
If colormap is selected
- remove_request(str)¶
Signal with name of colormap (name)
- selection_changed(str, bool)¶
checkbox selection changed (name)
- property state_changed¶
Inner checkbox stateChanged signal
- class PartSeg.common_gui.colormap_creator.ColormapCreator(parent=None)[source]¶
Bases:
QWidget
Widget for creating colormap.
- colormap_selected(Colormap)¶
emitted on save button click. Contains current colormap in format accepted by
create_color_map()
- class PartSeg.common_gui.colormap_creator.ColormapEdit[source]¶
Bases:
QWidget
Preview 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:
QWidget
Show list of colormaps
- edit_signal(Colormap)¶
Colormap for edit
- get_colormap_widget(name)[source]¶
Access to widget showing colormap. Created for testing purpose.
- Return type
- remove_signal(str)¶
Name of colormap to remove
- visibility_colormap_change(str, bool)¶
Hide or show colormap
- class PartSeg.common_gui.colormap_creator.ColormapLoad[source]¶
Bases:
PartSegCore.io_utils.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:
PartSegCore.io_utils.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:
PartSeg.common_gui.colormap_creator.PColormapCreatorMid
ColormapCreator
variant which save result inViewSettings
- class PartSeg.common_gui.colormap_creator.PColormapCreatorMid(settings)[source]¶
Bases:
PartSeg.common_gui.colormap_creator.ColormapCreator
Class to add export and import buttons to ColormapCreator without full PColormapCreator
- class PartSeg.common_gui.colormap_creator.PColormapList(settings, control_names)[source]¶
Bases:
PartSeg.common_gui.colormap_creator.ColormapList
Show 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.ImageView
for protect used channels from uncheck or remove