Skip to content
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

For astra and tigre ProjectionOperators, if out is passed it is filled and returned #2059

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

MargaretDuff
Copy link
Member

@MargaretDuff MargaretDuff commented Feb 3, 2025

Changes

For astra and tigre ProjectionOperators, if out is passed it is filled and returned. Previously it just filled. I have also added unit tests to fix this

Testing you performed

Please add any demo scripts to https://github.com/TomographicImaging/CIL-Demos/tree/main/misc

from cil.processors import TransmissionAbsorptionConverter, Slicer
from cil.plugins.tigre import ProjectionOperator
from cil.utilities import dataexample

# Load data
ground_truth = dataexample.SIMULATED_SPHERE_VOLUME.get()

data = dataexample.SIMULATED_CONE_BEAM_DATA.get()

# Consider just a single 2D slice 
data = data.get_slice(vertical='centre')
ground_truth = ground_truth.get_slice(vertical='centre')

absorption = TransmissionAbsorptionConverter()(data)
absorption = Slicer(roi={'angle':(0, -1, 5)})(absorption)

ig = ground_truth.geometry

A = ProjectionOperator(image_geometry=ig, 
                       acquisition_geometry=absorption.geometry)
A_scaled=3*A

image
image
image
image

Also tested on CIL-demos, week 2, SPDHG notebook.

Related issues/links

Closes #2058

Checklist

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the developer guide
  • I have updated the relevant documentation
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'Waiting for review'

Contribution Notes

Please read and adhere to the developer guide and local patterns and conventions.

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CIL (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

@MargaretDuff
Copy link
Member Author

@gfardell - would be grateful for your advice on if I tested everything I needed to. I possibly need to test cpu/gpu projector variations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug using out with scaled Astra and Tigre projection operators.
1 participant