LLNL / LEAP

comprehensive library of 3D transmission Computed Tomography (CT) algorithms with Python and C++ APIs, a PyQt GUI, and fully integrated with PyTorch
https://leapct.readthedocs.io
MIT License
116 stars 12 forks source link

Is there C++ demo with similar functionarity as d01_standard_geometries.py #100

Open winguphehe opened 2 months ago

winguphehe commented 2 months ago

Since the main project is a c++ version, is it possible to implement reconstruction with only c++ code? I found that there is a C++ shared library .dll and corresponding head files in LEAP, but the input data is simply float , it is difficult to find how to handle this kind of memory instead of numpy structure. Dear Kyle Champley, Could you present a c++ version demo like d01_standard_geometries.py please? Thanks a lot.

hws203 commented 2 months ago

@winguphehe I am using native c++ based leapct with my own some c++ function code, the most main functions of leapct class made by c++/cuda, so it is not difficult to convert the c++ version. As you know, numpy is also array buffer of some variable type, and the float * could be also array buffer of float. If you use native c++ version, then you do not need numpy structure, at my case I am using boost array structure instead of numpy.

winguphehe commented 2 months ago

@hws203 could you show some demo code of cone beam CT please? I didn't find an example code to call the leap functions. And, I really don't know whether the storage dimention sequence in C++ is the same as python or not. Could the opencv Mat structure be used instead of boost array?

kylechampley commented 2 months ago

Unfortunately, I do not have a C++ example of how to use the C++ API. I'll create one in the future, but I am busy with other things at this time. Until then, @hws203 is the best person to talk about this because I know he uses the C++ API.

Note that any time you build LEAP it creates a dynamic library (dll), even if you use pip install.

Yes, the volume and CT projection data are just simple float arrays. The layout of the data is described in the technical manual. See Section 4.3.

winguphehe commented 2 months ago

@hws203 Hi, could you share a sample code for cone beam CT in c++, many thanks.

hws203 commented 2 months ago

@winguphehe I am sorry, I cannot share my c++ code for some internal issue.