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

Plate multiscales #29

Merged
merged 10 commits into from
Oct 21, 2020
Merged

Plate multiscales #29

merged 10 commits into from
Oct 21, 2020

Conversation

will-moore
Copy link
Member

@will-moore will-moore commented Oct 20, 2020

On top of #28.

Adds multiresolutions for each Image, scaling each 2D plane down by a factor of 2, until smaller than 96 on longest side.

NB: this doesn't use ome-zarr-py to do the scaling (but uses the same underlying cv2 method) because we're scaling a 2D plane each time, not 5D.

cc @sbesson, @dominikl, @joshmoore

TODO:

  • Add arguments to allow you to turn this on/off and to choose target size (and to choose scaling method?)

@joshmoore
Copy link
Member

With the additional commits, ome/ome-zarr-py#56 shows:

ome_zarr info 1.zarr/
/private/tmp/1.zarr [zgroup]
 - metadata
   - Plate
 - data
/private/tmp/1.zarr/PlateAcquisition Name 0/A/1/Field_1 [zgroup]
 - metadata
   - Multiscales
   - OMERO
 - data
   - (1, 1, 1, 512, 512)
   - (1, 1, 1, 256, 256)
   - (1, 1, 1, 128, 128)
   - (1, 1, 1, 64, 64)

@joshmoore
Copy link
Member

@dominikl : do you want to take care of the linting failure in your follow up PR?

@joshmoore
Copy link
Member

Got an "ok" elsewhere. Merging to be fixed in the follow-up.

@joshmoore joshmoore merged commit c63f790 into ome:master Oct 21, 2020
@sbesson
Copy link
Member

sbesson commented Oct 21, 2020

4d7850d was tested against the first illumination corrected plate of idr0033 using the following Docker pipeline

FROM centos:7

RUN yum install -y git python3 fontconfig

RUN useradd -ms /bin/bash converter
USER converter

RUN python3 -m venv /tmp/venv && /tmp/venv/bin/pip install -U pip wheel && /tmp/venv/bin/pip install https://github.com/ome/zeroc-ice-py-centos7/releases/download/0.2.1/zeroc_ice-3.6.5-cp36-cp36m-linux_x86_64.whl
RUN /tmp/venv/bin/pip install ome-zarr scikit-image omero-py
RUN /tmp/venv/bin/pip install git+https://github.com/will-moore/omero-cli-zarr@plate_multiscales

RUN /tmp/venv/bin/omero login [email protected] -w public
ENTRYPOINT ["/tmp/venv/bin/omero", "zarr", "--output", "/data/41744_illum_corrected/", "export", "Plate:5966"]

It should be straightforward to adjust the pip install command to consume the master branch/any branch and reconvert the data including to include the omero metadata. #30 should simplify the installation step but is not a requirement. /cc @will-moore

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.

4 participants