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

vtkimageSlice has a setOpacity value of 1 #3177

Open
ondaa opened this issue Nov 15, 2024 · 1 comment
Open

vtkimageSlice has a setOpacity value of 1 #3177

ondaa opened this issue Nov 15, 2024 · 1 comment
Labels
module: imaging module: rendering General rendering issues type: bug 🐞 Errors in functionality

Comments

@ondaa
Copy link

ondaa commented Nov 15, 2024

Bug description

Hi, I'm using the 2D label map painting function.

I ran it by applying 1 to the setOpacity function of ImageSlice, and I tried to paint wideget, but I couldn't find any traces of painting. And when I applied 0.999 as the opacity value, I saw it.

Is this an issue? Example looked at the following.

https://kitware.github.io/vtk-js/examples/PaintWidget.html

Steps to reproduce

...
layerColorFun.addRGBPoint(1, 128 / 256, 174 / 256, 128 / 256);
layerPiecewiseFun.addPoint(0, 0);
layerPiecewiseFun.addPoint(1, 1.0);

layerActor.getProperty().setRGBTransferFunction(0, layerColorFun);  
layerActor.getProperty().setPiecewiseFunction(0, layerPiecewiseFun);
layerActor.getProperty().setOpacity(1); // <-- this setting

...

Detailed Behavior

No response

Expected Behavior

setOpacity(1.0) or setOpacity(1) show painting.

Environment

  • vtk.js version: 32.7.0
  • Browsers: Chrome
  • OS: Windows
@ondaa ondaa added the type: bug 🐞 Errors in functionality label Nov 15, 2024
@finetjul
Copy link
Member

I tried to modify the PaintWidget example from
labelMap.actor.getProperty().setOpacity(0.5);
to
labelMap.actor.getProperty().setOpacity(1);
and the labelmap still renders fine.

Can you please provide a non working example ?

@finetjul finetjul added module: rendering General rendering issues module: imaging labels Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: imaging module: rendering General rendering issues type: bug 🐞 Errors in functionality
Projects
None yet
Development

No branches or pull requests

2 participants