Skip to content

Commit 7ac4ccc

Browse files
committed
Merge branch 'main' of https://github.com/AdaptiveMotorControlLab/CellSeg3d into v0.0.1rc3
2 parents b6eb303 + eb33f31 commit 7ac4ccc

26 files changed

+964
-590
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ __pycache__/
88

99
# unwanted results files
1010
*.tif
11+
*.tiff
1112
napari_cellseg3d/_tests/res/*.csv
1213
*.pth
14+
*.db
1315

1416
# Distribution / packaging
1517
.Python
@@ -97,3 +99,4 @@ venv/
9799
/napari_cellseg3d/models/saved_weights/
98100
/docs/res/logo/old_logo/
99101
/reqs/
102+

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ A napari plugin for 3D cell segmentation: training, inference, and data review.
2323

2424
## Installation
2525

26+
Note : we recommend using conda to create a new environment for the plugin.
27+
28+
conda create --name python=3.8 napari-cellseg3d
29+
conda activate napari-cellseg3d
30+
2631
You can install `napari-cellseg3d` via [pip]:
2732

2833
pip install napari-cellseg3d

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
#
7171
# This is also used if you do content translation via gettext catalogs.
7272
# Usually you set "language" from the command line for these cases.
73-
language = None
73+
language = "en"
7474

7575
# There are two options for replacing |today|: either, you set today to some
7676
# non-false value, then it is used:

docs/res/code/interface.rst

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,75 @@
11
interface.py
22
=============
33

4-
Functions
4+
Classes
55
-------------
66

7-
open_url
7+
Button
88
**************************************
9-
.. autofunction:: napari_cellseg3d.interface::open_url
9+
.. autoclass:: napari_cellseg3d.interface::Button
10+
:members: __init__, visibility_condition
1011

12+
DropdownMenu
13+
**************************************
14+
.. autoclass:: napari_cellseg3d.interface::DropdownMenu
15+
:members: __init__
1116

12-
make_scrollable
17+
CheckBox
1318
**************************************
14-
.. autofunction:: napari_cellseg3d.interface::make_scrollable
19+
.. autoclass:: napari_cellseg3d.interface::CheckBox
20+
:members: __init__
1521

22+
AnisotropyWidgets
23+
**************************************
24+
.. autoclass:: napari_cellseg3d.interface::AnisotropyWidgets
25+
:members: __init__, build, get_anisotropy_resolution_xyz, get_anisotropy_resolution_zyx, anisotropy_zoom_factor,is_enabled,toggle_permanent_visibility
1626

17-
make_group
27+
28+
FilePathWidget
1829
**************************************
19-
.. autofunction:: napari_cellseg3d.interface::make_group
30+
.. autoclass:: napari_cellseg3d.interface::FilePathWidget
31+
:members: __init__, build, get_text_field, get_button, check_ready, set_required, update_field_color, set_description
2032

21-
add_to_group
33+
ScrollArea
2234
**************************************
23-
.. autofunction:: napari_cellseg3d.interface::add_to_group
35+
.. autoclass:: napari_cellseg3d.interface::ScrollArea
36+
:members: __init__, make_scrollable
2437

25-
make_container
38+
DoubleIncrementCounter
2639
**************************************
27-
.. autofunction:: napari_cellseg3d.interface::make_container
40+
.. autoclass:: napari_cellseg3d.interface::DoubleIncrementCounter
41+
:members: __init__, set_precision, make_n
42+
43+
IntIncrementCounter
44+
**************************************
45+
.. autoclass:: napari_cellseg3d.interface::IntIncrementCounter
46+
:members: __init__, make_n
2847

2948

30-
make_button
49+
Functions
50+
-------------
51+
52+
open_url
3153
**************************************
32-
.. autofunction:: napari_cellseg3d.interface::make_button
54+
.. autofunction:: napari_cellseg3d.interface::open_url
55+
3356

34-
make_combobox
57+
make_group
3558
**************************************
36-
.. autofunction:: napari_cellseg3d.interface::make_combobox
59+
.. autofunction:: napari_cellseg3d.interface::make_group
3760

38-
make_checkbox
61+
add_to_group
3962
**************************************
40-
.. autofunction:: napari_cellseg3d.interface::make_checkbox
63+
.. autofunction:: napari_cellseg3d.interface::add_to_group
4164

65+
make_container
66+
**************************************
67+
.. autofunction:: napari_cellseg3d.interface::make_container
4268

4369
combine_blocks
4470
**************************************
4571
.. autofunction:: napari_cellseg3d.interface::combine_blocks
4672

47-
4873
add_blank
4974
**************************************
5075
.. autofunction:: napari_cellseg3d.interface::add_blank

docs/res/guides/convert_module_guide.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ You can :
1717
* Remove small objects :
1818
You can specify a size threshold in pixels; all objects smaller than this size will be removed in the image.
1919

20+
* Resize anisotropic images :
21+
Specifiy the resolution of your microscope to remove anisotropy from images.
22+
23+
.. important:: Does not work for instance labels currently.
24+
25+
2026
.. figure:: ../images/converted_labels.png
2127
:scale: 30 %
2228
:align: center

docs/res/guides/cropping_module_guide.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Folders can be stacks of either .png or .tif files, ideally numbered with the in
2525
You can then choose the size of the cropped volume, which will be constant throughout the process; make sure it is correct beforehand.
2626
Setting a larger size than the size of the image will cause issues.
2727

28+
You can also opt to correct the anisotropy if your image is anisotropic :
29+
simply set the resolution to the one of your microscope.
30+
31+
.. important::
32+
This will simply scale the image in the viewer, but saved images will **still be anisotropic.** To resize your image, see :doc:`convert_module_guide`
33+
2834
Once you are ready, you can press **Start** to start the review process.
2935

3036

docs/res/guides/inference_module_guide.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
Inference module guide
44
=================================
55

6-
This module allows you to use pre-trained segmentation algorithms (written in Pytorch) on volumes
6+
This module allows you to use pre-trained segmentation algorithms (written in Pytorch) on 3D volumes
77
to automatically label cells.
88

9+
.. important::
10+
Currently, only inference on **3D volumes is supported**. Your image and label folders should both contain a set of
11+
**3D image files**, currently either **.tif** or **.tiff**. Loading a folder of 2D images as a stack is not supported as of yet.
12+
913
Currently, the following pre-trained models are available :
1014

1115
============== ================================================================================================
@@ -31,7 +35,7 @@ Interface and functionalities
3135

3236
* **Loading data** :
3337

34-
| When launching the module, you will be asked to provide an **image folder** containing all the volumes you'd like to be labeled.
38+
| When launching the module, you will be asked to provide an **image folder** containing all the 3D volumes you'd like to be labeled.
3539
| All images with the chosen extension (**.tif** or **.tiff** currently supported) in this folder will be labeled.
3640
| You can then choose an **output folder**, where all the results will be saved.
3741

docs/res/guides/review_module_guide.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ Launching the review process
1919
.. note::
2020
Only single 3D **.tif** files or 2D stacks of several **.png** or **.tif** in a folder are currently supported.
2121

22+
* Anisotropic data :
23+
This will scale the images to visually remove the anisotropy, so as to make review easier.
24+
25+
.. important::
26+
Results will still be saved as anisotropic images. If you wish to resize your images, see the :doc:`convert_module_guide`
27+
2228
* CSV file name :
2329
You can then provide a model name, which will be used to name the csv file recording the status of each slice.
2430

docs/res/guides/training_module_guide.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Training module guide
66
This module allows you to train pre-defined Pytorch models for cell segmentation.
77
Pre-defined models are stored in napari-cellseg-3d/models.
88

9+
.. important::
10+
Currently, only inference on **3D volumes is supported**. Your image and label folders should both contain a set of
11+
**3D image files**, currently either **.tif** or **.tiff**. Loading a folder of 2D images as a stack is not supported as of yet.
12+
13+
914
Currently, the following pre-defined models are available :
1015

1116
============== ================================================================================================
@@ -31,8 +36,8 @@ The training module is comprised of several tabs.
3136

3237
1) The first one, **Data**, will let you set :
3338

34-
* The path to the images folder
35-
* The path to the labels folder
39+
* The path to the images folder (3D image files)
40+
* The path to the labels folder (3D image files)
3641
* The path to the results folder
3742

3843
* Whether to copy results to a zip file (for easier transferability)

docs/res/logo/logo_alpha.png

484 KB
Loading

0 commit comments

Comments
 (0)