Where FloatImageType defined in \include\plastimatch\itk_image_type.h as:
typedef itk::Image < float, 3 > FloatImageType;
My Question, is how do I wrap this PLMGamma class for use in c# ? I am ok to dabble with Swig or manually writing c++ wrapper functions but I need some help please.
FloatImageType::Pointer is an alias for itk::SmartPointer<FloatImageType>. Smart pointers are problematic for wrapping, that’s why we avoid them in public interfaces in ITK. Passing images via plain pointers (FloatImageType *) should be quite easy to wrap with SWIG.
Do note that ITK currently only properly wraps for Python. C# wrappings were broken for years, before being removed recently (this year or the last). So you would need to wrap all the things you want exposed in C#, including any ITK class found in your public interface.
thanks for your reply. I was wondering if you can show how to wrap (FloatImageType *) as you suggest. The only public interface requirement I have is that itk::Image < float, 3 > FloatImageType be available in the dot net side.
i.e, I want to be able to create a new FloatImageType object in c# .
I don’t know whether there would be anything more to it than following SWIG documentation for wrapping a custom class. You would probably also have to wrap its parent classes (ImageBase, LightObject etc).
@G_Tom a viable approach to C# wrappings for plastimatch may be itk-wasm. Like the binding generation for JavaScript, Python, and Java, C# wrapping binding generation could be added as outlined in this issue.