Skip to content

Inspector plot: implement saving masks from drawn polygons #532

@nvaytet

Description

@nvaytet

On the inspector plot, users would like to save masks from drawn rectangles or polygons somewhere, so they can be re-used for later reduction or other.

I imagine one way could be to save them as a DataGroup containing DataArrays with 0 and 1 values for the data (don't think you can make a DataArray with only masks and no data), or a DataArray with dummy values and a dict of masks. It would be good to keep the coordinates of the original data, so we can ensure masks are later applied on a compatible data array.

I'm currently thinking a function could be called on the inspector plot, and a small text box under the plot (text file to enter file name, and a Save button) could be added and would call that function.
So masks could be saved via widgets or programmatically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions