[vtkusers] vtk.js image volume issues

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri Jul 20 17:53:44 EDT 2018


You need to disable those lines as your data is homogeneous.

        // this.actor.getProperty().setUseGradientOpacity(0, true);
        // this.actor.getProperty().setGradientOpacityMinimumValue(0, 15);
        // this.actor.getProperty().setGradientOpacityMinimumOpacity(0,
0.0);
        // this.actor.getProperty().setGradientOpacityMaximumValue(0, 100);
        // this.actor.getProperty().setGradientOpacityMaximumOpacity(0,
1.0);
        // this.actor.getProperty().setShade(true);

On Fri, Jul 20, 2018 at 3:28 PM Richard Frank via vtkusers <
vtkusers at public.kitware.com> wrote:

>
>
> Hi,
>
>
>
> I’m creating a simple volume from vtkImageData using vtk.js.
>
>
>
> I create an empty 3d vtkImageData and set it up with a mapper and actor,
> and add it to the renderer.
>
>
>
> I create a transfer function that has 0 = blue, 100 = red, 1000 = green.
>
>
>
> I’m trying to set pixels directly in the volume.
>
>
>
> There’s two problems –
>
>
>
> The first is that when I click anywhere on the screen the volume
> disappears…it shows on the first render call.
>
>
>
> 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”.
>
> Regardless, however, the render call makes the volume disappear.
>
>
>
> My code is here:
>
>
>
> https://github.com/DominionSoftware/TestVolumeImage
>
>
>
> and can be built with the installation instructions like the other
> examples (this was cribbed from an example).
>
>
>
> Anyone have any suggestions as to why the volume disappears, and / or ways
> to debug this?
>
>
>
>
>
> Thanks,
>
>
>
> Rick
>
>
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180720/e36c7cd7/attachment.html>


More information about the vtkusers mailing list