[cable] Do Tcl-wrapped classes have to appear in itk namespace?

Parag Chandra Parag_Chandra at med.unc.edu
Fri Feb 13 13:29:20 EST 2004


Hi,

 

I spent yesterday playing around with Cable, trying to wrap my own
ITK-derived classes in Tcl. I am using v1.2 of ITK, so it is in fact Cable
that I am using, and not Cswig. I studied the structure of ITK's Wrapping
directory and followed its example, and I am now at the point where I have
successfully wrapped one of my classes, which is in another namespace called
'aks'. The wrapping is in a DLL on Windows, and to test it, I started up the
itktcl interpreter and did 'load c:/some_path_to/AKSProcessingTcl.dll". The
library loads successfully; however, trying the simple command 'set filter
[itk::create Normalize01ImageFilterD2]' results in 

 

"invalid command name "itk::Normalize01ImageFilterD2""

 

If I go back to the source file that I created to wrap my class and put my
class in the _cable_::wrappers::itk namespace, instead of
_cable_::wrappers::aks, recompile, and reload the DLL, then the command
above works: filter points to an instance of my custom class. So my question
is, do all classes wrapped via ITK_WRAP_TCL need to be in the itk namespace?
Is there a way I can create my own aks::create command to mirror the
construction of itk objects provided by itk::create? Does Cswig provide a
different mechanism that will allow me to keep my classes in their own
namespace?

 

Thanks for a great tool; it shows tremendous potential.

 

-Parag Chandra

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cable/attachments/20040213/958bcdbd/attachment.html>


More information about the cable mailing list