[Insight-users] Re: [Insight-developers] error compiling ITK

Luis Ibanez ibanez at cs.unc.edu
Tue Sep 25 09:02:16 EDT 2001


Hi,

The current plan in ITK development includes
wrappers for python, java and tcl. However 
the fact that most of the toolkit is based
on generic programming (so, using templates
extensively) makes wrapping a particularly 
difficult task.

A wrapping system called CABLE is under 
development and the team of people in charge 
is the best you can find on C++ programming, 
so we are very confident in that this system 
will be available soon.

So, to give a short answer to your question:


  Yes, 
  the toolkit will be wrapped at some point.


Notice that in the meantime, nothing prevents 
you from wrapping "by hand" the set limited 
set of classes you want to use. What makes CABLE 
a hard task is that it will provide support for 
creating automatic instantiations of thousands 
of classes, and then produce wrappers for all of 
them.


To give you an idea, we have a templated Image class,
whose parameters are the pixel type and the dimension.

Just for this class you could implement and wrap 
for example:


itk::Image< char , 2 >   // 2D image of char pixels
itk::Image< float, 2 >   // 2D image of float pixels

itk::Image< RGBPixels<char>, 3D > // 3D image of RBG
                          // pixels with char components

itk::Image< Vector<float,3>, 2 >  // a 2D image whose
                          // pixels are 3D vectors 

itk::Image< int, 4 >      // 4D image of int pixels


itk::Image< Point<double,5>, 6 > // a 6D image with
                          // 5D points as pixels :-)

....


This is just for the Image class...
Then, if you go to the Filters, the Add filter is
templated over the types of the two input images
and the type of the output image. So if you have 
instantiated N types of Images, you can have N^3 
Add filters....

Well, some combinations will not make sense, like 
adding a Vector<float,4> with a RGBPixel<char>,... 
so the final number may not be N^3, but nonetheless 
the number will not be a small one...


Hasta pronto,


Luis


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

Miguel Angel Rodriguez Florido wrote:
> 
>         Hi Luis, thanks for your fast answer. Well I am going to explain what
> we would like to do and what we understand about itk, and after you can
> tell me if I can use itk. Well we are using tools in tcl/tk and VTK, so
> we do GUI applications with tcl/tk and vtk, and we would like to use itk
> with a wrapper in tcl/tk, just to use it in the same applications than
> vtk. So in the itk web site, we read that this software can be used with
> wrappers for python, java and tcl/tk,..so we would like to compile these
> libraries with tcl/tk and use it like VTK with tcl/tk.
>         So, if we can use tcl/tk and itk, we would like to know how to compile
> it with a tcl/tk version (because I think that the cmake takes the
> tcl/tk version that you have by default) and how to call these classes
> from our VTK application. I think that we only have to load the .so
> libraries or something similar.
>         So, that's all at this moment. Thanks for your help and bye.
>         Nos vemos.
> 
> --
>                Miguel Angel Rodriguez Florido
>  ETSI Telecomunicacion -ULPGC- Gran Canaria - Canary Islands - Spain
>  Email: marf at dsc.ulpgc.es - Tfnos: +34 928 452980 Fax:+34 928 451243
>  http://grtv.teleco.ulpgc.es/~marf +34 928 449970 (Hosp. Dr. Negrin)

-- 
Luis Ibanez                                      CB#:   7060
Research Assistan Professor                      phone: (919) 843 5436
Division of Neurosurgery                         fax:   (919) 966 6627
University of North Carolina at Chapel Hill      email:
ibanez at cs.unc.edu
Chapel Hill, NC 27599-7060                      
http://www.cs.unc.edu/~ibanez



More information about the Insight-users mailing list