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

Refactor and unify reconstruction calls #123

Open
ieivanov opened this issue Jan 17, 2024 · 0 comments
Open

Refactor and unify reconstruction calls #123

ieivanov opened this issue Jan 17, 2024 · 0 comments
Assignees

Comments

@ieivanov
Copy link
Collaborator

Unify reconstruction functions (e.g. process_single_position and apply_transform_to_zyx_and_save) to work on CZYX datasets, rather than ZYX datasets - I think this is preferred since, for example, birefringence reconstruction requires 4-5 input channels. Similar logic can maybe be extended to registration, which requires fixed and moving volumes, or training for virtual staining which requires paired phase and fluorescence images

We can modify the function signature to accept a "processing unit" and then we'll iterate over these processing units:

for processing_unit in processing_units:
    func(data[processing_unit])

The processing units can be as follows:

processing_units = [
    (slice(0, 1), slice(None), slice(None), slice(None)),
    (slice(1, 2), slice(None), slice(None), slice(None)),
    ...
]

for looping over XYZ volumes in different channels

processing_units = [
    (slice(0, 1), slice(0, 1), slice(None), slice(None)),
    (slice(0, 1), slice(1, 2), slice(None), slice(None)),
    ...
]

for looping over individual XY slices

or

processing_units = [
    (slice(0, 5), slice(None), slice(None), slice(None)),
]

for processing a CZYX array with 5 channels.

Currently process_single_position and apply_transform_to_zyx_and_save and duplicated in shrimpy and recorder and can go out of sync. These function are largely utilities to apply a user-specified functions to iohub Positions. We can consider moving these two functions to iohub/utils.

@talonchandler @edyoshikun @ziw-liu let's kick off this discussion with an in-person meeting.

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

No branches or pull requests

4 participants