[vtkusers] vtk JS - Slice Scrolling with vtkInteractorStyleImage

Logan Langholz llangholz89 at gmail.com
Sat Jun 17 10:38:46 EDT 2017


Hi Seb,

Thanks for the response.  When you say the zooming action, are you referencing the ‘scroll event’? Frankly, that would be a preferable way for me to scroll through the slices, and I was actually wondering if there was a way to customize those events to whatever action the user wanted (scroll vs. ctl+drag vs. ctl+shift etc.).  

Anyway, the ctl+drag event still doesn’t seem to work, so I will go ahead and open the issue on GitHub. I’m working on an MBP and tried both 'control+drag' and 'command+drag’; command+drag fired a window/level event while control+drag didn’t do anything.  The issue appears in all browsers as well.  

I’ll open the issue on GitHub, and in the mean time if anyone has any thoughts or ideas I’m all ears! 

Thanks!

-Logan

> On Jun 16, 2017, at 1:19 PM, Sebastien Jourdain <sebastien.jourdain at kitware.com> wrote:
> 
> 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 <https://github.com/kitware/vtk-js/issues>
> 
> Thanks,
> 
> Seb
> 
> On Fri, Jun 16, 2017 at 12:11 PM, Logan Langholz <llangholz89 at gmail.com <mailto: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 <http://www.kitware.com/>
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html <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 <http://www.vtk.org/Wiki/VTK_FAQ>
> 
> Search the list archives at: http://markmail.org/search/?q=vtkusers <http://markmail.org/search/?q=vtkusers>
> 
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers <http://public.kitware.com/mailman/listinfo/vtkusers>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170617/dd905448/attachment.html>


More information about the vtkusers mailing list