boilercv_pipeline.captivate.previews
#
Image and video previews.
Module Contents#
Classes#
Emit key signals on |
Functions#
Initialize |
|
Compare multiple images or videos. |
|
View and interact with images and video. |
|
Start a PyQtGraph app and prepare an app window with a default layout. |
|
Get the coordinates of a grid. |
|
Get the dimensions of a square grid for the given number of views. |
|
Coerce images to a mapping of title to image. |
|
Pad images to a common size and pack into an array. |
|
Set images into the image views. |
|
Add a named button to a layout and connect it to a callback. |
|
Get an image view suitable for previewing images. |
|
Get the name of the calling scope. |
|
Save an ROI represented by an ordered array of vertices. |
|
Edit the region of interest for an image. |
|
Load the region of interest for an image. |
Data#
Rectangular grid sizes for up to twelve views. Use square grids beyond that. |
API#
- boilercv_pipeline.captivate.previews.YAML_INDENT#
2
- boilercv_pipeline.captivate.previews.yaml#
‘YAML(…)’
- boilercv_pipeline.captivate.previews.init()#
Initialize
boilercv.gui
.
- boilercv_pipeline.captivate.previews.WINDOW_SIZE#
(800, 600)
- boilercv_pipeline.captivate.previews.WINDOW_NAME#
‘Image viewer’
- boilercv_pipeline.captivate.previews.SMALLER_GRIDS#
None
Rectangular grid sizes for up to twelve views. Use square grids beyond that.
- boilercv_pipeline.captivate.previews.view_images(
- images: boilercv_pipeline.captivate.previews.AllViewable,
- name: str = '',
- framerate: int = FRAMERATE_CONT,
Compare multiple images or videos.
- boilercv_pipeline.captivate.previews.image_viewer(
- images: boilercv_pipeline.captivate.previews.AllViewable,
- name: str = '',
- framerate: int = FRAMERATE_CONT,
View and interact with images and video.
- boilercv_pipeline.captivate.previews.make_window(
- name: str = '',
Start a PyQtGraph app and prepare an app window with a default layout.
- boilercv_pipeline.captivate.previews.get_grid_coordinates( ) list[tuple[int, int]] #
Get the coordinates of a grid.
- boilercv_pipeline.captivate.previews.get_square_grid(
- num_views: int,
Get the dimensions of a square grid for the given number of views.
- boilercv_pipeline.captivate.previews.coerce_images(
- images: boilercv_pipeline.captivate.previews.AllViewable,
Coerce images to a mapping of title to image.
- boilercv_pipeline.captivate.previews.pad_images(
- images: boilercv_pipeline.captivate.previews.MultipleViewable,
Pad images to a common size and pack into an array.
- boilercv_pipeline.captivate.previews.set_images(
- images: boilercv_pipeline.captivate.previews.NamedViewable,
- image_views: list[pyqtgraph.ImageView],
Set images into the image views.
- class boilercv_pipeline.captivate.previews.GraphicsLayoutWidgetWithKeySignal(
- parent=None,
- show=False,
- size=None,
- title=None,
- **kargs,
Bases:
pyqtgraph.GraphicsLayoutWidget
Emit key signals on
key_signal
.Initialization
============== ============================================================ Arguments: parent Optional parent widget useOpenGL If True, the GraphicsView will use OpenGL to do all of its rendering. This can improve performance on some systems, but may also introduce bugs (the combination of QGraphicsView and QOpenGLWidget is still an ‘experimental’ feature of Qt) background Set the background color of the GraphicsView. Accepts any single argument accepted by :func:
mkColor <pyqtgraph.mkColor>
. By default, the background color is determined using the ‘backgroundColor’ configuration option (see :func:setConfigOptions <pyqtgraph.setConfigOptions>
). ============== ============================================================- key_signal#
‘Signal(…)’
- keyPressEvent(
- ev: PySide6.QtGui.QKeyEvent,
Handle keypresses.
- boilercv_pipeline.captivate.previews.add_button(
- layout: PySide6.QtWidgets.QLayout,
- label: str,
- func: collections.abc.Callable[..., Any],
Add a named button to a layout and connect it to a callback.
- boilercv_pipeline.captivate.previews.get_image_view(
- framerate: int = FRAMERATE_CONT,
Get an image view suitable for previewing images.
- boilercv_pipeline.captivate.previews.get_calling_scope_name()#
Get the name of the calling scope.
- boilercv_pipeline.captivate.previews.save_roi(
- roi_vertices: boilercv.types.ArrInt,
- roi_path: pathlib.Path,
Save an ROI represented by an ordered array of vertices.
- boilercv_pipeline.captivate.previews.edit_roi(
- image: boilercv.types.ArrInt,
- roi_path: pathlib.Path,
- roi_type: Literal[poly, line] = 'poly',
Edit the region of interest for an image.
- boilercv_pipeline.captivate.previews.load_roi(
- img: boilercv.types.Img,
- roi_path: pathlib.Path,
- roi_type: Literal[poly, line] = 'poly',
Load the region of interest for an image.