Replies: 3 comments 11 replies
-
|
I managed to synchronize camera properties, but when I change image, it resets the camera |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Where would be the best place to put the logic for syncing cameras ? |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It seems from this code: type KeyType = keyof CameraConfig;
const keys: KeyType[] = [
'position',
'focalPoint',
'viewUp',
'parallelScale',
'directionOfProjection',
];
const cameraRefs = keys.reduce(
(refs, key) => ({
...refs,
[key]: guardedWritableRef(
vtkFieldRef(camera, key),
(incoming) => !!incoming
),
}),
{} as Record<KeyType, Ref<any>>
);that How would I do that ? |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I would like to be able to synchronize cameras for all images (when I zoom on one image, and switch to another image, to get the same view).
I was able to do this with a previous version of VolView, but lots have changed since then.
I initially put a flag in CameraConfig to check if cameras should be sync or not, and then when a camera property was updated, I was checking the flag and updating all cameras with the same properties.
However, I don't think it works since I updated VolView, because it seems to sync CameraConfig with vtkCamera in usePersistentCameraConfig.ts, and vtkCamera doesn't have the flag I added, so it raised some error.
Could you suggest a way to do achieve this ?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions