[Insight-developers] Tcl Wrapping

Brad King brad.king@kitware.com
Mon, 22 Oct 2001 16:48:58 -0400 (EDT)


Hello, all:

I'm pleased to announce that CABLE is ready to be used by Insight for
Tcl wrapper generation.  Sorry this has taken so long.  The backend
tool has been ready for months, but packaging it for use has been time
consuming.  It has been moved to a separate build tree for similar
reasons to those for the separation of CMake and DART.  There is a
CABLE web page at

http://public.kitware.com/Cable

with instructions for downloading and installing CABLE and GCC-XML.
CABLE can also be used directly from its build tree.  I recommend this
approach because CABLE will still be under development.

Once CABLE is installed, turn on ITK_WRAP_TCL when building the
Insight tree, and Tcl wrappers will be built for a few classes.  CMake
will ask you to specify information about where to find CABLE.  In
order to use CABLE from its installed location, point the "CABLE"
cache entry at the CABLE binary ("<prefix>/bin/cable").  In order to
use CABLE from its build directory, delete all CABLE_* entries except
for CABLE_BUILD_DIR, and point that at your CABLE build directory.

There is one test that will be added when ITK_WRAP_TCL is turned on:

Insight/Testing/Code/Algorithms/itkCurvatureFlowTestTcl.tcl

This script provides a short example for using ITK from Tcl.  Note
that you will have to make sure the appropriate instantiations of the
classes you need have been wrapped before a script can use it.

In order to allow Tcl to find the ITK Tcl pacakges, make sure your
TCLLIBPATH environment variable lists the Wrapping/Tcl path under the
Insight binary directory.  It must also list the CABLE directory as
specified in CABLE's documentation.  For example, it could be:

TCLLIBPATH="/usr/local/share/Cable/lib
            /usr/src/Insight-build/Wrapping/Tcl"
or if you are using CABLE from its build directory:
TCLLIBPATH="/usr/src/Cable-build/WrapTclFacility
            /usr/src/Insight-build/Wrapping/Tcl"

Note that it is a space-separated list.  On Windows, you will have to
specify the build's subdirectory (Debug, Release, etc):

TCLLIBPATH="C:/PROGRA~1/Cable/lib
            C:/Insight-vcxx/Wrapping/Tcl/Debug"
or if you are using CABLE from its build directory:
TCLLIBPATH="C:/Cable-vcxx/WrapTclFacility/Debug
            C:/Insight-vcxx/Wrapping/Tcl/Debug"

Once ITK's Tcl usage is more widespread, we can create a more elegant
packaging system.

The CABLE web page also has a link to a new mailing list for
CABLE-related discussion.  Feel free to post any questions about CABLE
to that list, but ITK-specific questions should remain on this list,
of course.

Good luck,
-Brad