

     FltkImageViewer


WHAT IS THIS ?

This is a set of classes that perform
image visualization using the FLTK toolkit
as GUI.


WHAT DO I NEED TO RUN IT ?

As GUI and visualization are not part of
Insight, external libraries are required
for this program. The GUI is implemented
using FLTK (the Fast Light Toolkit) that
can be freely downloaded from 
http://www.fltk.org.

FLTK is multiplatform and will run without
trouble on Linux, IRIX and Windows 95/NT 
and SunOS.

This classes require the code in the 
/Auxiliary/MetaImage/IView directory. 
This code is not built by default, so you 
should have to activate it.



HOW TO BUILD IT ?

Let's call "Insight" the directory in which 
you installed the toolkit.

To build this library you should follow
these steps 


1) Download and install FLTK

1.1) For Visual C++ use the fltk.dsw 
     file in /visualc.  Modify the project
     setting to those required by ITK
     (for more details see the file 
     VC_Custom_Projects.doc in /Documentation)

1.2) Build the projects: fluid and fltk
     this last one in Relead and Debug 
     configurations.

1.3) Create a subdirectory '/Release' in 
     fltk/lib and copy fltk.lib on it. 

1.4) Create a subdirectory '/Debug' in 
     fltk/lib and copy fltkd.lib on it 
     renamed as fltk.lib



2) Activate the compilation of Auxiliary
   classes.

2.1)  Go to  your Insight directory and edit
      the file CMakeList.txt. Look for the line
      containing the command "SUBDIRS"

      Add at the end of the list between the 
      parenthesis, the directories "Auxiliary"
      and "Examples".
      
      the line will look similar to:

      "SUBDIRS(Utilities Code Testing Examples Auxiliary)"

      (without the quotes...)

      That will indicate to the make program CMake that 
      this directories should be included in the building 
      process.

      If you want to know more about CMakeList
      files and the portable maker CMake, please
      consult:  Insight/Documents/CMake.pdf

2.2)  cd to Insight/Auxiliary.
      edit the CMakeList.txt file.
      Look for the line containing the command
      "SUBDIRS". Add the directories "MetaImage"
      and "FltkImageViewer".
    
      The line will look similar to:
      
      "SUBDIRS(MetaImage FltkImageViewer)"

      (without the quotes...)

      MetaImage contains a set of classes for
      reading and writing images on files.
      
      FltkImageViewer contains classes for the 
      GUI of image display.


2.3)  cd to Insight/Auxiliary/MetaImage.
      edit the CMakeList.txt file.
      Look for the line containing the command
      "SUBDIRS". Add the directory "IView".
    
      The line will look similar to:

      "SUBDIRS(IView)"

      (without the quotes...)

      IView is a set of classes for Image display.


3) Rerun "configure" (on Unix) or CMakeSetup (on windows)
   as you did the first time you installed the Insight
   toolkit.  That will regenerate the Makefiles (on Unix)
   or .dsw .dsp project files (on Windows for Visual C++).
  

4) on Unix:

   run make

   on Windows:
  
   open the itk.dsw workspace file and select
   the FltkImageViewer project. Rebuild it.


5) on Unix:
  
   The library should be availabe at your Insight binary
   directory, under : /Examples/FltkImageViewer

 
   on Windows:

   The library should be availabe at your Insight binary
   directory, under : /Examples/FltkImageViewer/ and the
   subdirectory Release of Debug depending on the configuration
   you are using.   
   

6) Enjoy  !




We appreciate your feedback.
Please send your comments to the Insight mailing list,
or to:  ibanez@cs.unc.edu.


