<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
{font-family:"\@MS Mincho";
panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{font-family:Arial;
color:windowtext;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi,</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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 </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>“invalid command name
"itk::Normalize01ImageFilterD2"”</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>If I go back to the source file that I created to wrap my
class and put my class in the _<i><span style='font-style:italic'>cable</span></i>_::wrappers::itk
namespace, instead of _<i><span style='font-style:italic'>cable</span></i>_::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?</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks for a great tool; it shows tremendous potential.</span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'> </span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>-</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'>Parag Chandra</span></font></p>
</div>
</body>
</html>