neuroinformatics-unit/movement

napari widget for loading bboxes datasets from file

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
#253 is introducing a widget for loading movement poses datasets (pose tracks) from file into a napari Points layers.
An equivalent widget for loading movement bboxes datasets is lacking.

Describe the solution you'd like
Implement a "Load bboxes" widget, which would:

  • load the centroid position into a Points layers
  • load the box itself (derived from centroid position and shape) into a napari Shapes layer.

The most straightforward approach would be to add a new BboxesLoader class in movement/napari/_loader_widgets.py and new bboxes_to_napari_tracks and bboxes_to_napari_shapes functions to movement/napari/convert.py.

Describe alternatives you've considered
The two widgets (poses and bboxes) could live as separate collapsible widgets, or could be implemented within the same collapsible widget with some way of separating them (e.g. tabs, or a dropdown to select the dataset type).