[Insight-users] Re: Visualizing a binary itk-Image

Luis Ibanez luis.ibanez@kitware.com
Wed, 12 Mar 2003 13:01:17 -0500


Hi Darby,

Unfortunately, just setting an FL_Box and a vtkImageActor
will not work.   The reason is that you need one and
only have one event loop controlling the program.

If you mix VTK and FLTK, only one of the two
should control the event loop.  Please use the
vtkFlRenderWindowInteractor available in

    InsightApplications/Auxiliary/VtkFltk


An example of the use of this class is available
in the ThinPlateSplines application in
InsightApplications.


    Luis

--------------------------

Darby J Brown wrote:
> I am trying to view a vtkImage with an fltk interface. Can I just create
> an Fl_Box in my GUI that uses vtkImageActor.h similar to how the
> MetaImageViewGUI.fld file uses the GLSliceView?  Then I can have fltk
> sliders that call the SetZSlice() function?  Do you know of an example
> that does this?
> 
> 	-darby j
> 
> On Wed, 12 Mar 2003, Luis Ibanez wrote:
> 
> 
>>
>>Hi Zein,
>>
>>
>>1) The vtkImageActor will show by default the first slice
>>    of a volume. In order to see other slices you have to
>>    invoke the method SetZSlice().
>>
>>    Please look at the documentation of this class
>>
>>    http://www.vtk.org/doc/nightly/html/classvtkImageActor.html
>>
>>    You may want to add a Slider to your FLTK GUI and
>>    make the callback to invoke SetZSlice() in the vtk
>>    class.
>>
>>
>>
>>2) You can get displays of orthogonal slices by using
>>    the vtkImagePlaneWidget. This may be more interactive.
>>
>>    http://www.vtk.org/doc/nightly/html/classvtkImagePlaneWidget.html
>>
>>
>>
>>3) VTK until recently was not friendly with other OpenGL
>>    windows in the same application. This has been fixed now.
>>
>>    If you get VTK 4.2 this problem should go away.
>>
>>
>>
>>
>>Please let us know if you have further questions.
>>
>>
>>Thanks
>>
>>
>>    Luis
>>\