Skip to content

Conversation

hrobarts
Copy link
Contributor

Changes

Code to reduce the reconstruction volume

  • Performs a quick binned reconstruction and applies a circular mask (maybe this should be optional)
  • If auto=True, tries to automatically find the limits for the reduced reconstruction
  • Set a threshold between data and background or use an Otsu filter
  • Plots the maximum pixel intensity along each direction, finds pixels above the threshold, identifies large connected components and calculates limits around them
  • Can apply a buffer around the automatically calculated limits
  • If manual_limits are set these over-ride the automatically calculated limits

vs = VolumeShrinker()
ig_reduced = vs.run(data, auto=True)

image

ig_reduced = vs.run(data, auto=True, buffer=10)
image

Use manual limits in specified direction
image

Don't reduce in specified directions
vs = VolumeShrinker()
ig_reduced = vs.run(data, auto=True, buffer=10, manual_limits={'horizontal_x':None, 'horizontal_y':None})
image

If logging is enabled, plot a histogram with the threshold and reduced box
image

Testing you performed

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

Related issues/links

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

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.

1 participant