Skip to content

Per-projection geometry cone3D_Flex - #2039

Merged
gfardell merged 55 commits into
TomographicImaging:masterfrom
gfardell:non_standard_geometry_v2
Aug 7, 2025
Merged

Per-projection geometry cone3D_Flex#2039
gfardell merged 55 commits into
TomographicImaging:masterfrom
gfardell:non_standard_geometry_v2

Conversation

@gfardell

@gfardell gfardell commented Jan 15, 2025

Copy link
Copy Markdown
Member

Changes

This is adding per-projection geometry.

Building on @effepivi's work in #1850

There are many CIL features that aren't implemented for this geometry in this PR, but will be in the future. The main change is a new geometry typle Cone3D_Flex with dimension labels 'channel' 'projection' 'vertical' 'horizontal'. This PR adds the CIL API for Cone3D_Flex and enables the astra projectors and FDK to run on this geometry type.

Tigre support will be added as a followup PR.

The main changes are:

Wrappers/Python/cil/framework/acquisition_geometry.py

  1. Adds a cone3D_Flex acquisition data type
  2. Adds factory create_Cone3D_Flex method to create datatype
  3. Updates some behaviour of acquisition geometry members/methods to account for it
  4. Updates to docstrings of each AcquisitionGeometry factory for consistency.
  5. Updates get_slice for either set of dimension labels

Wrappers/Python/cil/framework/labels.py

  1. Adds cone_flex to the AcquisitionType labels
  2. Adds projection as the dimension label for ConeFlex in place of angle

Wrappers/Python/cil/plugins/astra/utilities/convert_geometry_to_astra_vec_3D.py

  1. Updates to set up astra geometry from cone flex

Wrappers/Python/cil/io

  1. NexusDataWriter NotImplemented

Wrappers/Python/cil/utilities/display.py

  1. Added new display method for cone flex data show_system_positions
  2. Show2D can be used when slicing on projections

Wrappers/Python/cil/processors

  1. Slicer allows slicing in projection direction only
  2. Binner/Padder raise NotImplemented
  3. CofR corrector raises error, not supported as no rotation axis defined.
  4. FluxNormaliser NotImplemented
  5. Paganin NotImplemented due to geometry.magnification

Testing you performed

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

Notebook here demonstrates use:
https://github.com/TomographicImaging/CIL-Demos/blob/flex_geometry/demos/4_Deep_Dives/07_flexible_geometry.ipynb
Small data set can be emailed on request.

Unit tests added for CIL api, and astra PO and FBP with circular geometry described as flex.

Related issues/links

closes #1848
closes #1849

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

@gfardell gfardell changed the title Non standard geometry v2 Per-projection geometry cone3D_souv Jan 15, 2025
@gfardell gfardell mentioned this pull request Jan 15, 2025
7 tasks
@gfardell
gfardell force-pushed the non_standard_geometry_v2 branch 2 times, most recently from 1427378 to b2d91af Compare February 17, 2025 14:51
effepivi and others added 20 commits June 24, 2025 12:42
… a new AcquisitionGeometry called CONE_SOUV = 'cone_souv'. It is impossible to set_angles on this new geometry.
…e position, ii) the imager centre, iii) the imager x-direction, and iv) the imager y-direction for each projection.
…c strings and ag souv aware default behaviour.
@gfardell
gfardell force-pushed the non_standard_geometry_v2 branch from 3d7a0dd to 1138d2f Compare June 24, 2025 12:45
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
gfardell and others added 2 commits August 4, 2025 14:59
Co-authored-by: Hannah Robarts <[email protected]>
Co-authored-by: Edoardo Pasca <[email protected]>
Signed-off-by: Gemma Fardell <[email protected]>
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_geometry.py Outdated
@gfardell

gfardell commented Aug 5, 2025

Copy link
Copy Markdown
Member Author

The output from show_system_positions. I think we need to change line styles to dots/dashes to make it more accessible and to ensure overlapping lines show.

image

@hrobarts hrobarts left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@paskino and I reviewed the tests, they look very comprehensive - we just had a few comments.

Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py
Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py
Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py
Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py Outdated
Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py Outdated
Comment thread Wrappers/Python/test/test_AcquisitionGeometry.py
Comment thread Wrappers/Python/test/test_subset.py
@gfardell
gfardell requested review from hrobarts and paskino August 7, 2025 12:51

@paskino paskino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After long review it's looking great!

@gfardell
gfardell merged commit eea4c50 into TomographicImaging:master Aug 7, 2025
11 checks passed
@gfardell
gfardell deleted the non_standard_geometry_v2 branch August 7, 2025 14:13
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.

Use the Astra backend to reconstruct per-projection geometries set the cone-beam geometry to per-projection

5 participants