Closed amirhossein-saedpanah closed 3 years ago
Hello @amirhossein-saedpanah, there is an example using SPDHG for hyperspectral CT in 4D volume (3D+spectral energy) here. We restrict the number of energy channels and vertical slices but the SPDHG algorithm runs for the whole 4D volume. You can find the results for this study here. SPDHG depends on the sampling method as well as the number of epochs and subsets that you use. Is it possible to share with us a small script? Also, you can check if a simple FDK works and you do not have any contrast issues.
Many thanks. well, I use your Demos and Walnut raw data, you can see my script and results in the attached file. test.pdf I want to use SPDHG to remove artifacts caused by under-sampling and reducing experimental time.
best regards, Amirhossein
I think for iterative methods you'd struggle with a single slice for cone-beam data. The data that contribute to that slice of voxels will span multiple rows in the detector, all of which have will have contributions to other slices too. So you can't just forward project a single slice and look at the residuals to the dataset. Parallel-beam datasets have the advantage here that for ideal geometry you can reconstruct a slice from data in a single row of pixels that don't have contributions from other slices.
If you are having trouble with the memory use then for cone-beam data you could split the dataset at the centre line as the top and bottom halves are independent. But this might rely on your system being fairly well aligned.
Otherwise SPDHG already allows you to subset the data, with our implementation you go as low as a subset per projection, which should help keep the memory use lower than our other algorithms.
Unfortunately iterative methods do generally have a much larger memory footprint then FBP methods. Our memory use in CIL isn't ideal at the moment, but this is something we're working on reducing. Knowing which algorithms, functions and operators are the most useful for our users can help us target this. So the more we know about your use case the more we can help.
Thank you @amirhossein-saedpanah. As @gfardell pointed out the problem is with the geometry of a single-slice in cone beam. As you commented in the code the issue is with this line
ig.voxel_num_z = 1
ig.center_z = -50* ig.voxel_size_z# if we put it zero everything is ok
In case, you want to reconstruct the central slice, you can do
# Extract vertical slice
data2D = data3D.get_slice(vertical='centre')
However, SPDHG can be very efficient (compared to PDHG) with large 3D datasets. So you can directly apply it to the whole 3D volume. You can of course crop it and not use all the projections angles, as you do it, to reduce computational time.
Yes, I've try full 3D reconstruction and the results are perfect,
Many thanks for clearing the origin of the problem for me. "''' The data that contribute to that slice of voxels will span multiple rows in the detector, all of which have will have contributions to other slices too. So you can't just forward project a single slice and look at the residuals to the dataset"'''
best regards, Amirhossein
Dear all, I'm trying to use SPDGH to reconstruct 3D cone-beam geometry and non-central slice. to this end, I'm using ROI to limit our Image geometry to a single slice in a non-central position but when we do the reconstruction the intensity and contrast of the image are very low. Please let me know how we could use SPDGH for the full reconstruction of 3D cone beam data.
Thanks in advance