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

Add multi-source source #764

Merged
merged 6 commits into from
Jan 28, 2022
Merged

Add multi-source source #764

merged 6 commits into from
Jan 28, 2022

Conversation

manthey
Copy link
Member

@manthey manthey commented Jan 26, 2022

This adds a source that can be composited from other sources.

This is still a work-in-progress, needing some features and tests. It should work except for crop and any transforms where s12 or 21 is non-zero or s11 or s22 is less than zero.

There are several ways that the same set of files can be specified. For instance, given a set of eight files named test_orient1.tif, test_orient2.tif, ..., test_orient8.tif, to make a source that uses all of these files, the following yaml files are equivalent:

  • (1) explicitly specify each frame and a z value
sources:
  - path: ./test_orient1.tif
    z: 0
  - path: ./test_orient2.tif
    z: 1
  - path: ./test_orient3.tif
    z: 2
  - path: ./test_orient4.tif
    z: 3
  - path: ./test_orient5.tif
    z: 4
  - path: ./test_orient6.tif
    z: 5
  - path: ./test_orient7.tif
    z: 6
  - path: ./test_orient8.tif
    z: 7
  • (2) use a regular expression to select frames (they are added alphabetically by c-sort order) and specify a step value
sources:
  - path: .
    pathPattern: 'test_orient[1-8]\.tif'
    zStep: 1
  • (3) use a named regular expression to populate the z value. If the name ends in 1, it is assumed to be 1-indexed rather than 0-indexed.
sources:
  - path: .
    pathPattern: 'test_orient(?P<z1>[1-8])\.tif'

@manthey manthey force-pushed the multi-source branch 3 times, most recently from 6747982 to e0912e3 Compare January 27, 2022 13:58
@manthey manthey marked this pull request as ready for review January 28, 2022 14:48
@manthey manthey force-pushed the multi-source branch 3 times, most recently from 34a4a33 to 37b9382 Compare January 28, 2022 16:55
@manthey
Copy link
Member Author

manthey commented Jan 28, 2022

Merging this as it works in basic testing and to make it easier to use in other projects.

@manthey manthey merged commit f69b1ef into master Jan 28, 2022
@manthey manthey deleted the multi-source branch January 28, 2022 17:47
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