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

fix(hydration): Maintain the same slice that the user was on pre hydration in post hydration for SR and SEG. #4200

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

IbrahimCSAE
Copy link
Collaborator

Context

Maintain the same slice that the user was on pre hydration in post hydration for SR and SEG.

Fixes #3884

Copy link

netlify bot commented May 31, 2024

Deploy Preview for ohif-dev ready!

Name Link
🔨 Latest commit
🔍 Latest deploy log https://app.netlify.com/sites/ohif-dev/deploys/666071866d85661f9cdc06a1
😎 Deploy Preview https://deploy-preview-4200--ohif-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented May 31, 2024

Deploy Preview for ohif-platform-docs canceled.

Name Link
🔨 Latest commit d577024
🔍 Latest deploy log https://app.netlify.com/sites/ohif-platform-docs/deploys/665ddcf3ca31070007b2e9df

Copy link

cypress bot commented May 31, 2024

Passing run #4033 ↗︎

0 44 2 0 Flakiness 0

Details:

uncomment hpScale
Project: Viewers Commit: d577024be5
Status: Passed Duration: 05:23 💡
Started: Jun 3, 2024 3:22 PM Ended: Jun 3, 2024 3:27 PM

Review all test suite changes for PR #4200 ↗︎

@IbrahimCSAE IbrahimCSAE requested a review from sedghi June 1, 2024 14:43
Comment on lines 122 to +126
},
// {
// name: hpScale.id,
// protocol: hpScale,
// },
{
name: hpScale.id,
protocol: hpScale,
},
Copy link
Member

Choose a reason for hiding this comment

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

revert this for now since when you go to segmenttaion mode this gets matched for some reason

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure

if (viewportId === targetViewportId) {
viewport.viewportOptions.initialImageOptions = {
index: initialSliceIndex,
useOnce: true,
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need useOnce? I don't prefer this approach.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So when the seg is hydrated, the initial image index is set, but lets say the user switches to another series, then drops the referenced series for the seg again, we should not use the initial index again, we should default to first/middle or last.

@@ -81,6 +86,29 @@ function TrackedMeasurementsContextProvider(
},
});
},

jumpToSameImageInActiveViewport: (ctx, evt) => {
Copy link
Member

Choose a reason for hiding this comment

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

Will this be the same logic if there is only one measurement? What I'm asking is, is jumpToSameImage = jumpToFirstMeasurement if there is only one measurement?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It doesn’t matter how many measurements there are, it will still be the same slice the user was on

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

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

see my comments

Copy link
Member

@sedghi sedghi left a comment

Choose a reason for hiding this comment

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

Thanks

@sedghi sedghi merged commit 430330f into master Jun 5, 2024
9 checks passed
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.

[Bug] Incorrect slice after hydration of SR and SEG
2 participants