vtk JS - Slice Scrolling with vtkInteractorStyleImage

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

vtk JS - Slice Scrolling with vtkInteractorStyleImage

Logan Langholz
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtk JS - Slice Scrolling with vtkInteractorStyleImage

Sebastien Jourdain-2
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. 

Thanks,

Seb

On Fri, Jun 16, 2017 at 12:11 PM, Logan Langholz <[hidden email]> 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


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: vtk JS - Slice Scrolling with vtkInteractorStyleImage

Logan Langholz
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 <[hidden email]> 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. 

Thanks,

Seb

On Fri, Jun 16, 2017 at 12:11 PM, Logan Langholz <[hidden email]> 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



_______________________________________________
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
Loading...