[Insight-developers] CableSwig vs Swig type representation
Charl P. Botha
c.p.botha at ewi.tudelft.nl
09 Mar 2004 11:58:35 +0100
Dear developers,
CableSwig represents an e.g. an unsigned short as "short_unsigned_int",
whereas Swig represents it as "unsigned_int". This means that
ConnectVTKITK can't connect any ITK classes that are templated with this
type (or anything like "unsigend long" for instance).
Last year I made changes to CableSwig.cxx to work around this:
In CableSwig::TemplateName, I added:
ReplaceString(name, "short unsigned int", "unsigned short");
I find that I have to do this again now for "unsigned long" so that
labeled watershed output can be sent to VTK. This means another:
ReplaceString(name, "long unsigned int", "unsigned long");
Personally, I don't find this such a problem, but I was wondering what
any of the wrapping people thought of this. I've searched for ways to
make Swig itself do it differently, but haven't come across anything.
Any other suggestions?
Thanks,
Charl
--
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/