[vtkusers] Re: Announce; Insight (ITK) Segmentation and Registration Toolkit
Will Schroeder
will.schroeder at kitware.com
Thu Feb 28 17:01:08 EST 2002
Hi Xenios-
>What is the relationship (if any) between ITK and VTK? Can they easily
>co-exist in the same project?
There are several features that simplifies VTK / ITK integration.
+ Thanks to CMake, ITK and VTK can be built and linked in a consistent
fashion. ITK requires ANSI C++, including RTTI, so VTK must be built with
the ANSI flag enabled (VTK_USE_ANSI_STDLIB).
+ There are filters (called importers and exporters) in VTK and ITK that
allow data to be moved between pipelines.
+ There are readers and writers that allow data exchange.
ITK has no visualization support, so using VTK as the visualization engine
is a natural. (In fact there are several ITK examples that are written
assuming VTK is available.) It also has a dataflow architecture, but in
ITK there are just two data object types: an image and a mesh. The mesh in
particular is more flexible but less memory efficient. The ITK image is
templated over pixel type, so it is possible to have pixels that are quite
complex. The ITK iterators are quite beautiful, they support n-dimensions
and nicely simplify the code.
While there are similarities in design, style, and extreme programming
style (i.e., dashboard), the main thing that you will notice is that ITK is
very templated in the generic programming style. This means that ITK is
compile-time oriented versus VTK's run-time orientation. This use of C++ is
almost like a new programming language, since it uses features of C++ that
some people haven't seen too much of. On the plus side, generic programming
tends to produce faster executing code. You will definitely need a good,
modern compiler to handle ITK.
Another integration path: ITK has developed a system called CABLE that
automatically wraps C++ with Tcl, a lot like VTK does now. The only thing
is that the process is enormously more difficult because of the templated
code. CABLE is a general solution, but slower and creates much bigger
libraries than the custom VTK wrapping process that we have now. Eventually
this will be refined and VTK/ITK programs using Tcl or other interpreted
languages should be real easy to do. For now it is a bit tricky to work with.
Will
William J. Schroeder, Ph.D
Kitware, Inc.
469 Clifton Corporate Parkway
Clifton Park, NY 12065
will.schroeder at kitware.com
1-518-371-3971 x102
1-518-371-3971 (fax)
More information about the vtkusers
mailing list