Custom cursor in VTK window

Hello,

I have a WPF application where one of its controls is hosting a VTK window. I want to set the icon of the mouse cursor to any image I want (for example, a magnifying glass to represent a zoom action). I have tried to do this from WPF side but when I hover the VTK window the cursor icon changes to VTK default cursor. I have also tried to set a custom icon from VTK side, but it appears that I can only choose among a small set of predefined cursors. Do you know how can I set a custom cursor for VTK?

Thanks in advance!

Any help for this?

Hello,Have you solved it?I have the same problem.

Custom cursors can be used via the vtkRenderWindow:

renWin->SetCursorFileName(cur_file);
renWin->SetCurrentCursor(VTK_CURSOR_CUSTOM);

See TestCustomCursorShape for an example.

Thank you very much for your answer! It works!

Which VTK version begins to support this? I can’t find VTK_CURSOR_CUSTOM inside vtk8.1.2.
Thanks.

Looking at the git history, it seems like it was added in v9.1.0.