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

[Bug] Colormap cannot be changed for the second volume in a VolumeViewport #4744

Closed
JoostJM opened this issue Jan 29, 2025 · 0 comments · Fixed by #4746
Closed

[Bug] Colormap cannot be changed for the second volume in a VolumeViewport #4744

JoostJM opened this issue Jan 29, 2025 · 0 comments · Fixed by #4746
Labels
Awaiting Reproduction Can we reproduce the reported bug?

Comments

@JoostJM
Copy link
Contributor

JoostJM commented Jan 29, 2025

Describe the Bug

When changing the colormap for the second volume, this always gets applied to the first volume. This is due to a bug in cornerstone extension commandsModule.ts, setViewportColormap. To set the colormap on a viewport, it requires the volumeId. Currently this is retrieved by viewport.getVolumeId(), which only returns the first volumeId.

It could be changed by adding a specifier, i.e. viewport.getVolumeId({ volumeId: <volumeId> }), but this requires the volumeId to update to be known or retrievable. In this function, the correct volume is identified by the DisplaySetInstanceUID, which is slightly different from the volumeId, and therefore cannot be directly used to get the correct volumeId.

Steps to Reproduce

  1. Load the PET-data case in OHIF viewer.
  2. Try to change the colormap on the PT volume in a fusion viewport. This applies the selected colormap to the CT volume (which is the first volume in the viewport)

The current behavior

Colormaps can only be changed for the first volume in a viewport.

The expected behavior

Selecting the second volume in the actionmenu should apply the chosen colormap to the second volume in the viewport.

OS

Linux 22.04.4 LTS

Node version

20.11.0

Browser

Chrome 122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Reproduction Can we reproduce the reported bug?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant