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: Fix color synchronization inaccuarcy in volume rendering module #7042

Merged
merged 1 commit into from Jun 27, 2023

Conversation

lassoan
Copy link
Contributor

@lassoan lassoan commented Jun 24, 2023

When a color node with few color table entries (such as fMRI) was used for showing a volume, the "Synchronize with Volumes module" button in volume rendering module very inaccurately copied the color entries to the color transfer function. The problem was that only every 64th color table entry was copied. Fixed the issue by copying up to 24 color entries (evenly sampled in the lookup table) of the table into the transfer function. This number is large enough to accurately represent a color table, but not too high so that users can still edit the color transfer manually.

Also fixed synchronization of continuous color mapping. All control points of continuous color maps are copied, so these are copied in full fidelity.

Fixes the problem reported at https://discourse.slicer.org/t/the-colormap-in-volume-rendering-is-wrong-when-using-fmri-lookup-table-in-volume/30186

When a color node with few color table entries (such as fMRI) was used for showing a volume, the "Synchronize with Volumes module" button in volume rendering module very inaccurately copied the color entries to the color transfer function. The problem was that only every 64th color table entry was copied. Fixed the issue by copying up to 24 color entries (evenly sampled in the lookup table) of the table into the transfer function. This number is large enough to accurately represent a color table, but not too high so that users can still edit the color transfer manually.

Also fixed synchronization of continuous color mapping. All control points of continuous color maps are copied, so these are copied in full fidelity.

Fixes the problem reported at https://discourse.slicer.org/t/the-colormap-in-volume-rendering-is-wrong-when-using-fmri-lookup-table-in-volume/30186
@lassoan lassoan added this to the Slicer 5.3 milestone Jun 24, 2023
@lassoan lassoan requested a review from pieper June 24, 2023 19:25
@lassoan lassoan self-assigned this Jun 24, 2023
@lassoan lassoan merged commit 35e5586 into Slicer:main Jun 27, 2023
5 checks passed
@lassoan lassoan deleted the fix-volume-rendering-color-sync branch June 27, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant