Skip to content

Commit 01df65d

Browse files
committed
code doc update
1 parent f9dec7e commit 01df65d

2 files changed

Lines changed: 37 additions & 7 deletions

File tree

src/epicure/Utils.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""
2-
Diverse functions for EpiCure
2+
**Diverse functions for EpiCure**
3+
4+
Proposes utility functions that do not depend on a class and can be usefull in several classes.
35
"""
46

57
import numpy as np
@@ -53,11 +55,16 @@ def show_debug(message):
5355
print(message)
5456

5557
def show_documentation():
58+
""" Open browser on main EpiCure documentation page """
5659
import webbrowser
5760
webbrowser.open_new_tab("https://image-analysis-hub.github.io/Epicure/")
5861
return
5962

6063
def show_documentation_page(page):
64+
"""
65+
Open browser on the selected page of EpiCure documentation
66+
:param: page: name of the documentation page to go to (only the name of the page, without the full path)
67+
"""
6168
import webbrowser
6269
webbrowser.open_new_tab("https://image-analysis-hub.github.io/Epicure/"+page)
6370
return
@@ -99,6 +106,17 @@ def get_directory(imagepath):
99106
return os.path.dirname(imagepath)
100107

101108
def extract_names(imagepath, subname="epics", mkdir=True):
109+
"""
110+
From the image file path, extracts the name of the directoties to work in
111+
112+
:param: imagepath: file path to the main raw movie
113+
:param: subname (default: "epics"): name of the results directory where all will be saved
114+
115+
:return:
116+
- name of the raw movie without the extension, that will be used to save all other files
117+
- path to the directory where the raw movie is
118+
- path to the results directory on which to save all outputs
119+
"""
102120
imgname = os.path.splitext(os.path.basename(imagepath))[0]
103121
imgdir = os.path.dirname(imagepath)
104122
resdir = os.path.join(imgdir, subname)

src/epicure/inspecting.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
"""
2+
** EpiCure - Inspect panel interface **
3+
4+
Handle supects and events detection layer.
5+
Inspection functions propose to look for user selected features to detect potential errors in the segmentration from inspecting the tracks.
6+
7+
Extrusion events are detected as disappearance of a track & a cell size small enough.
8+
Divisions events can be detected by the tracking algorithm directly and saved in the track graph, or they can be detected by the inspection as the disappearance of one track at the same time that two new tracks appear in the same area.
9+
10+
Inpsection could also be performed on a static image by looking at outlier values of a selected feature.
11+
"""
12+
13+
114
import numpy as np
215
from skimage import filters
316
from skimage.measure import regionprops
@@ -9,14 +22,12 @@
922
import time
1023
from joblib import Parallel, delayed
1124

12-
"""
13-
EpiCure - Inspection interface
14-
Handle supects, events detection layer
15-
"""
16-
1725
class Inspecting(QWidget):
1826

1927
def __init__(self, napari_viewer, epic):
28+
"""
29+
Generate the graphical interface for the inspection panel, and initialize the events layer.
30+
"""
2031
super().__init__()
2132
self.viewer = napari_viewer
2233
self.epicure = epic
@@ -76,7 +87,7 @@ def __init__(self, napari_viewer, epic):
7687
self.key_binding()
7788

7889
def key_binding(self):
79-
""" active key bindings for events options """
90+
""" active key bindings (keyboard and mouse shortcuts) for events options """
8091
sevents = self.epicure.shortcuts["Events"]
8192
self.epicure.overtext["events"] = "---- Events editing ---- \n"
8293
self.epicure.overtext["events"] += ut.print_shortcuts( sevents )
@@ -417,6 +428,7 @@ def set_colors_from_properties(self, feature):
417428
self.events.face_color = feature
418429

419430
def update_display(self):
431+
""" Update the display of the events layer """
420432
self.events.refresh()
421433
self.color_events()
422434

0 commit comments

Comments
 (0)