-
Notifications
You must be signed in to change notification settings - Fork 106
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
Dose ConeBeamGeometry support helical geometry with cylindrical detector? #1602
Comments
Hi @wangwei-cmd Which version of The latest release is rather old, and many features are therefore not available in it. You can install it directly from git instead; see the documentation for instructions on who to do it. |
Hello, @aringh I install odl from git. |
Ok. I ran the code you posted and did not get an error. As a reference, I just pulled the latest commits from the Do you have multiple python environments? If so, could you run |
Thank you. @aringh. My odl.version is '1.0.0.dev0'. After careful checking, I found that I didn't provide the codes causing the error. I'm sorry for this mistake. The following is my complete codes: import numpy as np reco_space = odl.uniform_discr(min_pt=[-63.5, -63.5, 0], max_pt=[63.5, 63.5, 14], The last command 'proj_data = ray_trafo(phantom)' causes the error : |
Indeed, checking the code it seems like only flat detectors are implemented for cone beam with Astra. However, it was a long time ago since I worked with this. Could @kohr-h, @adler-j, @JevgenijaAksjonova, or @ozanoktem just confirm if this is correct? |
Support in ODL for representing data acquired on curved detectors was added with the approval of pull request #1478. There is however currently no freely available back-end that can perform projection/backprojection natively in such a configuration. Some of our projects use proprietary back-ends provided by industrial partners for this purpose. One option is to define a data-to-data mapping that performs interpolation in order to transform tomographic data acquired on curved detectors to corresponding data on flat detectors, see issue #1560 and pull request #1578. In a collaboration with developers of ASTRA at CWI and University of Cambridge, we are planning preparing for adding native support in ASTRA for tomographic cone-beam data with curved detectors. But that will most likely not deliver any usable solution before late spring 2021. |
I am interested to know if you have any updates on this matter? I still get similar errors which I guess the detectors with curvature are not supported yet, am I right? |
ODL offers data structures to represent tomographic data collected using cylindrical and spherical detectors. However, if you want to avoid interpolation in data space, working with such data requires a back-end that can handle curved detectors. Now, the back-end is not part of ODL itself, so your queries about support for curved detectors are better directed to the developers of the back-end. The current status is that there are proprietary back-end for tomographic forward and back-projection that supports curved detectors, but none that is open source. As already indicated, there is ongoing work in implementing support for cylindrical detectors in ASTRA. I expect that this will be in place this year. |
Thank you for responding so quickly. So, if I want to deal with curved detectors, I should use the ODL function to transfer data to data representation with the flat detector, and then utilize flat detectors for the rest of the implementations, am I correct? If that's the case, could you please tell me the functions I may use to do so? |
Unless you get hold of a back-end that can handle curved detectors (there is currently none that is open source), you need to map tomographic data acquired on a curved detector to one on a flat detector by some interpolation scheme. I am not sure if there are examples of this in the "examples" directory, but I know that @JevgenijaAksjonova has done this. |
I want to create a helical geometry with cylindrical detector. Here is my code:
reco_space = odl.uniform_discr(min_pt=[-63.5, -63.5, 0], max_pt=[63.5, 63.5, 14], shape=[128, 128, 15], dtype='float32')
angle_partition = odl.uniform_partition(0, 2 * 360 * np.pi/180, 721)
detector_partition = odl.uniform_partition([-0.4796, -6], [0.4796, 6], [219, 13])
geometry = odl.tomo.ConeBeamGeometry(angle_partition, detector_partition, src_radius=200, det_radius=200,
det_curvature_radius=(400, None), pitch=2 * 2 * np.pi)
ray_trafo = odl.tomo.RayTransform(reco_space, geometry, impl='astra_cuda')
But pycharm raises an error:
NotImplementedError: unknown ASTRA geometry type ConeBeamGeometry(
uniform_partition(0.0, 12.57, 721),
uniform_partition([-0.4796, -6. ], [ 0.4796, 6. ], (219, 13)),
src_radius=200.0,
det_radius=200.0,
pitch=12.566371
)
The text was updated successfully, but these errors were encountered: