cellects 0.1.0.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cellects might be problematic. Click here for more details.
- cellects-0.1.0.dev1/LICENSE.odt +0 -0
- cellects-0.1.0.dev1/PKG-INFO +131 -0
- cellects-0.1.0.dev1/README.md +94 -0
- cellects-0.1.0.dev1/pyproject.toml +69 -0
- cellects-0.1.0.dev1/setup.cfg +4 -0
- cellects-0.1.0.dev1/src/cellects/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/__main__.py +49 -0
- cellects-0.1.0.dev1/src/cellects/config/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/config/all_vars_dict.py +154 -0
- cellects-0.1.0.dev1/src/cellects/core/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/core/cellects_paths.py +30 -0
- cellects-0.1.0.dev1/src/cellects/core/cellects_threads.py +1464 -0
- cellects-0.1.0.dev1/src/cellects/core/motion_analysis.py +1931 -0
- cellects-0.1.0.dev1/src/cellects/core/one_image_analysis.py +1065 -0
- cellects-0.1.0.dev1/src/cellects/core/one_video_per_blob.py +679 -0
- cellects-0.1.0.dev1/src/cellects/core/program_organizer.py +1347 -0
- cellects-0.1.0.dev1/src/cellects/core/script_based_run.py +154 -0
- cellects-0.1.0.dev1/src/cellects/gui/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/gui/advanced_parameters.py +1258 -0
- cellects-0.1.0.dev1/src/cellects/gui/cellects.py +189 -0
- cellects-0.1.0.dev1/src/cellects/gui/custom_widgets.py +789 -0
- cellects-0.1.0.dev1/src/cellects/gui/first_window.py +449 -0
- cellects-0.1.0.dev1/src/cellects/gui/if_several_folders_window.py +239 -0
- cellects-0.1.0.dev1/src/cellects/gui/image_analysis_window.py +1909 -0
- cellects-0.1.0.dev1/src/cellects/gui/required_output.py +232 -0
- cellects-0.1.0.dev1/src/cellects/gui/video_analysis_window.py +656 -0
- cellects-0.1.0.dev1/src/cellects/icons/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/icons/cellects_icon.icns +0 -0
- cellects-0.1.0.dev1/src/cellects/icons/cellects_icon.ico +0 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/cell_leaving_detection.py +54 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/cluster_flux_study.py +102 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/extract_exif.py +61 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/fractal_analysis.py +184 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/fractal_functions.py +108 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/image_segmentation.py +272 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/morphological_operations.py +867 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/network_functions.py +1244 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/one_image_analysis_threads.py +289 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/progressively_add_distant_shapes.py +246 -0
- cellects-0.1.0.dev1/src/cellects/image_analysis/shape_descriptors.py +981 -0
- cellects-0.1.0.dev1/src/cellects/utils/__init__.py +0 -0
- cellects-0.1.0.dev1/src/cellects/utils/formulas.py +881 -0
- cellects-0.1.0.dev1/src/cellects/utils/load_display_save.py +1016 -0
- cellects-0.1.0.dev1/src/cellects/utils/utilitarian.py +516 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/PKG-INFO +131 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/SOURCES.txt +57 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/dependency_links.txt +1 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/entry_points.txt +2 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/requires.txt +25 -0
- cellects-0.1.0.dev1/src/cellects.egg-info/top_level.txt +1 -0
- cellects-0.1.0.dev1/tests/test_based_run.py +107 -0
- cellects-0.1.0.dev1/tests/test_formulas.py +330 -0
- cellects-0.1.0.dev1/tests/test_image_segmentation.py +128 -0
- cellects-0.1.0.dev1/tests/test_integration.py +134 -0
- cellects-0.1.0.dev1/tests/test_load_display_save.py +247 -0
- cellects-0.1.0.dev1/tests/test_morphological_operations.py +661 -0
- cellects-0.1.0.dev1/tests/test_network_functions.py +817 -0
- cellects-0.1.0.dev1/tests/test_utilitarian.py +208 -0
|
Binary file
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
|
+
Name: cellects
|
|
3
|
+
Version: 0.1.0.dev1
|
|
4
|
+
Summary: Cell Expansion Computer Tracking Software.
|
|
5
|
+
Author: Aurèle Boussard
|
|
6
|
+
Project-URL: Homepage, https://github.com/Aurele-B/Cellects
|
|
7
|
+
Project-URL: Issues, https://github.com/Aurele-B/Cellects/issues
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: <3.13,>=3.11
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE.odt
|
|
14
|
+
Requires-Dist: coloredlogs
|
|
15
|
+
Requires-Dist: exif
|
|
16
|
+
Requires-Dist: ExifRead
|
|
17
|
+
Requires-Dist: numba
|
|
18
|
+
Requires-Dist: opencv-python
|
|
19
|
+
Requires-Dist: pandas
|
|
20
|
+
Requires-Dist: psutil
|
|
21
|
+
Requires-Dist: PySide6>=6.5
|
|
22
|
+
Requires-Dist: scipy
|
|
23
|
+
Requires-Dist: screeninfo
|
|
24
|
+
Requires-Dist: numpy>=1.26
|
|
25
|
+
Requires-Dist: scikit-image
|
|
26
|
+
Requires-Dist: tqdm
|
|
27
|
+
Requires-Dist: h5py
|
|
28
|
+
Requires-Dist: matplotlib
|
|
29
|
+
Requires-Dist: natsort
|
|
30
|
+
Provides-Extra: test
|
|
31
|
+
Requires-Dist: pytest; extra == "test"
|
|
32
|
+
Requires-Dist: pytest-cov; extra == "test"
|
|
33
|
+
Provides-Extra: doc
|
|
34
|
+
Requires-Dist: mkdocs; extra == "doc"
|
|
35
|
+
Requires-Dist: mkdocs-material; extra == "doc"
|
|
36
|
+
Requires-Dist: pymdown-extensions; extra == "doc"
|
|
37
|
+
|
|
38
|
+
Cellects: Cell Expansion Computer Tracking Software
|
|
39
|
+
===================================================
|
|
40
|
+
|
|
41
|
+
Description
|
|
42
|
+
-----------
|
|
43
|
+
|
|
44
|
+
Cellects is a tracking software for organisms whose shape and size change over time.
|
|
45
|
+
Cellects’ main strengths are its broad scope of action,
|
|
46
|
+
automated computation of a variety of geometrical descriptors, easy installation and user-friendly interface.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Quick Start
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
⚠️ **Note:** At this stage, Cellects is available **only from source**.
|
|
55
|
+
You will need **Miniconda3** and **git** installed on your system.
|
|
56
|
+
|
|
57
|
+
- Install [Miniconda3](https://docs.conda.io/en/latest/miniconda.html)
|
|
58
|
+
(choose the installer for your operating system).
|
|
59
|
+
- Install [git](https://git-scm.com/downloads)
|
|
60
|
+
(also available through package managers like `apt`, `brew`, or `choco`).
|
|
61
|
+
|
|
62
|
+
Once these prerequisites are installed, you can set up Cellects as follows:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
# Clone the repository
|
|
66
|
+
git clone https://github.com/Aurele-B/Cellects.git
|
|
67
|
+
cd Cellects
|
|
68
|
+
|
|
69
|
+
# Create and activate the environment
|
|
70
|
+
conda env create -f conda/env.yml
|
|
71
|
+
conda activate cellects-dev
|
|
72
|
+
|
|
73
|
+
# Install the package in editable mode
|
|
74
|
+
pip install -e .
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Launch the application:
|
|
78
|
+
```bash
|
|
79
|
+
Cellects
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Developer Guide
|
|
85
|
+
|
|
86
|
+
### Run Tests
|
|
87
|
+
Cellects uses `pytest` + `pytest-cov`.
|
|
88
|
+
Install test dependencies:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install -e ".[test]"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Run the test suite (with coverage enabled by default via `pyproject.toml`):
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pytest
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
You can access the coverage report with `coverage html` and open `htmlcov/index.html` in your browser.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
open htmlcov/index.html # macOS
|
|
104
|
+
xdg-open htmlcov/index.html # Linux
|
|
105
|
+
start htmlcov\index.html # Windows (PowerShell)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Or explicitly:
|
|
109
|
+
```bash
|
|
110
|
+
pytest --cov=src/cellects --cov-report=term-missing
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Build Documentation
|
|
114
|
+
Install doc dependencies:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
pip install -e ".[doc]"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Serve the docs locally:
|
|
121
|
+
```bash
|
|
122
|
+
mkdocs serve
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Open [http://127.0.0.1:8000](http://127.0.0.1:8000) in your browser.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Resources
|
|
130
|
+
- [User manual](https://github.com/Aurele-B/Cellects/blob/main/_old_doc/UserManual.md)
|
|
131
|
+
- [Usage example (video)](https://www.youtube.com/watch?v=N-k4p_aSPC0)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
Cellects: Cell Expansion Computer Tracking Software
|
|
2
|
+
===================================================
|
|
3
|
+
|
|
4
|
+
Description
|
|
5
|
+
-----------
|
|
6
|
+
|
|
7
|
+
Cellects is a tracking software for organisms whose shape and size change over time.
|
|
8
|
+
Cellects’ main strengths are its broad scope of action,
|
|
9
|
+
automated computation of a variety of geometrical descriptors, easy installation and user-friendly interface.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
⚠️ **Note:** At this stage, Cellects is available **only from source**.
|
|
18
|
+
You will need **Miniconda3** and **git** installed on your system.
|
|
19
|
+
|
|
20
|
+
- Install [Miniconda3](https://docs.conda.io/en/latest/miniconda.html)
|
|
21
|
+
(choose the installer for your operating system).
|
|
22
|
+
- Install [git](https://git-scm.com/downloads)
|
|
23
|
+
(also available through package managers like `apt`, `brew`, or `choco`).
|
|
24
|
+
|
|
25
|
+
Once these prerequisites are installed, you can set up Cellects as follows:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Clone the repository
|
|
29
|
+
git clone https://github.com/Aurele-B/Cellects.git
|
|
30
|
+
cd Cellects
|
|
31
|
+
|
|
32
|
+
# Create and activate the environment
|
|
33
|
+
conda env create -f conda/env.yml
|
|
34
|
+
conda activate cellects-dev
|
|
35
|
+
|
|
36
|
+
# Install the package in editable mode
|
|
37
|
+
pip install -e .
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Launch the application:
|
|
41
|
+
```bash
|
|
42
|
+
Cellects
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Developer Guide
|
|
48
|
+
|
|
49
|
+
### Run Tests
|
|
50
|
+
Cellects uses `pytest` + `pytest-cov`.
|
|
51
|
+
Install test dependencies:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install -e ".[test]"
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Run the test suite (with coverage enabled by default via `pyproject.toml`):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pytest
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You can access the coverage report with `coverage html` and open `htmlcov/index.html` in your browser.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
open htmlcov/index.html # macOS
|
|
67
|
+
xdg-open htmlcov/index.html # Linux
|
|
68
|
+
start htmlcov\index.html # Windows (PowerShell)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Or explicitly:
|
|
72
|
+
```bash
|
|
73
|
+
pytest --cov=src/cellects --cov-report=term-missing
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Build Documentation
|
|
77
|
+
Install doc dependencies:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
pip install -e ".[doc]"
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Serve the docs locally:
|
|
84
|
+
```bash
|
|
85
|
+
mkdocs serve
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Open [http://127.0.0.1:8000](http://127.0.0.1:8000) in your browser.
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Resources
|
|
93
|
+
- [User manual](https://github.com/Aurele-B/Cellects/blob/main/_old_doc/UserManual.md)
|
|
94
|
+
- [Usage example (video)](https://www.youtube.com/watch?v=N-k4p_aSPC0)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools==76.1.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cellects"
|
|
7
|
+
version = "0.1.0.dev1"
|
|
8
|
+
description = "Cell Expansion Computer Tracking Software."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { file = "LICENSE" }
|
|
11
|
+
requires-python = ">=3.11,<3.13"
|
|
12
|
+
authors = [{ name = "Aurèle Boussard" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
dependencies = [
|
|
20
|
+
"coloredlogs",
|
|
21
|
+
"exif",
|
|
22
|
+
"ExifRead",
|
|
23
|
+
"numba",
|
|
24
|
+
"opencv-python",
|
|
25
|
+
"pandas",
|
|
26
|
+
"psutil",
|
|
27
|
+
"PySide6>=6.5",
|
|
28
|
+
"scipy",
|
|
29
|
+
"screeninfo",
|
|
30
|
+
"numpy>=1.26",
|
|
31
|
+
"scikit-image",
|
|
32
|
+
"tqdm",
|
|
33
|
+
"h5py",
|
|
34
|
+
"matplotlib",
|
|
35
|
+
"natsort",
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
[project.scripts]
|
|
39
|
+
Cellects = "cellects.__main__:run_cellects"
|
|
40
|
+
|
|
41
|
+
[project.optional-dependencies]
|
|
42
|
+
test = [
|
|
43
|
+
"pytest",
|
|
44
|
+
"pytest-cov",
|
|
45
|
+
]
|
|
46
|
+
doc = [
|
|
47
|
+
"mkdocs",
|
|
48
|
+
"mkdocs-material",
|
|
49
|
+
"pymdown-extensions",
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[project.urls]
|
|
53
|
+
Homepage = "https://github.com/Aurele-B/Cellects"
|
|
54
|
+
Issues = "https://github.com/Aurele-B/Cellects/issues"
|
|
55
|
+
|
|
56
|
+
[tool.setuptools.packages.find]
|
|
57
|
+
where = ["src"]
|
|
58
|
+
exclude = ["tests*"]
|
|
59
|
+
|
|
60
|
+
[tool.setuptools.package-data]
|
|
61
|
+
cellects = ["icons/**"]
|
|
62
|
+
|
|
63
|
+
[tool.setuptools]
|
|
64
|
+
package-dir = {"" = "src"}
|
|
65
|
+
include-package-data = true
|
|
66
|
+
|
|
67
|
+
[tool.pytest.ini_options]
|
|
68
|
+
testpaths = ["tests"]
|
|
69
|
+
addopts = "--cov=src/cellects --cov-report=term-missing --cov-report=html"
|
|
File without changes
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Launcher of cellects software.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
import logging
|
|
6
|
+
import sys
|
|
7
|
+
import coloredlogs
|
|
8
|
+
from PySide6 import QtWidgets, QtGui
|
|
9
|
+
from cellects.core.cellects_paths import ICONS_DIR
|
|
10
|
+
|
|
11
|
+
# These two lines allow the taskbar icon to be cellects_icon instead if python icon.
|
|
12
|
+
if sys.platform.startswith('win'):
|
|
13
|
+
import ctypes
|
|
14
|
+
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('company.app.1')
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
LOGLEVEL = "INFO" #"DEBUG"
|
|
18
|
+
|
|
19
|
+
def _initialize_coloredlogs(loglevel: str = 'DEBUG') -> None:
|
|
20
|
+
"""Initialize logging parameters with coloredlogs library."""
|
|
21
|
+
coloredlogs.install(
|
|
22
|
+
logger=logging.basicConfig(),
|
|
23
|
+
level=loglevel,
|
|
24
|
+
fmt='[%(asctime)s] [%(levelname)s] %(message)s',
|
|
25
|
+
datefmt='%H:%M:%S')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def run_cellects():
|
|
29
|
+
"""Entry point of cellects software."""
|
|
30
|
+
_initialize_coloredlogs(LOGLEVEL)
|
|
31
|
+
from cellects.gui.cellects import CellectsMainWidget
|
|
32
|
+
app = QtWidgets.QApplication([])
|
|
33
|
+
|
|
34
|
+
# Add the icon file to the app
|
|
35
|
+
icon = QtGui.QIcon()
|
|
36
|
+
if sys.platform.startswith('win'):
|
|
37
|
+
icon.addPixmap(QtGui.QPixmap(ICONS_DIR / "cellects_icon.ico"))
|
|
38
|
+
else:
|
|
39
|
+
icon.addPixmap(QtGui.QPixmap(ICONS_DIR / "cellects_icon.icns"))
|
|
40
|
+
app.setWindowIcon(icon)
|
|
41
|
+
# Start session
|
|
42
|
+
session = CellectsMainWidget()
|
|
43
|
+
session.instantiate()
|
|
44
|
+
session.show()
|
|
45
|
+
sys.exit(app.exec())
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
if __name__ == "__main__":
|
|
49
|
+
run_cellects()
|
|
File without changes
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
This script generates the default parameters of the GUI of Cellects.
|
|
4
|
+
It can be used to write these parameters in a file named all_vars_dict.
|
|
5
|
+
Then, the gui updates this file as users adjust the GUI parameters.
|
|
6
|
+
These parameters are stored in a dictionary with keys corresponding to the parameter's name and values to its tunable
|
|
7
|
+
value.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
from cellects.image_analysis.shape_descriptors import descriptors_categories, descriptors
|
|
12
|
+
import numpy as np
|
|
13
|
+
from cellects.core.cellects_paths import ALL_VARS_PKL_FILE
|
|
14
|
+
from cellects.utils.load_display_save import PickleRick
|
|
15
|
+
from cellects.core.cellects_paths import TEST_DIR
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class DefaultDicts:
|
|
19
|
+
def __init__(self):
|
|
20
|
+
# po.load_variable_dict()
|
|
21
|
+
self.all = {
|
|
22
|
+
# Interface settings:
|
|
23
|
+
'compute_all_options': True,
|
|
24
|
+
'expert_mode': False,
|
|
25
|
+
'is_auto': False,
|
|
26
|
+
'night_mode': False,
|
|
27
|
+
'arena': 1,
|
|
28
|
+
'video_option': 0,
|
|
29
|
+
|
|
30
|
+
# Analysis settings:
|
|
31
|
+
'are_gravity_centers_moving': 0,
|
|
32
|
+
'are_zigzag': 'columns',
|
|
33
|
+
'automatic_size_thresholding': True,
|
|
34
|
+
'color_number': 2,
|
|
35
|
+
'cores': 1,
|
|
36
|
+
'automatically_crop': False,
|
|
37
|
+
'descriptors': descriptors_categories,
|
|
38
|
+
'display_shortcuts': False,
|
|
39
|
+
'connect_distant_shape_during_segmentation': False,
|
|
40
|
+
'all_specimens_have_same_direction': True,
|
|
41
|
+
'extract_time_interval': True,
|
|
42
|
+
'do_multiprocessing': False,
|
|
43
|
+
'extension': '.tif',
|
|
44
|
+
'first_detection_frame': 1,
|
|
45
|
+
'folder_number': 1,
|
|
46
|
+
'first_folder_sample_number': 1,
|
|
47
|
+
'first_move_threshold_in_mm²': 10,
|
|
48
|
+
'folder_list': [],
|
|
49
|
+
'global_pathway': str(TEST_DIR / "experiment"),
|
|
50
|
+
'im_or_vid': 0,
|
|
51
|
+
'image_horizontal_size_in_mm': 700,
|
|
52
|
+
'minimal_appearance_size': 10,
|
|
53
|
+
'more_than_two_colors': False,
|
|
54
|
+
'bio_mask': None,
|
|
55
|
+
'back_mask': None,
|
|
56
|
+
'keep_cell_and_back_for_all_folders': False,
|
|
57
|
+
|
|
58
|
+
# 'overwrite_cellects_data': True,
|
|
59
|
+
'overwrite_unaltered_videos': False,
|
|
60
|
+
'radical': 'im',
|
|
61
|
+
'raw_images': False,
|
|
62
|
+
'sample_number_per_folder': [1],
|
|
63
|
+
'scale_with_image_or_cells': 1,
|
|
64
|
+
'set_spot_shape': True,
|
|
65
|
+
'set_spot_size': True,
|
|
66
|
+
'starting_blob_hsize_in_mm': 15,
|
|
67
|
+
'starting_blob_shape': None
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
self.vars = {
|
|
71
|
+
'analyzed_individuals': np.empty(0, dtype=np.uint16),
|
|
72
|
+
'arena_shape': 'rectangle', # 'circle',
|
|
73
|
+
'bio_label': 1,
|
|
74
|
+
'bio_label2': 1,
|
|
75
|
+
'color_number': 2,
|
|
76
|
+
'convert_for_motion': {
|
|
77
|
+
'lab': np.array((0, 0, 1), np.int8),
|
|
78
|
+
'logical': 'None'},
|
|
79
|
+
'convert_for_origin': {
|
|
80
|
+
'lab': np.array((0, 0, 1), np.int8),
|
|
81
|
+
'logical': 'None'},
|
|
82
|
+
'detection_range_factor': 2,
|
|
83
|
+
'first_move_threshold': None,
|
|
84
|
+
'img_number': 0,
|
|
85
|
+
'iso_digi_analysis': True,
|
|
86
|
+
'luminosity_threshold': 127,
|
|
87
|
+
'max_size_for_connection': 300,
|
|
88
|
+
'min_size_for_connection': 20,
|
|
89
|
+
'origin_state': 'fluctuating',
|
|
90
|
+
'oscilacyto_analysis': False,
|
|
91
|
+
'network_analysis': False,
|
|
92
|
+
'graph_extraction': False,
|
|
93
|
+
'network_detection_threshold': 20,
|
|
94
|
+
'network_mesh_side_length': 8,
|
|
95
|
+
'network_mesh_step_length': 2,
|
|
96
|
+
'fractal_analysis': False,
|
|
97
|
+
'fractal_box_side_threshold': 32,
|
|
98
|
+
'fractal_zoom_step': 0,
|
|
99
|
+
'subtract_background': False,
|
|
100
|
+
'correct_errors_around_initial': False,
|
|
101
|
+
'prevent_fast_growth_near_periphery': False,
|
|
102
|
+
'periphery_width': 40,
|
|
103
|
+
'max_periphery_growth': 20,
|
|
104
|
+
# According to Smith and Saldana (1992),
|
|
105
|
+
# P. polycephalum shuttle streaming has a period of 100-200s
|
|
106
|
+
'already_greyscale': False,
|
|
107
|
+
'descriptors_in_long_format': True,
|
|
108
|
+
'do_slope_segmentation': False,
|
|
109
|
+
'do_threshold_segmentation': True,
|
|
110
|
+
'drift_already_corrected': False,
|
|
111
|
+
'appearance_detection_method': 'largest',
|
|
112
|
+
'frame_by_frame_segmentation': False,
|
|
113
|
+
'repeat_video_smoothing': 1,
|
|
114
|
+
'keep_unaltered_videos': False,
|
|
115
|
+
'maximal_growth_factor': 0.05,
|
|
116
|
+
'min_ram_free': 0.87,
|
|
117
|
+
'expected_oscillation_period': 2, # (min)
|
|
118
|
+
'minimal_oscillating_cluster_size': 10, # (pixels)
|
|
119
|
+
'output_in_mm': True,
|
|
120
|
+
'save_processed_videos': True,
|
|
121
|
+
'several_blob_per_arena': False,
|
|
122
|
+
'time_step': 1,
|
|
123
|
+
'true_if_use_light_AND_slope_else_OR': False,
|
|
124
|
+
'do_fading': False,
|
|
125
|
+
'fading': 0,
|
|
126
|
+
'video_fps': 60,
|
|
127
|
+
'videos_extension': '.mp4',
|
|
128
|
+
'exif': [],
|
|
129
|
+
'lose_accuracy_to_save_memory': True,
|
|
130
|
+
'save_coord_specimen': False,
|
|
131
|
+
'save_coord_contour': False,
|
|
132
|
+
'save_coord_thickening_slimming': False,
|
|
133
|
+
'save_coord_network': False,
|
|
134
|
+
'grid_segmentation': False,
|
|
135
|
+
# Data stored during analysis:
|
|
136
|
+
'descriptors': descriptors,
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
def save_as_pkl(self, po=None):
|
|
140
|
+
if po is None:
|
|
141
|
+
if os.path.isfile('PickleRick0.pkl'):
|
|
142
|
+
os.remove('PickleRick0.pkl')
|
|
143
|
+
pickle_rick = PickleRick(0)
|
|
144
|
+
pickle_rick.write_file(self.all, ALL_VARS_PKL_FILE)
|
|
145
|
+
else:
|
|
146
|
+
po = po
|
|
147
|
+
po.all = self.all
|
|
148
|
+
po.vars = self.vars
|
|
149
|
+
po.save_variable_dict()
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if __name__ == "__main__":
|
|
154
|
+
DefaultDicts().save_as_pkl()
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Generate the different paths used by cellects.
|
|
4
|
+
Adjust the path names according to the current position of the software.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
|
|
10
|
+
# Current file -> src/cellects/cellect_paths.py
|
|
11
|
+
CURR_DIR = Path(os.path.dirname(os.path.realpath(__file__)))
|
|
12
|
+
CELLECTS_DIR = CURR_DIR.parent # = src/cellects
|
|
13
|
+
|
|
14
|
+
# Package-internal dirs
|
|
15
|
+
CONFIG_DIR = CELLECTS_DIR / "config"
|
|
16
|
+
CORE_DIR = CELLECTS_DIR / "core"
|
|
17
|
+
GUI_DIR = CELLECTS_DIR / "gui"
|
|
18
|
+
ICONS_DIR = CELLECTS_DIR / "icons"
|
|
19
|
+
IMAGE_ANALYSIS_DIR = CELLECTS_DIR / "image_analysis"
|
|
20
|
+
UTILS_DIR = CELLECTS_DIR / "utils"
|
|
21
|
+
|
|
22
|
+
# Repo root (src/..)
|
|
23
|
+
REPO_ROOT = CELLECTS_DIR.parent
|
|
24
|
+
|
|
25
|
+
# Repo-level dirs
|
|
26
|
+
DATA_DIR = REPO_ROOT / "data"
|
|
27
|
+
TEST_DIR = REPO_ROOT / "tests"
|
|
28
|
+
|
|
29
|
+
# Example packaged file
|
|
30
|
+
ALL_VARS_PKL_FILE = CONFIG_DIR / "all_vars.pkl"
|