ITK seems to have already been implemented using MathLink. Watch your processes when you run a
WatershedComponents filter, you can see an
ITK.exe process appear. I'm not too familiar with
MathLink but maybe this very simple starting point can be taken further by people who know how to use
This is a Windows-centric example:
itk = LinkLaunch["C:\\Program Files\\Wolfram Research\\Mathematica\\8.0\\SystemFiles\\\Converters\\Binaries\\Windows\\ITK.exe"]
LinkObject["C:\\Program Files\\Wolfram \Research\\Mathematica\\8.0\\SystemFiles\\Converters\\Binaries\\\Windows\\ITK.exe", 33, 12]
"Image`ITK::filterr = \"`1` generated code `2`: `3`\";"
It would be nice to have the source code of the compiled
MathLink executable. ITK is released under an Apache or BSD license which, I think, means that Wolfram can use the code in a closed source application and not release it as long as they provide a copy of the license.