[Insight-users] CSwig - tcl: invalid command name "itk::create"

Stephan Schmitt stephan.schmitt at charite.de
Thu Jun 17 12:33:39 EDT 2004


hi,

i want to run the example script 
Insight/Examples/Registration/ImageRegistration3.tcl:

  $ itkwish ImageRegistration3.tcl 
    Error in startup script: invalid command name "itk::create"
        while executing
    "itk::create ImageRegistrationMethodF2 "
        invoked from within
    "set registration       [ itk::create ImageRegistrationMethodF2 ]"
        (file "ImageRegistration3.tcl" line 25)
  $


i tried the following:

  $ itkwish
  % package present itkutils
  1.6
  % namespace eval itk {package require itkutils; info commands}
  ... (a lot of itk-tcl-commands)
  % namespace eval itk {package require itkutils; info commands *create*}
  %

so why is there no "create" command although package "itkutils" is 
present?

but

  % set itkDir "/usr/local/InsightToolkit-1.6.0/Wrapping/CSwig/Tcl/"
  /usr/local/InsightToolkit-1.6.0/Wrapping/CSwig/Tcl/
  % namespace eval itk {source ${itkDir}itkutils.tcl; info commands *create*}
  create createTclCommand createImageViewer2D
  %

how can i trigger the loading of itkutils.tcl?

i also tried to set the TCLLIBPATH variable to 
ITK-Binary/Wrapping/CSwig/Tcl/[Release|Debug], but i have no Release|Debug 
directory:

  $ ls -RF Wrapping/CSwig/Tcl/
  Wrapping/CSwig/Tcl/:
  InstallOnly/  cmake.check_depends  itkTclAppInit.o    pkgIndex.tcl
  Makefile      cmake.depends        itkTclConfigure.h
  
  Wrapping/CSwig/Tcl/InstallOnly:
  Hide/
  
  Wrapping/CSwig/Tcl/InstallOnly/Hide:
  pkgIndex.tcl

the itk was built with

  CMAKE_BUILD_TYPE=

i changed it to

  CMAKE_BUILD_TYPE=Release

and rebuilt itk, but nothing changed.

i would appreciate any help/suggestions,
thanks.

ciao,
	stephan


More information about the Insight-users mailing list