Skip to content

Commit

Permalink
update tutorials to screenshots from last version
Browse files Browse the repository at this point in the history
  • Loading branch information
Czaki committed Aug 26, 2020
1 parent 4050fd9 commit 5d83225
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 23 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: .*\.md
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/asottile/setup-cfg-fmt
Expand Down
2 changes: 1 addition & 1 deletion package/PartSeg/common_gui/napari_image_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def convert_to_vispy_colormap(colormap: ColorMap):

def mask_opacity(self) -> float:
"""Get mask opacity"""
return self.settings.get_from_profile("mask_presentation _opacity", 1)
return self.settings.get_from_profile("mask_presentation_opacity", 1)

def mask_color(self) -> Colormap:
"""Get mask marking color"""
Expand Down
1 change: 1 addition & 0 deletions package/PartSeg/segmentation_analysis/image_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, settings: PartSettings, channel_property: ChannelProperty, na
self.opacity.setValue(self.image_state.opacity)
self.opacity.setSingleStep(0.1)
self.opacity.valueChanged.connect(self.image_state.set_opacity)
self.opacity.setMinimumWidth(500)
self.label1 = QLabel("Borders:")
self.label2 = QLabel("Opacity:")
self.btn_layout.insertWidget(3, self.label1)
Expand Down
Binary file modified tutorials/tutorial-chromosome-1/images/advanced_set_measure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorials/tutorial-chromosome-1/images/main_window.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorials/tutorial-chromosome-1/images/main_window_analysis2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorials/tutorial-chromosome-1/images/mask_segmentation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorials/tutorial-chromosome-1/images/open_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 21 additions & 21 deletions tutorials/tutorial-chromosome-1/tutorial-chromosome1_16.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Firstly segmentation of nuclei is performed based on the DNA signal. Segmented n

1. Open PartSeg

2. Select "Mask Segmentation"
2. Select "Mask Segmentation"
![launcher GUI](./images/launcher.png)

3. Load image
3. Load image
![mask segmentation](./images/mask_segmentation.png)

4. Ensure that threshold segmentation method is selected
Expand Down Expand Up @@ -59,7 +59,7 @@ Firstly segmentation of nuclei is performed based on the DNA signal. Segmented n
(`stack1_component5.tif`, `stack1_component6.tif`, `stack1_component7.tif`, ...)
(`stack1_component5_mask.tif`, `stack1_component6_mask.tif`, `stack1_component7_mask.tif`, ...)

9. The whole segmentation can be saved separately (**Save segmentation** option) and later can be loaded using **Load segmentation** menu.
9. The whole segmentation can be saved separately (**Save segmentation** option) and later can be loaded using **Load segmentation** menu.
![mask segmentation](./images/mask_segmentation.png)

#### Segmentation of chromosome 1 territories
Expand All @@ -68,13 +68,13 @@ In order to qauntify features of chromosome 1 territory segmentation of FISH spe

1. Open PartSeg

2. Select **Segmentation Analysis**
2. Select **Segmentation Analysis**
![launcher GUI](./images/launcher.png)

3. Load data:
1. Select **Open** button or press **ctrl+O** (cmd+O on mac)

2. Select **image with mask**
2. Select **image with mask**
![open dialog](images/open_file.png)

3. Select image to load: `stack1_component5.tif`
Expand All @@ -83,30 +83,30 @@ In order to qauntify features of chromosome 1 territory segmentation of FISH spe

You can also simply drag and drop both files on the main window.

4. Enable **Synchronise view** option
4. Enable **Synchronise view** option
![main window for segmentation](images/main_window_segmentation.png)

5. Disable channel 1 (DNA staining) on both windows

6. Enable **Mask** option on the left panel

7. Set algorithm parameters to:
1. Use Lower Threshold Flow
1. Use Lower Threshold with watershed

2. Channel: 2

3. Filter: Gauss with type Layer and radius 1

2. Threshold type: Base/Core
4. Threshold type: Base/Core

3. Core Threshold: Manual, threshold value: 19500
5. Core Threshold: Manual, threshold value: 19500

4. Base Threshold: Manual, threshold value: 11500
6. Base Threshold: Manual, threshold value: 11500

5. Flow type: MultiScale Opening Sprawl

6. Channel: 2

7. Minimum size (px): 800

8. Filter: Gauss with type Layer and radius 1
7. Flow type: MultiScale Opening Sprawl

8. Minimum core size (px): 800

9. Connect only sides: Not checked
This option limits segmentation to pixels connected side by side.

Expand All @@ -126,10 +126,10 @@ In this example we show how to measure volume, diameter and surface of a whole n
(these parameters are calculated based on a set threshold).
In addition we calculated ratio of chromosome 1 to nucleus volume to show how big is chromosome 1 in relation to the whole nucleus.

1. Open **Settings and Measurement** option
1. Open **Settings and Measurement** option
![PartSeg GUI](images/main_window.png)

2. Select *Measurements settings**
2. Select *Measurements settings**
![Advanced window](images/advanced_set_measure.png)

3. Prepare profile of parameters for chromosome 1 territories analysis.
Expand Down Expand Up @@ -161,14 +161,14 @@ At the end established settings profile is used to measure features of nuclei an
1. In **Settings and Measurement** menu check for **Properties**. The pixel size and an voxel depth should be the same as the original image.
The rest of measurements depends on these properties, so make sure they are correct.

2. Next select **Measurements** to get a preview on actual numbers.
2. Next select **Measurements** to get a preview on actual numbers.
![PartSeg GUI](images/main_window.png)
Select channel 1 and profile "test_case" created in the last paragraph. Enable **Horizontal view** and select units of choice. Execute the analysis with **Calculate and append results** button.
Resulting table can be copied to any text, or spreadsheet file using **copy to clipboard** option.

3. Next, open file `stack1_component1.tif` and load mask file `stack1_component1_mask.tif` from `stack1_components` folder.
Without changing any parameters select **Execute** in main window and **Calculate and append results** once more.
Second line of results shows the same set of measurements for the second nucleus. Measurements are shown in selected units.
Second line of results shows the same set of measurements for the second nucleus. Measurements are shown in selected units.
![PartSeg GUI](images/main_window_analysis2.png)

## Appendix
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorial_neuron_types/Neuron_types_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"## Remarks\n",
"1. We suggest to start from the tutorial showing basic functionalities of Partseg available [here](http://nucleus3d.cent.uw.edu.pl/PartSeg/tutorials/tutorial_chromosome_1/). In some parts few alternative options are shown.\n",
"2. Numbering of channels starts with 0.\n",
"3. Training data can be downloaded from [here](http://nucleus3d.cent.uw.edu.pl/PartSeg/Downloads/neuron_types.zip), Jupyter notebook is available [here](http://nucleus3d.cent.uw.edu.pl/PartSeg/tutorials/tutorial_diferrent_neurons/Neuron_types_example.ipynb)\n",
"3. Training data can be downloaded from [here](http://nucleus3d.cent.uw.edu.pl/PartSeg/Downloads/neuron_types.zip), Jupyter notebook is available [here](https://github.com/4DNucleome/PartSeg/blob/master/tutorials/tutorial_neuron_types/Neuron_types_example.ipynb)\n",
"4. Resulted code can be implemented into PartSeg body.\n",
"5. Every json file can be exported from PartSeg.\n",
"\n",
Expand Down

0 comments on commit 5d83225

Please sign in to comment.