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

feat(createLayerInterface): add download button #723

Closed
wants to merge 7 commits into from

Conversation

PaulHax
Copy link
Collaborator

@PaulHax PaulHax commented Nov 30, 2023

No description provided.

@PaulHax PaulHax marked this pull request as draft November 30, 2023 16:21
@PaulHax PaulHax marked this pull request as ready for review December 1, 2023 21:57
Comment on lines +14 to +19
type: 'SAVE_ROI',
data: {
name: event.data.name,
layerName: event.data.layerName,
croppingPlanes,
},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thee emited event payload.

@@ -183,6 +183,9 @@ const createViewer = async (
break
case 'TAKE_SCREENSHOT':
break
case 'SAVE_ROI':
eventEmitter.emit('saveRoi', event.data)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event.

Copy link
Member

@thewtex thewtex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow for itkwidgets / python side is:

  1. create a viewer
  2. select an roi
  3. there are getters to get the current roi on the viewer
  4. the client code calls the getter and their logic to save the image to file

The download button should bring up a modal to select format and file name parameters and a download button that saves the file locally.

We should not be emitting an event / payload for the save ROI.

The download button is not used for this because of a) how event processing occurs in jupyter and b) how the roi is obtained and save logic is implemented in Python.

-> please add the download modal and remove the event

@PaulHax
Copy link
Collaborator Author

PaulHax commented Dec 14, 2023

Closing in favor of #727

@PaulHax PaulHax closed this Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants