Skip to content

Commit cae555d

Browse files
authored
Merge pull request #4 from fercer/dev-content
Development content
2 parents 01cfc3a + 3e49b47 commit cae555d

File tree

4 files changed

+172
-76
lines changed

4 files changed

+172
-76
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,22 @@ Install the following packages in the newly created environment.
2424
```
2525
conda activate scale-up
2626
27-
conda install -c conda-forge "cellpose>=3.0,<4.0" tifffile=2025.6.11 "zarr>=2.0,<3.0" dask=2025.5.1 imagecodecs=2025.3.30
27+
conda install -c conda-forge "cellpose>=3.0,<4.0" tifffile=2025.6.11 "zarr>=2.0,<3.0" dask=2025.5.1 distributed=2025.5.1 dask-image=2024.5.3 imagecodecs=2025.3.30
2828
```
2929

30-
We might need to open some image files that are compressed using `JPEG2000`, to do that we'll use `imagecodecs` to have access to this compression algorithm.
30+
We'll open some image files that are compressed using `JPEG2000`, so we need `imagecodecs` to have access to this compression algorithm.
3131

32-
Additionally, install Jupyterlab to follow the notebooks.
32+
Additionally, install Jupyterlab to follow the notebooks, and its Dask extension.
3333

3434
```
35-
conda activate scale-up
36-
37-
conda install -c conda-forge jupyterlab=4.4.3
35+
conda install -c conda-forge jupyterlab=4.4.3 dask-labextension=7.0.0
3836
```
3937

4038
## A test image
4139

4240
We'll work with big microscopy images. An example of that kind of image can be found [here](https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1.svs).
4341
So it is a good idea to have it downloaded as well.
42+
43+
A crop of that image can be found [here](https://drive.google.com/file/d/17owNcq_Or6aBAyUVE33fyHSS0VvKuHSw/view?usp=sharing), along with its `Zarr` version [here](https://drive.google.com/file/d/1BmNxOrO3vOFPR-PCnV00DYgFsD1sDu47/view?usp=sharing).
44+
45+
A smaller example image can be found [here](https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1-Small-Region.svs), and its corresponding `Zarr` version is [here](https://drive.google.com/file/d/1MifgafB5mhVAvqjzEAAR_zQajAU5Dcya/view?usp=drive_link).

notebooks/Zarr_and_Dask_for_large-scale_imaging-Part-1.ipynb

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@
605605
},
606606
"outputs": [],
607607
"source": [
608-
"z_grp = tifffile.imread(\"CMU-1.svs\", aszarr=True)\n",
608+
"z_grp = tifffile.imread(r\"C:\\Users\\Public\\Documents\\WSI_example\\CMU-1.svs\", aszarr=True)\n",
609609
"da_arr = da.from_zarr(z_grp, component=\"0\")"
610610
]
611611
},
@@ -701,7 +701,7 @@
701701
},
702702
"outputs": [],
703703
"source": [
704-
"da_sel = da_arr[10000:10000 + 2048, 10000:10000 + 2048]"
704+
"da_sel = da_arr[16_000:16_000 + 2048, 8_000:8_000 + 2048]"
705705
]
706706
},
707707
{
@@ -713,15 +713,6 @@
713713
"da_sel"
714714
]
715715
},
716-
{
717-
"cell_type": "code",
718-
"execution_count": null,
719-
"metadata": {},
720-
"outputs": [],
721-
"source": [
722-
"da_sel.compute()"
723-
]
724-
},
725716
{
726717
"cell_type": "markdown",
727718
"metadata": {
@@ -803,6 +794,15 @@
803794
"source": [
804795
"plt.imshow(arr_nuclei, cmap=\"gray\")"
805796
]
797+
},
798+
{
799+
"cell_type": "code",
800+
"execution_count": null,
801+
"metadata": {},
802+
"outputs": [],
803+
"source": [
804+
"plt.imshow(arr_nuclei[500:750, 250:500], cmap=\"gray\")"
805+
]
806806
}
807807
],
808808
"metadata": {
@@ -811,7 +811,7 @@
811811
"provenance": []
812812
},
813813
"kernelspec": {
814-
"display_name": "Python 3 (ipykernel)",
814+
"display_name": "scale-up",
815815
"language": "python",
816816
"name": "python3"
817817
},

0 commit comments

Comments
 (0)