-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make objects for plate and well acquisitions (#59)
Introduce high content screening plate data structures for Cell Voyager and Molecular Devices systems. The `ConvertToNGFFPlate` converter consumes these plates and writes out ome-zarr NGFF plates. The converter uses dask to stitch the well-images and supports re-chunking and binning. --------- Co-authored-by: Jan Eglinger <jan.eglinger@fmi.ch> Co-authored-by: Tim-Oliver Buchholz <tim-oliver.buchholz@fmi.ch>
- Loading branch information
Showing
61 changed files
with
3,822 additions
and
4,814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import shutil | ||
from pathlib import Path | ||
|
||
from faim_hcs.hcs.acquisition import TileAlignmentOptions | ||
from faim_hcs.hcs.cellvoyager import StackAcquisition | ||
from faim_hcs.hcs.converter import ConvertToNGFFPlate, NGFFPlate | ||
from faim_hcs.hcs.plate import PlateLayout | ||
from faim_hcs.stitching import stitching_utils | ||
|
||
|
||
def main(): | ||
# Remove existing zarr. | ||
shutil.rmtree("cv-stack.zarr", ignore_errors=True) | ||
|
||
# Parse CV plate acquisition. | ||
plate = StackAcquisition( | ||
acquisition_dir=Path(__file__).parent.parent | ||
/ "resources" | ||
/ "CV8000" | ||
/ "CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack_20230918_135839" | ||
/ "CV8000-Minimal-DataSet-2C-3W-4S-FP2-stack", | ||
alignment=TileAlignmentOptions.GRID, | ||
) | ||
|
||
# Create converter. | ||
converter = ConvertToNGFFPlate( | ||
ngff_plate=NGFFPlate( | ||
root_dir=".", | ||
name="cv-stack", | ||
layout=PlateLayout.I384, | ||
order_name="order", | ||
barcode="barcode", | ||
), | ||
yx_binning=2, | ||
dask_chunk_size_factor=2, | ||
warp_func=stitching_utils.translate_tiles_2d, | ||
fuse_func=stitching_utils.fuse_mean, | ||
) | ||
|
||
# Run conversion. | ||
converter.run( | ||
plate_acquisition=plate, | ||
well_sub_group="0", | ||
chunks=(2, 1000, 1000), | ||
max_layer=2, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
Oops, something went wrong.