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

Implement 3D connected component analysis #29

Open
wants to merge 37 commits into
base: main
Choose a base branch
from

Conversation

dimitrivlachos
Copy link
Collaborator

This implements 3D connected components analysis into the
Fast FeedbackService, enabling the processing of rotation datasets
while maintaining real-time feedback.

Previously, connected components — spots — were processed per
image, treating each frame as independent 2D data. However, in rotation
datasets, spots extend across multiple images, forming 3D reflections
that require all collected frames to fully resolve. At the same time,
real-time feedback still depends on per-frame 2D calculations.

This update enables both:

  • 2D connected components (2DCC) are computed per frame for real-time
    feedback.
  • 2DCC results are stored and recombined at the end of a sweep for fast
    and efficient 3D analysis.

Changes:

  • Extracted ConnectedComponents into separate files for improved
    modularity, readability and logical grouping.
  • Refactored 2D connected components into an object-oriented structure.
  • Introduced Signal and Reflection objects for data encapsulation.
  • Implemented 3D connected components using precomputed 2D connectivity
    data.
  • Added 3D filtering based on max_peak_centroid_separation and
    min_spot_size_3d
  • Integrated dx2 for writing 3D connected components to a reflection
    table.

The dx2 integration relies on the pending h5_writer branch:
dials/dx2#2

…ap indexing in order to provide a framework for three dimensional connections
…nter management and mutex protection for connected components
@dimitrivlachos dimitrivlachos self-assigned this Jan 30, 2025
@dimitrivlachos dimitrivlachos added the enhancement New feature or request label Jan 30, 2025
@dimitrivlachos dimitrivlachos marked this pull request as ready for review February 3, 2025 09:09
FetchContent_Declare(
dx2
GIT_REPOSITORY https://github.com/dials/dx2
GIT_TAG main
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Other than a review, this is the only thing holding up the PR as I await dials/dx2#2 to be merged so I can tag it explicitly.

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

Successfully merging this pull request may close these issues.

1 participant