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: Add VOLUME_NEW_IMAGE event and Add jumpToSlice and default VOI for volume viewport #104

Merged
merged 16 commits into from
May 24, 2022

Conversation

sedghi
Copy link
Member

@sedghi sedghi commented May 18, 2022

Fix:

  • Disabling element should not reset camera
  • WindowLevel tool for volume bug in PT scaling

Refactor

  • Move various @cornerstonejs/core camera-related utility functions out of their incorrect location in the @cornertsontejs/tools

Add

  • Add a new VOLUME_NEW_IMAGE event which publish the imageIndex of the image that has rendered in the volume viewport (any camera view)
  • Add the capability in jumpToSlice to jump to a slice in the volumeViewport
  • Add default VOI set for the volumes (from metadata or by calculating the min and max of the middle slice)

@sedghi sedghi requested a review from JamesAPetts May 18, 2022 23:03
@sedghi sedghi changed the title Fix/volume api feat: Add VOLUME_NEW_IMAGE event and Add jumpToSlice for volume viewport May 18, 2022
Copy link
Member

@JamesAPetts JamesAPetts left a comment

Choose a reason for hiding this comment

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

Mostly looks good. Some changes required mostly about unsubscribing to events, and cleaning up state.

@sedghi sedghi requested a review from JamesAPetts May 19, 2022 17:09
Copy link
Member

@JamesAPetts JamesAPetts left a comment

Choose a reason for hiding this comment

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

One consideration on the element disabled events.

packages/core/src/RenderingEngine/VolumeViewport.ts Outdated Show resolved Hide resolved
@sedghi sedghi requested a review from JamesAPetts May 20, 2022 02:39
Copy link
Member

@JamesAPetts JamesAPetts left a comment

Choose a reason for hiding this comment

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

Thing there is still an event issue, plus some other comments.

packages/core/src/RenderingEngine/VolumeViewport.ts Outdated Show resolved Hide resolved
packages/core/src/types/Metadata.ts Show resolved Hide resolved
packages/tools/src/enums/JumpPresets.ts Outdated Show resolved Hide resolved
Copy link
Member

@JamesAPetts JamesAPetts left a comment

Choose a reason for hiding this comment

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

I still think there is a dangling event listener issue here, more in line.

packages/core/src/RenderingEngine/VolumeViewport.ts Outdated Show resolved Hide resolved
@sedghi sedghi requested a review from JamesAPetts May 23, 2022 19:37
@sedghi sedghi changed the title feat: Add VOLUME_NEW_IMAGE event and Add jumpToSlice for volume viewport feat: Add VOLUME_NEW_IMAGE event and Add jumpToSlice and default VOI for volume viewport May 23, 2022
Copy link
Member

@JamesAPetts JamesAPetts left a comment

Choose a reason for hiding this comment

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

Mostly there, comments in line.

@sedghi sedghi merged commit d36a23a into main May 24, 2022
@swederik swederik deleted the fix/volumeAPI branch July 8, 2022 09:32
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