Kitware / react-vtk-js

Declarative library exposing vtk.js visualization pipeline as React components
https://kitware.github.io/react-vtk-js/
77 stars 24 forks source link

feat(example): PET MIP with window/level adjustment #138

Closed jadh4v closed 2 months ago

jadh4v commented 3 months ago

Add sliders and VolumeRepresentation property values for adjusting the data range applicable for the grayscale colormap. This effectively has the resulting behavior of Window/Level adjustment.

I have verified that, in the fragment shader, the color transfer function is indeed applied after the raw voxel values are projected to the viewport. Therefore, using colorDataRange as a way to apply window/level adjustment for a MIP view is appropriate.

https://github.com/user-attachments/assets/84faca29-cd84-4c55-a2b1-594494e12185

jadh4v commented 3 months ago

@floryst @jun-sironamedical Please review.

jun-sironamedical commented 3 months ago

@jadh4v looks good to me, seems pretty straight forward. Might have questions when I try to implement though, but this PR looks good.

floryst commented 3 months ago

LGTM after Daniel's comment is addressed!

jourdain commented 2 months ago

:tada: This PR is included in version 2.0.0-beta.18 :tada:

The release is available on:

Your semantic-release bot :package::rocket: