[vtkusers] vtk JS - Slice Scrolling with vtkInteractorStyleImage

Sebastien Jourdain sebastien.jourdain at kitware.com
Fri Jun 16 15:19:15 EDT 2017


Hi Logan,

I think the zooming action is going through the slices.
Ctrl + drag seems to do the trick for me.

If you want, you can report an issue on the project itself.
https://github.com/kitware/vtk-js/issues

Thanks,

Seb

On Fri, Jun 16, 2017 at 12:11 PM, Logan Langholz <llangholz89 at gmail.com>
wrote:

> Hello,
>
> I’ve been playing around with the vtk.js library and am currently stuck
> when trying to scroll through slices of a volume using the
> vtkInteractorStyleImage class. Using the examples as a guide and the
> ‘LIDC2.vti’ example volume, I can get various slices to show up on loading
> with ‘mapper.setZSclice()’, but am then unable to scroll through.  Here’s
> that bit of the code:
>
>         const mapper = vtkImageMapper.newInstance();
>         mapper.setInputData(data);
>         mapper.setZSlice(50);
>
>         const iStyle = vtkInteractorStyleImage.newInstance();
>         iStyle.setInteractionMode(‘IMAGE_SLICING’);
>         renderWindow.getInteractor().setInteractorStyle(iStyle);
>
> Looking at the source code, clicking while holding ‘control’ should allow
> me to scroll through, but I’m not getting that event.  If I switch the
> interaction mode to ‘IMAGE3D’ and hold shift, I can get the expected
> rotation event.
>
> I’m not sure if it’s just something simple that I’m overlooking in the
> setup (which is likely given that I’m still relatively new to this), but I
> appreciate any help and pointers!
>
> Cheers,
>
> -Logan
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170616/ae369301/attachment.html>


More information about the vtkusers mailing list