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

Keyboard shortcut for changing image slices #660

Open
lchauvin opened this issue Oct 10, 2024 · 3 comments
Open

Keyboard shortcut for changing image slices #660

lchauvin opened this issue Oct 10, 2024 · 3 comments

Comments

@lchauvin
Copy link
Contributor

Hello,

I would like to add a feature to have some keyboard shortcut to change image slices.

I added the keyboard shortcut in config.ts and constant.ts, but I have an issue when I need to put some code in actions.ts.

To change the slice, I need to update the slice config, and to do so, I need the viewID and imageID. imageID I can get with useCurrentImage but the problem is I don't know how I could access the viewID because it's specific to each SliceViewer.

In earlier version of VolView, this code was in VtkTwoView. Should I put it in SliceViewer or VtkSliceViewer, and put a placeholder in action.ts (just to have the description in the Keyboard Shortcut panel) ?

@floryst
Copy link
Collaborator

floryst commented Oct 21, 2024

We would need to add a notion of "active view" in order for this to work, otherwise such a keyboard shortcut would change all slices.

I'm thinking of the "last interacted/clicked view" should correspond to the active view.

@lchauvin
Copy link
Contributor Author

lchauvin commented Oct 23, 2024

Where should we add this ? in the action.ts ? in a pinia store ?

@PaulHax
Copy link
Collaborator

PaulHax commented Oct 23, 2024

in a pinia store ?

My thoughs exactly.

This was referenced Oct 24, 2024
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

No branches or pull requests

3 participants