cellmap_flow.dashboard.bbx_generator
Bounding box generator integration for the pipeline builder dashboard. Uses the neuroglancer viewer to interactively create bounding boxes.
Attributes
Classes
Manages interactive bounding box generation in Neuroglancer |
Functions
|
Create bounding boxes interactively in Neuroglancer. |
Module Contents
- cellmap_flow.dashboard.bbx_generator.logger
- class cellmap_flow.dashboard.bbx_generator.BBXGenerator(image_path: str, num_boxes: int, verbose: bool = True)
Manages interactive bounding box generation in Neuroglancer
- image_path
- num_boxes
- verbose = True
- viewer = None
- bounding_boxes = []
- start_viewer() str
Start Neuroglancer viewer for drawing bounding boxes.
- Returns:
URL to access the viewer
- wait_for_boxes(timeout: int = 3600) List[Dict[str, Any]]
Wait for user to create bounding boxes. Polls the viewer annotations and returns when target is reached or timeout.
- Parameters:
timeout – Maximum seconds to wait (default 1 hour)
- Returns:
List of bounding boxes
- close()
Close the viewer
- cellmap_flow.dashboard.bbx_generator.create_bounding_boxes_interactive(image_path: str, num_boxes: int, verbose: bool = True) List[Dict[str, Any]]
Create bounding boxes interactively in Neuroglancer.
- Parameters:
image_path – URL or path to image (zarr/n5/precomputed)
num_boxes – Target number of bounding boxes to create
verbose – Print progress messages
- Returns:
List of bounding boxes