Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and draw annulus with hardcoded width #2191

Closed
Jdaviz-Triage-Bot opened this issue May 10, 2023 · 0 comments · Fixed by #2240
Closed

Drag and draw annulus with hardcoded width #2191

Jdaviz-Triage-Bot opened this issue May 10, 2023 · 0 comments · Fixed by #2240
Labels
feature Feature request imviz

Comments

@Jdaviz-Triage-Bot
Copy link

Jdaviz-Triage-Bot commented May 10, 2023

Reporter: pllim

As proposed by @kecnry , here is the desired workflow:

  1. User select new shape tool from the existing shapes drop-down.
  2. User click and drag to draw. At this point, it is basically the circle draw tool.
  3. When finalized, this tool magically creates an annulus shape with hardcoded width (proposed: inner_radius = outer_radius * 0.5).
  4. To modify the annulus shape, user has to edit it manually in the Subset Tools plugin.

New features to be implemented:

a. A new shape tool that subclass the circular shape but then turns it into annulus when finalized.
b. Subset Tools plugin needs special logic so that user can edit only the following for annulus (which is a very special case of compound subset): One center, inner radius, outer radius. @javerbukh proposed maybe we can subclass subset state or attach metadata to the state.

Under the hood:

Annulus subset state
|___ ROI state --> CircularROI
|___ Invert state --> ROI state --> Circular ROI

where

subset_state.state1.roi.xc == subset_state.state2.state1.roi.xc

and

subset_state.state1.roi.yc == subset_state.state2.state1.roi.yc

and

subset_state.state1.roi.radius > subset_state.state2.state1.roi.radius

Also see https://github.com/glue-viz/glue-astronomy/blob/336e2cca4a93025e34e4a0d4313b4031f2f794dc/glue_astronomy/translators/regions.py#L52

This needs new glue-astronomy release upstream (>0.7).

🐱


DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request imviz
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants