cornerstone
cornerstone copied to clipboard
ColorMapping Example not working anymore
https://rawgit.com/cornerstonejs/cornerstone/master/example/falseColorMapping/index.html
doesnt work anymore. Image is loading but after selecting a colormap the image goes blank.
@dannyrb I have submitted a propose for this issue in #412, let me know if you think I do it differently ❤️
Thanks, @mateusfreira! I've merged your fix.
I'll likely need to generate a new dist
and cut a release for the demo to start working, but the source is aligned.
Thank you for taking the time to PR a fix! ^_^
Hi in the file internal/drawImageSync.js if an image is already rendered the if statement if (!render) { if (enabledElement.viewport.colormap && enabledElement.viewport.colormap !== '' && enabledElement.image.labelmap === true) { render = renderLabelMapImage; } will never be executed even if you set the colormap to true .
As a temporary workaround I added the following statement to get over the issue
if(enabledElement.viewport.colormap &&enabledElement.viewport.colormap !== '') render = false;
its a bad and crude fix but it works.
It seems same now. it displays black color when I change colormap.
browser: chrome os: window10