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 · 3 comments
Open

vtkimageSlice has a setOpacity value of 1 #3177

ondaa opened this issue Nov 15, 2024 · 3 comments
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
@ondaa
Copy link
Author

ondaa commented Nov 18, 2024

Thank you for the reaction.

The code is no different from the example. Look at this video.

If the opacity value is 1, the label map color is not visible, but if it is less than 1 visible.
(update is setOpacity method)

Viewer.Spread.-.Chrome.2024-11-18.10-12-03.mp4

@finetjul
Copy link
Member

can you reproduce the issue within the example ?

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