[vtkusers] Changing the mouse cursor?

Karthik Krishnan karthik.krishnan at kitware.com
Thu Dec 25 01:41:26 EST 2008


Sean McBride wrote:
> On 15-Dec-08, at 7:36 AM, Karthik Krishnan wrote:
>
>>> I managed to pick a point from my vtkImageViewer2. It would be more 
>>> efficient if I can change the mouse cursor to "cross" so I can pick 
>>> points more accurately. Does anyone know how to do this?
>> vtkRenderWindow::SetCursor( VTK_CURSOR_CROSSHAIR );
>>
>> You'll need to use VTK CVS or VTK-5.2. (I think it made it to the 5.2 
>> release) since I added it recently.
>
> Do you mean SetCurrentCursor()?
Yes. That was a typo. I meant vtkRenderWindow::SetCurrentCursor( 
VTK_CURSOR_CROSSHAIR );
> <http://www.vtk.org/doc/nightly/html/classvtkRenderWindow.html#e62e3227c8c1d255d0ad3b4d5ef28035> 
>
>
> I notice that its not implemented in the Carbon and Cocoa 
> RenderWindows.  Is there a bug open for that? I could probably do the 
> Cocoa version if you'd like...
Yes. I did not implement it on the Carbon/Cocoa. Please go ahead and add 
the cocoa version if you have time.

At the time I guess I left that open since our software (VolView) did 
not have a Carbon /Cocoa interface on the mac and instead defaulted to 
an X11 application on mac. I think the crosshair defaults to some other 
cursor on carbon/cocoa.

Thanks
--
karthik
>
> Sean
>

-- 
Karthik Krishnan
R & D Engineer,
Kitware Inc,
Ph:  518 371 3971 x119
Fax: 518 371 3971




More information about the vtkusers mailing list