Motivation: we need to have more versatile ROI types and streamline the way we operate on ROIs
Current state: at the moment, the user can create either a CircleROI (by left-clicking on a frame) or a LineScan (by right-clicking and dragging mouse while still pressing the right button). After a ROI has been added to the axes, it can be dragged about by left-click-dragging, resized by scrolling while hovering a mouse over it and removed by right-clicking a ROI.
What is needed: I would like to have circles, ellipses, rectangles, and closed polygons for area-type ROIs and straight lines, segmented lines and branching lines for path-type ROIs. I think we also need auto-tracking ROIs, i.e. ROIs, that would automatically adjust their position from frame to frame if image moves.
An area-type ROI should allow to:
-
Create time-series (or z-series in case of a z-stack) by taking all pixels inside the area and performing a specific grouping mathematical operation on these sets of pixels in each frame, such as:
- average (default)
- standard deviation or higher-order moments
- percentile (e.g. the median)
- mode
- something else, user-defined.
This is relatively straightforward to add to be used from command line interface, e.g. from Jupyter notebook, but not as clear how to do this from GUI
-
clip the current frame to this area by one of:
- converting each frame to a masked array
- by setting all pixels outside the frame to zero (or other constant value)
- by cropping the frame to the boundary box of the area.
-
It should be possible to drag the ROI around preserving shape, reshape ROI by keeping it's position (zoom, tilt, pull one edge or vertex of), and delete a ROI
A path-type ROI should allow to:
- Extract pixel values along the path (possibly averaging/reducing around some neighborhood also) and show/store them as 2D arrays. If a path is branched, do the same along each branch and create a collection of such 2D views
- It should be possible to add new nodes to line segments,
- It should be possible to add new line segments to existing nodes (branching)
- It should be possible to drag the path around preserving shape, it should be possible to drag each vertex or each edge individuall
- It should be possible for each segment of the path to create shorter line segments perpendicular to the main path (backbone-like) and then create collections of 2D reslices of the 3D image stacks for each of these shorted segments
Problem:
Matplotlib widgets are not so easy (for me) to program, that's why I've been avoiding adding "inventory" buttons to switch between the ROI types in the first place.
I need to come up with a clear way of organizing a convenient user interface for these features that does the job, but stays out of the way.
Motivation: we need to have more versatile ROI types and streamline the way we operate on ROIs
Current state: at the moment, the user can create either a CircleROI (by left-clicking on a frame) or a LineScan (by right-clicking and dragging mouse while still pressing the right button). After a ROI has been added to the axes, it can be dragged about by left-click-dragging, resized by scrolling while hovering a mouse over it and removed by right-clicking a ROI.
What is needed: I would like to have circles, ellipses, rectangles, and closed polygons for area-type ROIs and straight lines, segmented lines and branching lines for path-type ROIs. I think we also need auto-tracking ROIs, i.e. ROIs, that would automatically adjust their position from frame to frame if image moves.
An area-type ROI should allow to:
Create time-series (or z-series in case of a z-stack) by taking all pixels inside the area and performing a specific grouping mathematical operation on these sets of pixels in each frame, such as:
This is relatively straightforward to add to be used from command line interface, e.g. from Jupyter notebook, but not as clear how to do this from GUI
clip the current frame to this area by one of:
It should be possible to drag the ROI around preserving shape, reshape ROI by keeping it's position (zoom, tilt, pull one edge or vertex of), and delete a ROI
A path-type ROI should allow to:
Problem:
Matplotlib widgets are not so easy (for me) to program, that's why I've been avoiding adding "inventory" buttons to switch between the ROI types in the first place.
I need to come up with a clear way of organizing a convenient user interface for these features that does the job, but stays out of the way.