Kitware / itk-vtk-viewer

2D / 3D web image, mesh, and point set viewer using itk-wasm and vtk.js
https://kitware.github.io/itk-vtk-viewer/
BSD 3-Clause "New" or "Revised" License
210 stars 64 forks source link

fix(viewer): Various rendering/ui improvements #293

Closed scottwittenburg closed 4 years ago

scottwittenburg commented 4 years ago

Detect when we have only a labelmap and make adjustments to how user- specified weights (from the labelmap piecewise function slider) are mapped to the actual pwf. Also, adjust weight->pwf mapping when we are showing slice compared to volume, as we always want some context in slice mode (so we can see segments to adjust pwf for).

Decouple the component selection checkboxes from the labelmap weight slider, as those do not interact well together. After this change, the component visibility state consists of a boolen indicating whether the component is shown or hidden, as well as float specifying the weight.

Depends on this change in vtk.js.

scottwittenburg commented 4 years ago

Improvement in rendering when we have only labelmap:

just_labelmap-optimize

scottwittenburg commented 4 years ago

Improvement when we have at least one intensity and a labelmap:

intensity_plus_labelmap-optimize

scottwittenburg commented 4 years ago

@thewtex Let me know what you think. Instead of just multiplying the fragment alpha by the proportional component pwf value, I used the proportional component weight to adjust that scaling factor. I thought this made sense because when you have set the labelmap component weight really small, I feel that piecewise function should have a smaller effect on the fragment opacity.

thewtex commented 4 years ago

:tada: This PR is included in version 10.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: