[Insight-users] How to load package in tcl for itk

Huisman, H. H.Huisman at rad.umcn.nl
Sat, 27 Mar 2004 22:52:19 +0100


If you run a tcl script and you get:
  can't find package InsightToolkit...
then that means that tcl hasn't found the InsightToolkit pkgIndex.tcl =
file. Please locate it on your computer with file search or so, and =
verify that this file is in your TCLLIB_PATH=20

You can find more information of this tcl behaviour in the man page of =
pkg_mkIndex.=20

So:
1. Supply direcories on TCLLIB_PATH containing pkgIndex.tcl files or in =
their sub-dirs.
2. Pay attention to the formatting of TCLLIB_PATH itself and the =
concatenation of directories!
3. Check in a running tcl the variable auto_path (puts $auto_path) and =
verify that it contains the required directories.=20

BTW To make things confusing, the ITKAPPLICATIONS use different =
approaches to wrap itk commands into tcl. Some examples supply their own =
wrapper code. Others, like the one I send you uses the CableSWIG =
wrapping interface. The latter automatically wraps all itk objects into =
tcl (or python, java ..) , so you don't need to write your own wrapper =
code.=20

I do have a running application, that uses tcl scripting, and mixes VTK =
and ITK commands in a fully connected pipeline. So, it is really =
possible! Please keep on trying. I love to have some more tcl users.

Henkjan