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

JDAT-1399: Display Contour Levels in image viewer #530

Open
4 of 5 tasks
pllim opened this issue Apr 13, 2021 · 7 comments
Open
4 of 5 tasks

JDAT-1399: Display Contour Levels in image viewer #530

pllim opened this issue Apr 13, 2021 · 7 comments
Assignees
Labels

Comments

@pllim
Copy link
Contributor

pllim commented Apr 13, 2021

Overlay contours on image in viewer. Use cases:

Workflow example: #530 (comment)

https://jira.stsci.edu/browse/JDAT-1399

@pllim pllim added this to the Imviz 1.0 milestone Apr 13, 2021
@pllim pllim removed the UI/UX😍 label Apr 13, 2021
@pllim pllim removed this from the Imviz 1.0 milestone Apr 13, 2021
@astrofrog
Copy link
Collaborator

In principle contours are already possible because they were implemented for cubeviz:

Screenshot_2021-04-27_14-54-21

I think this meets requirements 1, 2, and 4 in the list above. I'm not sure what 3 really means compared to say 2. Are there any standard formats for storing contours that we might want to support? Isn't 2 enough?

I think it would be nice to be able to customize the contours a bit to be able to turn the labels on/off and change the colors. I've opened an issue here: glue-viz/glue-jupyter#219

@pllim
Copy link
Contributor Author

pllim commented Apr 27, 2021

Again, perhaps @PatrickOgle can advise.

@PatrickOgle
Copy link
Contributor

The additional desired functionality is to save/load a file containing contour levels or export/load list of contour levels
to/from a notebook like this:

  1. Load and display image 1
  2. Load and display image 2
  3. Match WCS of image 2 to image 1
  4. Plot contours on image 2
  5. Manually adjust contour levels on image 2
  6. Overplot contours from image 2 on image 1 (using existing mechanism)
  7. Save contour levels as a list in a notebook (or to a CSV file):
    [1, 20, 40, 55, 100.]
  8. Load contour levels back into viewer/layer as a list (or from a CSV file).

The point is that we don't want to type in potentially long lists of numbers in the custom contours tool.
We also want to capture the list for use elsewhere and on other images.

@astrofrog
Copy link
Collaborator

That makes sense, thanks!

@PatrickOgle
Copy link
Contributor

@astrofrog Is there a plan/way to export the contour levels to the notebook?

@pllim pllim self-assigned this May 26, 2021
@pllim pllim added this to the Imviz 1.0 milestone May 26, 2021
@pllim
Copy link
Contributor Author

pllim commented May 26, 2021

@PatrickOgle , from what I understood from what you said on 2021-05-25, you do not need to save or load contour from file. You only want to transfer contour in memory (in a given active session) from one image to another; this contour in memory will be lost when the session ends, is that correct?

@pllim
Copy link
Contributor Author

pllim commented May 26, 2021

Brute force obviously doesn't work... 😬

viewer.state.layers[0].contour_lim_helper = viewer.state.layers[1].contour_lim_helper
viewer.state.layers[0].contour_visible = True

Screenshot 2021-05-26 155429

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

No branches or pull requests

3 participants