-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1-developing-practical-1' into main
- Loading branch information
Showing
8 changed files
with
2,030 additions
and
1 deletion.
There are no files selected for viewing
257 changes: 257 additions & 0 deletions
257
day_1/practical_1/3D Nucleus Segmentation with Cellpose.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
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,13 @@ | ||
name: cellpose_env | ||
channels: | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- tifffile | ||
- matplotlib | ||
- numpy | ||
- scikit-image | ||
- pip: | ||
- cellpose |
Binary file added
BIN
+11.1 KB
day_1/practical_1/custom/__pycache__/tenx_method_nb_helper_functions.cpython-39.pyc
Binary file not shown.
380 changes: 380 additions & 0 deletions
380
day_1/practical_1/custom/tenx_method_nb_helper_functions.py
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 @@ | ||
#!/usr/bin/env python | ||
|
||
import tifffile | ||
|
||
# Variable 'LEVEL' determines the level to extract. It ranges from 0 (highest | ||
# resolution) to 6 (lowest resolution) for morphology.ome.tif | ||
LEVEL = 2 | ||
|
||
with tifffile.TiffFile('data/xenium_2.0.0_io/morphology.ome.tif') as tif: | ||
image = tif.series[0].levels[LEVEL].asarray() | ||
|
||
tifffile.imwrite( | ||
'level_'+str(LEVEL)+'_morphology.ome.tif', | ||
image, | ||
photometric='minisblack', | ||
dtype='uint16', | ||
tile=(1024, 1024), | ||
compression='JPEG_2000_LOSSY', | ||
metadata={'axes': 'ZYX'}, | ||
) |
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,8 @@ | ||
#!/usr/bin/env python | ||
|
||
import tifffile | ||
|
||
with tifffile.TiffFile('data/xenium_2.0.0_io/morphology.ome.tif') as tif: | ||
for tag in tif.pages[0].tags.values(): | ||
if tag.name == "ImageDescription": | ||
print(tag.name+":", tag.value) |
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
Large diffs are not rendered by default.
Oops, something went wrong.