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

Interactive cropping #43

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AlexSauer
Copy link

This commit addresses issue #42.
The user can click with the left mouse to set the top right corner of the crop and a right click sets the bottom right corner

This commit addresses issue haesleinhuepf#42.
The user can click with the left mouse to set the top right corner of the crop and a right click sets the bottom right corner
@haesleinhuepf
Copy link
Owner

Hi @AlexSauer ,
this is super cool! Thanks for working on this. Two questions:

  • Do you think it would be easy to draw a red frame while dragging the mouse? It might increase user-convenience a lot.
  • I'm not sure if it works correctly. Maybe X and Y are mixed up? See this video:
haase-17-05-2024-10-38-29.mp4

Thanks again for working on this! This can be a game changer for cropping people :-)

Copy link
Owner

@haesleinhuepf haesleinhuepf left a comment

Choose a reason for hiding this comment

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

see comment above

@AlexSauer
Copy link
Author

AlexSauer commented May 17, 2024

Hi @haesleinhuepf,

thanks a lot for starting the project! It saved me a lot of time to be able to view large 3D stacks that are saved on a remote cluster :) Very happy to contribute something.

I decided against something like a red frame as it would require the user to keep pressing down the mouse while selecting the rectangle and I thought that would not work well for selecting the 3D crops as you would have use the mouse the change the slice (see the video below). But if you disagree, I can change it.

Regarding the X-Y crop, I am slightly confused what is happening here as it works fine for me:
https://github.com/haesleinhuepf/stackview/assets/22394318/e1cf6db6-1d1a-46a5-adee-c621b3b0fa63

Do you have an idea what could cause this? I have to admit that I am not the most knowledgable when it comes to ipywidgets.
So if we can't resolve this easily, feel free to reject the PR. I do not want to create extra work for you

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