I am currently working on a project to import a Matlab program to python for integration into ImageJ as a plugin. The program contains Mex files and the source code was written in C++. Is there a way to call the C++ functions without having to rewrite them in python. Thanks!!!
If you can build your program as a shared library, then you can use the ctypes foreign-function interface to call your functions.
This is often less work (and less complex) than wrapping the functions with Cython or writing your own C-API extension, but it is also more limited in what you can do. Therefore, I recommend starting with ctypes, and moving up to Cython if you find that ctypes doesn't suit your needs.
However, for simple libraries, ctypes will do just fine (I use it a lot).
Call C/C++ code from Python