vtkFlRenderWindowInteractor is a VTK class (actually FLTK too, but it helps to think of it as VTK) that enables VTK to render to and interact with your FLTK application. It is based on code by David Pont (the code was then called FlvtkInteractorWindow) which in its turn was partly based on the wxVTK code by David D. Marshall and Brian Todd. I reworked the code extensively to be simpler, more robust and bug-free(tm). It should always be available from http://cpbotha.net/vtkFlRenderWindowInteractor.html .

The main idea behind this class is to be as simple and robust as possible. It fulfils one purpose and that’s to enable you to write applications with FLTK and VTK. It is possible to have multiple VTK renderings (all active) in your FLTK application, each with its own independent working VTK interactorstyle. You can also add custom interactorstyles, just like with any standard VTK interactor. Picking also works fine, thank you.

This code has been successfully tested on Linux, Irix, Windows and many of the other platforms supported by ITK, as the vtkFlRWI is extensively used in the InsightApplications component of ITK.


The current version is 1.02. You can download a source and example tarball by clicking here. Read the changelog for a detailed description of changes.

The vtkFlRenderWindowInteractor project development is hosted by Google Code.  Go to our project page to checkout the latest development source or to file a bug!

7 thoughts on “vtkFlRenderWindowInteractor”

  1. I really appreciate for this great tool. It made my life easy believe me. Congratulations you have done a great job.

    I have one issue, please give me feedback as soon as possible.

    I have developed a medical imaging software in which 5 vtkFlRenderWindowInteractor run simulateneously. I used windows XP 32 bit. The software is working great. Without any issue. I used windows 7 32 bit also. There is no issue with 32 bit windows.

    Now I just moved to 64bit wndows 7.

    I didn’t change anything to my software, but when I run in windows 7 64bit, windows of 5 interactors appear but with empty renderer. I checked VTK, it is fine. But when I use vtkFlRenderWindowInteractor, it doesn’t show the vtk renderer, just an empty window box.

    have you faced this issue? Please update me if there is any solution for this. Thanks a lot.

    Best Regards:

    Furqan Ullah
    Website: http://real3d.pk

    1. I have not seen or heard of this problem before.

      If I were you, I would check if an app with *multiple* vtkRenderWindows + RWIs works on your 64bit setup. Also make sure that you’re not sharing vtkRenderer, vtkActor or Mapper objects between your RenderWindowInteractor objects.

  2. I am really new to VTK and FLTK. I came across your tool looking on the internet for alternatives to embed vtk inside a FLTK window.

    I am just trying to put a graph plot of an EEG made in vtk into a window inside of Fltk, and when I try to interact with it (by clicking on it), I get the following error message: ERROR: In ..\..\src2\VTK5.10.1\Rendering\vtkInteractorStyle.cxx, line 420
    vtkInteractorStyleJoystickCamera (00EB8240): Timer start failed

    I want to be able to do re-scale, move and all the things I could do in vtk by itself.

    I am sure you need more info, but I don’t really know what else to give you. Anyway, thank you very much for your help.

    1. I have been doing some digging into this, and I found out that the root of the problem resides on invoking the methods manually in the handle function implemented in vtkFlRenderWindowInteractor.cxx.
      Also, the problem only arises when one is dealing with Joystick mode, with Trackball mode, it works fine

  3. I have solved this issue finally. It does not have anything to do with your awesome piece of software. It was ultimately an issue with the usage of the vtk pipeline.

  4. I have a question.
    The default background is white. I have a binary thresholded image — all pixel value are 0s and 1s. And I can’t see any rendered objects due to the reason.
    How can I change the background color of the rendering window to black?

Leave a Reply

Your email address will not be published. Required fields are marked *