PartSeg.common_gui.numpy_qimage¶
This module contains utils for converting colormap to visible color bar.
- class PartSeg.common_gui.numpy_qimage.NumpyQImage(image)[source]¶
Bases:
QImage
Class for fix problem with PySide2 QImage implementation (non copied buffer)
- PartSeg.common_gui.numpy_qimage.convert_colormap_to_image(colormap)[source]¶
convert colormap to image of size (512, 1)
- Parameters:
colormap (
Colormap
) – colormap to convert- Return type:
- Returns:
Color Bar image
- PartSeg.common_gui.numpy_qimage.create_colormap_image(colormap, color_dict)[source]¶
Convert named colormap to image of size (512, 1)
- Parameters:
colormap (
str
) – must be key in color_dictcolor_dict (
MutableMapping
[str
,Tuple
[Colormap
,bool
]]) – dict mapping name to definition of colormap
- Return type:
- Returns:
Color Bar image