<div dir="ltr">You need to disable those lines as your data is homogeneous.<div><br></div><div><div>        // this.actor.getProperty().setUseGradientOpacity(0, true);</div><div>        // this.actor.getProperty().setGradientOpacityMinimumValue(0, 15);</div><div>        // this.actor.getProperty().setGradientOpacityMinimumOpacity(0, 0.0);</div><div>        // this.actor.getProperty().setGradientOpacityMaximumValue(0, 100);</div><div>        // this.actor.getProperty().setGradientOpacityMaximumOpacity(0, 1.0);</div><div>        // this.actor.getProperty().setShade(true);</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jul 20, 2018 at 3:28 PM Richard Frank via vtkusers <<a href="mailto:vtkusers@public.kitware.com">vtkusers@public.kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_2977600742308352040WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hi,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’m creating a simple volume from vtkImageData using vtk.js.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I create an empty 3d vtkImageData and set it up with a mapper and actor, and add it to the renderer.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I create a transfer function that has 0 = blue, 100 = red, 1000 = green.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’m trying to set pixels directly in the volume.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">There’s two problems – <u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The first is that when I click anywhere on the screen the volume disappears…it shows on the first render call.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I have a button that is used to trigger the voxel setting. This seems to work only on the first slice of voxels, and the rest seem to not “stick”.<u></u><u></u></p><p class="MsoNormal">Regardless, however, the render call makes the volume disappear.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">My code is here:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><a href="https://github.com/DominionSoftware/TestVolumeImage" target="_blank">https://github.com/DominionSoftware/TestVolumeImage</a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">and can be built with the installation instructions like the other examples (this was cribbed from an example).<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Anyone have any suggestions as to why the volume disappears, and / or ways to debug this?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Rick<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtkusers</a><br>
</blockquote></div>