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

Clamp out of range colors to peak value #310

Closed thewtex closed 4 years ago

thewtex commented 4 years ago

When values exceed the min / max mapped color, they are present as black in the slices:

image

Can they be clamped to the min / max value of the colormap? @scottwittenburg could you please help with this?

scottwittenburg commented 4 years ago

@thewtex Yes I'll take a look, thanks.

scottwittenburg commented 4 years ago

Just to make sure I'm trying to fix the right issue: I'm reproducing this by sliding that blue window level bar to, e.g., reduce the max mapped color value. Like in this video?

valueClampingIssue

thewtex commented 4 years ago

@scottwittenburg yes, where the cyan is turning black, we want to keep it cyan.

jourdain commented 4 years ago

Wondering if this is related to https://github.com/Kitware/vtk-js/issues/1499

scottwittenburg commented 4 years ago

Yep, I wondered too since the symptom looks identical, but it seems we're not using discretize from here, and it seems that's not the default. I'm still looking into it though. Thanks @jourdain.

thewtex commented 4 years ago

git bisect points to

54b7bf89b6c7b3b536dad9bd65c2d89dbb8bcc93

 +++ b/package.json
@@ -26,7 +26,7 @@
     "open": "^6.4.0",
     "promise-file-reader": "^1.0.2",
     "regenerator-runtime": "^0.13.5",
-    "vtk.js": "^14.1.2"
+    "vtk.js": "^14.3.2"
   },
   "devDependencies": {
     "@babel/plugin-transform-runtime": "^7.9.6",