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(Camera): Synchronize image slices and cameras #615

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lchauvin
Copy link
Contributor

This feature will allow to synchronize images (i.e. slices) and cameras, so it will be easy to compare images from different modalities for a given subject for example

Copy link

netlify bot commented Jun 26, 2024

Deploy Preview for volview-dev failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit 16fa2b1
🔍 Latest deploy log https://app.netlify.com/sites/volview-dev/deploys/66df41a970be0100084eb6c8

@lchauvin lchauvin marked this pull request as draft June 26, 2024 20:22
@lchauvin
Copy link
Contributor Author

The only issue right now, it that it seems the camera is reset when changing images (which defeat the purpose of having camera synchronized).
I tried to comment out the resetCamera function is SliceViewer to see if it was coming from here, but it seems not.

I think it may have something to do with disableAutoResetCamera. I tried to turn if on (no auto reset), but then I can't see the images (not sure if they are out of the FOV or what).

@PaulHax
Copy link
Collaborator

PaulHax commented Jun 27, 2024

I'm not sure about the order VTK.js camera is updated on switching images. But maybe to diagnose: keep the existing reset stuff, (might be setting needed camera parameters not included in the "synced" ones) and add a composable/hook to trigger the position, focalpont, etc sync after the resets.

@lchauvin
Copy link
Contributor Author

I'm not sure where or how to do that. What shoud I hook for ?

@PaulHax
Copy link
Collaborator

PaulHax commented Jun 27, 2024

I'ed want to test if the problem is the timing of the camera property sync vs something else. So could add some temp code to call the sync function on a button press, or wherever you see a camera reset.

@lchauvin
Copy link
Contributor Author

It's still unclear to me how you want to test this. What I could tell so far, is that the properties of the sync cameras are well updated. I looked in the pinia store, and I could see the values changing for all cameras when sync. However, when I change image, it resets these properties, and because images are sync, it resets to all of them.

@lchauvin
Copy link
Contributor Author

I tried to monitor the events, but all I can see when changing image is an event called update:modelValue being fired from ItemGroup. I tried to follow this event, but I don't see it calling a camera reset.

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