[Insight-users] How to run an example

Luis Ibanez luis.ibanez at kitware.com
Mon Feb 25 17:25:16 EST 2002


Hi,

Wellcome to ITK !

In order to run the examples you may need to run CMake before.

What CMake does it to present a set of options in a graphic inteface
and then according to them it generates project files for Visual Studio
(.dsw and .dsp) with the parameters that you have selected. That saves
you from having to select options in all the projects individually.

You will have to run CMake and do

1) Select   "BUILD_EXAMPLES"  (ON)

2) Click on the "Configure" button
     eventually that will present new options (that will be colored in Red)
     you can decide about these options and click in "Configure" again
     until no new (red) options appear

3) Then click on "Ok"
     CMake will start generating the project files and then it will quit.


After doing this, if you reopen the "itk.dsw" file, you will see the 
projects
for the Examples and will be able to run them from  Visual Studio.

MRIBiascorrector is a set of command line tools that will take your
image, filter it and save it.  The previous steps should be enough for
building this particular example.

-----

Note that some of the examples require additional software.
For example, some of them use FLTK which you can download
for free from http://www.fltk.org (1.0.11 is the recomended version).

If you want to build those examples, first download fltk, and build it
in your system (it should be pretty fast ~ 10 min).  Then run CMake
again and click on the "Advanced" check button. That will present
additional options to you.   Among these options you will see:

1) FLTK_INCLUDE_PATH
2) FLTK_LIBRARY
3) FLTK_FLUID
4) FLTK_WRAP_UI

(1)  is the path to where you installed FLTK
(2) is the actual library file created by fltk   it should be in
     fltk/lib/
    it can be fltk.lib or fltkd.lib  
(3)  Fluid is an interactive program delivered with FLTK
that allow you to generate C++ code from the design of your GUI.
CMake just need to know where "fluid.exe" is.  It should be in
fltk/fluid/fluid.exe

(4) Just turn it on

Additionally you will have to activate

BUILD_AUXILIARY   = ON
BUILD_FLTKIMAGEVIEWER = ON

Click on "Configure" until no new (Red) options appear,
then click on "Ok" and when CMake quits you will be ready
to open ITK.dsw and build these other examples.


You may be wondering why you have to do all this
process in order to run the examples...      :-)

The answer is that we don't want to impose users to have all this
additional software. These other packages are not required for
ITK itself. They are only used to make the examples full fledged
applications (even though they are quite small).

ITK is not related to any particular GUI. That let you select the
one of your preference: MFC, Gtk, Qt, Xforms, FLTK....
The toolkit will act more as an image processing engine inside
your applications.


Please let us know if you encounter any further problems.


Thanks

     Luis


=======================================

Qiu Wu wrote:

>
>
>  Hi,
>
>
>     I'm new user to this package.
>
>  I downloaded itk package and install on my PC machine, now I want to 
> run an
> example, such as
>
> MRIbiascreection, if I'm using MSVC++, do I need to make a new project 
> in that
>
> cirectory, why do I need to use CMAKE tool before?
>
>
> Thanks for your insights>
>
>
> --Qiu
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos: 
> http://photos.msn.com/support/worldwide.aspx
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>







More information about the Insight-users mailing list