Skip to content

Add method to transfer ROI to another z-plane or timepoint #1052

@petebankhead

Description

@petebankhead

Feature request

Is your feature request related to a problem? Please describe.
ROIs are immutable and associated with a specific ImagePlane (generally z and t index).
This means that transferring a ROI to a different plane is tricky.

Describe the solution you'd like
Add a public ROI updatePlane(ImagePlane plane) method to the ROI interface, and ensure it is implemented in all relevant ROI classes.

Describe alternatives you've considered
Currently, a hack like this needs to be used:

def roi = GeometryTools.geometryToROI(pathObject.getROI().getGeometry(), ImagePlane.getPlane(z, t))

for example here. This is awkward, and can lose information - particularly with ellipses, which would be polygonized.

Additional context
There are already ROI.translate(x, y) and ROI.scale(x, y) methods.

This will simplify copying ROIs to other planes of a z-stack, which could be useful for annotation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions