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
112 stars 11 forks source link

I want specific descriptions about some sub-functions on the tomographicModels #23

Closed cloner99 closed 7 months ago

cloner99 commented 8 months ago

Hi!

I'm very thrilled using the LEAP CT tool, adopting things i used on MATLAB.

Especially, the FDK runtime reconstructing my own real-data from C-arm felt brilliant. Such fast and correct reconstruction was applied.

However, I have two problems using this tool on my research project.

First, for using the function " leapct.load_param(param_fn) " I can't guess what form of data would be appropriate for the "param_fn". I want easily allocating the CT geometry parameters by using this function.

Second, I an really looking ahead for the projection tool on LEAP.

The example code shows that syntax like " f = leapct.load_volume(img_fn) " can help loading volumes for forward projection

but i also can't find the data form of img_fn . I tried really hard searching for guides, and leaked for the source code, but i have no idea about it. Please give me a guide and an example of the img_fn data.

Thank you.

kylechampley commented 8 months ago

Hello.

The function leapct.load_param(...) is just for loading CT geometry and CT volume parameters from a file with a specific syntax. You don't need to use such a file; we just provide this as an option that is convenient sometimes. Anyway, I added an example parameter file to the repo so you can see what it looks like. You can find it here

Have you looked through the demo scripts here?

There are a lot of examples here that show you how to specify the CT geometry and CT volume parameters.

Now let's talk about the leapct.load_volume(...) function. Again, you don't need to use this function to use LEAP. It just loads volume data from a few commonly used file formats. You are definitely welcome to use your own data loading methods. The projection and volume data numpy arrays are assumed to be something like the following.

projection data

g = np.ascontiguousarray(np.zeros((numAngles,numRows,numCols),dtype=np.float32), dtype=np.float32)

volume data

f = np.ascontiguousarray(np.zeros((numZ, numY, numX),dtype=np.float32), dtype=np.float32)

Let me know if you have any further questions.

kylechampley commented 7 months ago

Did this resolve your issue?

cloner99 commented 7 months ago

Absolutely!

Now I can efficiently work about this projector tool!

Really busy throwing away Matlab, adopting every codes using LEAP...

Thanks a lot!