Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling cpp source code as standalone shared library #4

Open
mscipio opened this issue Apr 7, 2020 · 1 comment
Open

Compiling cpp source code as standalone shared library #4

mscipio opened this issue Apr 7, 2020 · 1 comment
Labels
question Further information is requested

Comments

@mscipio
Copy link

mscipio commented Apr 7, 2020

Hi!
It's kind of a weird question, I guess, but I will try, nontheless.
This software is really nice, I just discovered it between the abstracts for ISBI 2020.

I am also in the "job" of developing PET reconstruction softwares, but in Python, not in Matlab (you can check https://github.com/TomographyLab/TomoLab, if you are interested). I would really like to test the projectors code you wrote for OMEGA (the one to be compiled as a mex file) within my library, to compare it with the one I am currently using.

The problem is that I am not really familiar with writing source code for Mex files, and I don't know if it is unrealistic to think to separate the C++ code from the Mex wrapper. I mean, avoiding including mex.h, etc...

Two questions:

  • would you be OK with me trying such an 'improper' use of your code?
  • do you have any idea how hard would it be to adapt the source of the mex files, so that it could be compiled as a shared library, with no need for Matlab to run these functions?

Thanks a lot for the attention.

@villekf
Copy link
Owner

villekf commented Apr 12, 2020

Hi,

Sorry for the slightly late reply.

Regarding your first question, I don't have any objections to it so you're free to try it.

On the second question I'd say that it shouldn't be that hard to make it work without any of the Matlab stuff. Especially if you're only interested in the projectors and not the reconstruction algorithms. The input variables simply need to be given without the use of the mex-interface. Some functions (especially the OpenCL implementations) also take advantage of Matlab structs and cell arrays, but other than that the Matlab part in the mex-files is rather limited. You just need to figure out what each input variable does and how they need to be formatted. This might take some time, but it should certainly be doable and has been something I've also considered.

@villekf villekf added the question Further information is requested label Jun 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants