-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add opening VSI file activity and corresponding data
- Loading branch information
Showing
27 changed files
with
224 additions
and
40 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
2 changes: 2 additions & 0 deletions
2
_includes/batch_qc_and_exploration/batch_explore_ilastik_TODO_fiji_mobie.md
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,2 @@ | ||
- Open Fiji with the [MoBIE update site installed](https://github.com/mobie/mobie-viewer-fiji?tab=readme-ov-file#install). | ||
- TODO |
5 changes: 5 additions & 0 deletions
5
_includes/batch_qc_and_exploration/batch_explore_ilastik_output.md
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,5 @@ | ||
<h4 id="ilastik_output"><a href="#ilastik_output">Batch explore ilastik output</a></h4> | ||
|
||
This activity demonstrates how to efficiently batch explore output generated with the [ilastik]() software. | ||
|
||
Please [download the example data](TODO). |
17 changes: 17 additions & 0 deletions
17
_includes/batch_qc_and_exploration/batch_explore_objects_table_fiji_mobie.md
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,17 @@ | ||
- Open Fiji with the [MoBIE update site installed](https://github.com/mobie/mobie-viewer-fiji?tab=readme-ov-file#install). | ||
- Open `All_Wells_cells.txt` and identify the columns that contain file names, as those will be needed to open the table with MoBIE | ||
- [ Plugins › MoBIE › Open › Open Table... ] | ||
- Table Path: [ Browse ] to `All_Wells_cells.txt` | ||
- Image Path Column(s): `FileName_DNA, FileName_PLA` | ||
- Labels Path Column(s): `FileName_CellLabels, FileName_PLALabels` | ||
- Data Root Folder: [ Browse ] to data folder | ||
- SpatialCalibration: Does not matter as everything is in pixel units | ||
- Grid: Transformed (Stitched performs better if you have >100 images) | ||
- Click [ OK ] | ||
- The MoBIE UI and BigDataViewer will open allowing you to conveniently browse all data | ||
- Browsing suggestions: | ||
- Cell table: `Color > Color by Column`: `Children_PLA_dots_Count` with `blueWhiteRed` LUT | ||
- This will paint cells red that have a lot of PLA spots | ||
- Image table: `Color > Color by Column`: `Mean [Object Number]` with `blueWhiteRed` LUT | ||
- This will outline images red that have a lot of cells | ||
|
7 changes: 7 additions & 0 deletions
7
_includes/batch_qc_and_exploration/batch_explore_segmented_images.md
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,7 @@ | ||
<h4 id="segmented_images"><a href="#segmented_images">Batch explore segmented images</a></h4> | ||
|
||
This activity will show how to efficiently batch explore potentially many segmented images. | ||
|
||
Please [download the example data](https://github.com/tischi/cellprofiler-practical-NeuBIAS-Lisbon-2017/archive/refs/heads/mobie.zip) (including the CellProfiler pipeline used to create the segmentations). | ||
|
||
After unzipping, the data for this activity can be found in the `batch_qc_practical` sub-folder. |
7 changes: 7 additions & 0 deletions
7
...ch_qc_and_exploration/batch_explore_segmented_images_and_object_measurements.md
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,7 @@ | ||
<h4 id="segmented_images_and_measurements"><a href="#segmented_images_and_measurements">Batch explore segmented images and object measurements</a></h4> | ||
|
||
This activity will show how to efficiently batch explore, potentially many, segmented images and the corresponding object measurements. | ||
|
||
Please [download the example data](https://github.com/tischi/cellprofiler-practical-NeuBIAS-Lisbon-2017/archive/refs/heads/mobie.zip) (including the CellProfiler pipeline used to create the segmentations and object measurements). | ||
|
||
After unzipping, the data for this activity can be found in the `batch_qc_practical` sub-folder. |
13 changes: 13 additions & 0 deletions
13
...xploration/batch_explore_segmented_images_and_object_measurements_fiji_mobie.md
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 @@ | ||
- Open Fiji with the [MoBIE update site installed](https://github.com/mobie/mobie-viewer-fiji?tab=readme-ov-file#install). | ||
- Use MoBIE to inspect segmented nuclei and nuclei measurements | ||
- [ Plugins › MoBIE › Open › Open Image and Labels... ] | ||
- Image URI: [ Browse ] to `Well_1_C0.tif` and then, to open all wells, replace `_1_` by `_.*_` such that it reads `.../Well_.*_C0.tif` | ||
- Label Mask URI: [ Browse ] to `Well_1_nuclei_labels.tif` and, as above, replace `_1_` by `_.*_` | ||
- Label Mask Table URI: [ Browse ] to `Well_1_nuclei.txt` and, as above, replace `_1_` by `_.*_` | ||
- SpatialCalibration: Does not matter here, because the images are only in pixel units anyway | ||
- Grid: Transformed (Stitched performs better if you have >100 images) | ||
- Click [ OK ] | ||
- The MoBIE UI and BigDataViewer will open allowing you to conveniently browse all data | ||
- Browsing suggestions: | ||
- Sort the nuclei table by `AreaShape_Area` and browse to the largest and smallest nuclei, as those are likely representing segmentation errors | ||
- In the table, use "Color by Column", select a measurement and color it using the blue-white-red LUT |
18 changes: 18 additions & 0 deletions
18
_includes/batch_qc_and_exploration/batch_explore_segmented_images_fiji_mobie.md
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,18 @@ | ||
- Open Fiji with the [MoBIE update site installed](https://github.com/mobie/mobie-viewer-fiji?tab=readme-ov-file#install). | ||
- Open `Well_1_C0.tif` and `Well_1_nuclei_labels.tif` in Fiji | ||
- Optional: Change the LUT for the labels to `glasbey_inverted` | ||
- Check for segmentation errors | ||
- Appreciate that manually inspecting all nuclei segmentations like this would be tedious | ||
- Close the two images in Fiji | ||
- Now use MoBIE to open all images and segmentations | ||
- [ Plugins › MoBIE › Open › Open Image and Labels... ] | ||
- Image URI: [ Browse ] to `Well_1_C0.tif` and then, to open all wells, replace `_1_` by `_.*_` such that it reads `.../Well_.*_C0.tif` | ||
- Label Mask URI: [ Browse ] to `Well_1_nuclei_labels.tif` and, same as above, replace `_1_` by `_.*_` | ||
- Label Mask Table URI: Leave empty | ||
- SpatialCalibration: Does not matter here, because the images are only in pixel units anyway | ||
- Grid: Transformed (Stitched performs better if you have >100 images) | ||
- Click [ OK ] | ||
- The MoBIE UI and BigDataViewer will open allowing you to conveniently browse all data | ||
- Browsing suggestions | ||
- [ Ctrl L ] to shuffle the label colors | ||
- Use the table to move between images |
2 changes: 2 additions & 0 deletions
2
_includes/batch_qc_and_exploration/batch_explore_segmented_images_napari.py
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,2 @@ | ||
# TODO | ||
# If someone has a solution please reach out :-) |
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,3 @@ | ||
<h4 id="create_imaris"><a href="#create_imaris">Create Imaris files</a></h4> | ||
|
||
Create chunked multi-resolution HDF5 based Imaris files. |
6 changes: 6 additions & 0 deletions
6
_includes/big_image_file_formats/create_imaris_imaris_file_converter.md
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,6 @@ | ||
- Install Imaris File Converter | ||
- Open this website: https://imaris.oxinst.com/microscopy-imaging-software-free-trial | ||
- Scroll all the way to the bottom | ||
- Download and install the Imaris File Converter for your OS | ||
- TODO | ||
|
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,9 @@ | ||
<h4 id="open_lif"><a href="#open_lif">Open LIF image data</a></h4> | ||
|
||
- Open a LIF (Leica Image File) file and inspect its pixel and metatdata content | ||
- Observe the data is presented as one file on disk | ||
- Observe that this one file contains multiple image datasets | ||
|
||
##### Data | ||
|
||
- [LIF image file](https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_xyc__two_images.lif) |
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,48 @@ | ||
# TODO: Change the below code to open the VSI dataset | ||
|
||
# %% | ||
# Open a VSI image file | ||
# minimal conda env for this module | ||
# conda create -n ImageFileFormats python=3.10 | ||
# activate ImageFileFormat | ||
# pip install bioio bioio-tifffile bioio-lif bioio-czi bioio-ome-tiff bioio-ome-zarr notebook | ||
# Note: for only dealing with .lif just do pip install bioio bioio-lif | ||
|
||
|
||
# %% | ||
# Load .lif file | ||
# - Observe that BioImage chooses the correct reader plugin | ||
from bioio import BioImage | ||
image_url = "https://github.com/NEUBIAS/training-resources/raw/master/image_data/xy_xyc__two_images.lif" | ||
bioimage = BioImage(image_url) | ||
print(bioimage) | ||
print(type(bioimage)) | ||
|
||
# %% | ||
# Inspect number of images in object | ||
print(bioimage.scenes) | ||
|
||
# %% | ||
# Inspect both images in the object | ||
for image in bioimage.scenes: | ||
print(f'Image name: {image}') | ||
# Select image: | ||
bioimage.set_scene(image) | ||
# Inspect dimension and shape of image | ||
print(f'Image dimension: {bioimage.dims}') | ||
print(f'Dimension order is: {bioimage.dims.order}') | ||
print(f'Image shape: {bioimage.shape}') | ||
# Extract image data (5D) | ||
image_data = bioimage.data | ||
print(f'Image type: {type(image_data)}') | ||
print(f'Image array shape: {image_data.shape}') | ||
# Extract specific image part | ||
image_data = bioimage.get_image_data('YX') | ||
print(f'Image type: {type(image_data)}') | ||
print(f'Image array shape: {image_data.shape}') | ||
# Read pixel size | ||
print(f'Pixel size: {bioimage.physical_pixel_sizes}') | ||
# Read metadata | ||
print(f'Metadata type: {type(bioimage.metadata)}') | ||
print(f'Metadata: {bioimage.metadata}') | ||
print('\n') |
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,12 @@ | ||
- Drag and drop the .VSI file on Fiji | ||
- What happens? | ||
- For us, it seemingly opened the image data wrongly, showing some weird RGB data | ||
- Now open the VSI file using [Plugins > Bio-Formats > Bio-Formats Importer] | ||
- [X] Display metadata | ||
- [X] Display OME-XML Metadata | ||
- Press [OK] | ||
- In the upcoming dialog select the first image "series", which represents the actual image data | ||
- Press [OK] | ||
- The image data and metadata will open and can be inspected | ||
|
||
Copy the VSI file to a different location and try again opening it. This should NOT work anymore, because the link to actual data, which is in the ETS file, is now broken |
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
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
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,46 @@ | ||
--- | ||
title: Batch exploration of segmentation results | ||
layout: module | ||
tags: | ||
prerequisites: | ||
- "[Segment and measure nuclei shapes](../workflow_segment_2d_nuclei_measure_shape)" | ||
objectives: | ||
- "Use various tools to efficiently inspect segmented images and corresponding object measurements." | ||
motivation: | | ||
Deriving scientifically sound conclusions from microscopy experiments typically requires batch analysis of large image data sets. Once the analysis has been conducted it is critical to visually inspect the results to identify errors and to make scientific discoveries. To do so efficiently requires making oneself familiar with appropriate tools. | ||
concept_map: > | ||
graph TD | ||
I("Images") --> BA("Batch analysis") | ||
BA --> S("Segmentations") | ||
S --> M("Object measurements") | ||
I --> Q("Visual QC") | ||
S --> Q | ||
M --> Q | ||
figure: /figures/batch_qc_and_exploration.png | ||
figure_legend: "Depiction of a typical bioimage analysis workflow, where batch analysis of many input images yields object segmentation images and measurements, which must be quality controlled and explored for scientific discovery." | ||
|
||
multiactivities: | ||
- ["batch_qc_and_exploration/batch_explore_segmented_images.md", [["Fiji MoBIE", "batch_qc_and_exploration/batch_explore_segmented_images_fiji_mobie.md"], ["napari (TODO)", "batch_qc_and_exploration/batch_explore_segmented_images_napari.py"]]] | ||
- ["batch_qc_and_exploration/batch_explore_segmented_images_and_object_measurements.md", [["Explore Images & Labels & Tables - Fiji MoBIE", "batch_qc_and_exploration/batch_explore_segmented_images_and_object_measurements_fiji_mobie.md"], ["Explore Objects Table - Fiji MoBIE", "batch_qc_and_exploration/batch_explore_objects_table_fiji_mobie.md"]]] | ||
|
||
assessment: > | ||
### Fill in the blanks | ||
1. TODO ___ . | ||
1. TODO ___ . | ||
> ## Solution | ||
> 1. TODO | ||
> 1. TODO | ||
{: .solution} | ||
learn_next: | ||
- | ||
|
||
external_links: | ||
- "[MoBIE documentation](https://mobie.github.io/)" | ||
--- | ||
|
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
Oops, something went wrong.