dkazanc / TomoPhantom

Software to generate 2D/3D/4D analytical phantoms and their Radon transforms (parallel beam) for image processing
https://dkazanc.github.io/TomoPhantom/
Apache License 2.0
116 stars 53 forks source link

utils.c added, python version requires reassembling #2

Closed dkazanc closed 6 years ago

dkazanc commented 6 years ago

I've done some restructuring and also added utils.c to avoid repetition of code (MATLAB version works). Please help to modify phantom3d.pyx accordingly to compile code for python. I guess it should be added somewhere along those lines? cdef extern float buildSino3D_core_single(float *A, int N, int P, float *Th, int AngTot, int CenTypeIn, int Object, float C0, float x0, float y0, float z0, float a, float b, float c, float phi_rot)

paskino commented 6 years ago

Not clear what you need. Do you need to import utils.h?

dkazanc commented 6 years ago

I need to re-compile using phantom3d.pyx which should include "utils" module. I don't think the current state solves the dependency on "utils".

dkazanc commented 6 years ago

actually... i think I should also modify setup.py: the part where ext_modules = cythonize

srikanthnagella commented 6 years ago

you only need to add utils.c file to setup.py for the dependency.

srikanthnagella commented 6 years ago

if you need to add 2d phantom generators then you can create another phantom2d.pyx file similar to phantom3d.pyx

dkazanc commented 6 years ago

great, I'll do it then! Thanks Sri!