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(VolumeViewport): Add reset properties to volume viewport #747

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

IbrahimCSAE
Copy link
Collaborator

@IbrahimCSAE IbrahimCSAE commented Aug 21, 2023

Context

This adds the resetProperties method to the VolumeViewport. It behaves similarly to the one in StackViewport. This will be useful for usage in OHIF or other viewers to reset the view in MPR mode.

Changes & Results

Added resetProperties to the VolumeViewport class, now you can reset the properties for volume views.

Testing

  • clone OHIF locally
  • go to commandModule.js, in the resetViewport method, line 482, add viewport.resetProperties() L478
  • load any study, go into MPR view, modify the window level, then click the reset view tool, it should restore the window to the default value.

Checklist

PR

  • My Pull Request title is descriptive, accurate and follows the
    semantic-release format and guidelines.

Code

Public Documentation Updates

  • The documentation page has been updated as necessary for any public API
    additions or removals.

Tested Environment

  • "OS: Windows 10
  • "Node version: 18.15.0
  • "Browser: Chrome Version 115.0.5790.170 (Official Build) (64-bit)

ezgif com-optimize

@netlify
Copy link

netlify bot commented Aug 21, 2023

Deploy Preview for cornerstone-3d-docs canceled.

Name Link
🔨 Latest commit 4188fb9
🔍 Latest deploy log https://app.netlify.com/sites/cornerstone-3d-docs/deploys/64e397673ff50a00081b8798

@wayfarer3130 wayfarer3130 merged commit 054b044 into cornerstonejs:main Aug 21, 2023
this._resetProperties();
}

private _resetProperties() {
Copy link
Member

Choose a reason for hiding this comment

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

this should have accepted an optional volume id similar to what we have for other apis in the volumeViewport. Please add another PR to fix it. if not provided use the defaultActor

CC @wayfarer3130 @IbrahimCSAE

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sedghi I put up a pull request for this #749

let me know if it looks good

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.

3 participants