AllenNeuralDynamics / aind-smartspim-stitch

Stitching and fusion pipeline in the cloud
MIT License
3 stars 1 forks source link

Fix OME-Zarr chunk size issue for stitching module #4

Closed camilolaiton closed 1 year ago

miketaormina commented 1 year ago

For discussion, is this the proposed solution outline:

Solution outline

  1. Pystripe outputs single plane Tiffs (maybe zarr in the future) that conform to TeraStitcher directory structure.
  2. TeraStitcher ingests a specific (parameterized) channel from a multi-channel data set and calculates offsets.
  3. Found merging parameters are broadcast to the other spectral channels in the data set.
  4. Once the Merge step of TeraStitcher workflow, --sliceheight, --slicewidth, and slicedepth are set to the Y, X, and Z chunk size desired and --volout_plugin is set to TiledXY|3Dseries (is there a TiledXYZ|3Dseries?).
    • maybe zarr in the future.
  5. code.src.zarr_converter module ingests the resulting folder and writes a Zarr array with a 1:1 correspondence between Zarr chunks and Tiff files.
    • Do we need to edit the AICS-imageio package to allow this, or perhaps not use that package?

Separately, it seems like step 4 and 5 are a convenient place to create and store the image pyramid levels using TeraStitcher's --resolutions flag. Do we think this should be concurrent work, or a separate issue?

Is there a convenient size of data set that is useful for testing? I can have Erica acquire a 2 x 2 tiled data set in the middle of a brain, which should cover several chunks in x, y, and z. Alternatively, we could make a synthetic data set for that.

camilolaiton commented 1 year ago

Hello Mike,

I agree with the solution outline. In regards to the open questions/suggestions:

miketaormina commented 1 year ago

I agree with you point about using the xarray-multiscale -- we should keep as much control over algorithms as we can.

John is acquiring a bunch of 1 x 2 tiled data sets right now as part of a photo-bleaching experiment. Maybe one of these would be good enough? They might be kind of large in the z direction though, so maybe we should acquire one specifically for this purpose.

sharmishtaa commented 1 year ago

Switch stitching parameters, increase search region and try other algorithms in terastitcher

camilolaiton commented 1 year ago

Closing issue with #9