Skip to content

Commit 38d991f

Browse files
author
Corentin
committed
v0.3.2 fixing erosion bug
1 parent 7550a15 commit 38d991f

File tree

5 files changed

+35
-6
lines changed

5 files changed

+35
-6
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,6 @@ debug_data/
171171
!binary_mask_sdh.tif
172172
data/*
173173
*intensity_plot.png
174-
*.idea
174+
*.idea
175+
cellpose.sh
176+
nohup.out

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.10.9
1+
3.10.11

myoquant/__main__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,27 @@
11
import typer
22
from rich.console import Console
3+
import pkg_resources
4+
5+
__version__ = pkg_resources.get_distribution("myoquant").version
6+
__version_cellpose__ = pkg_resources.get_distribution("cellpose").version
7+
__version_stardist__ = pkg_resources.get_distribution("stardist").version
8+
__version_torch__ = pkg_resources.get_distribution("torch").version
9+
__version_tensorflow__ = pkg_resources.get_distribution("tensorflow").version
310

411
from .commands.docs import app as docs_app
512
from .commands import run_sdh, run_he, run_atp
613

714
console = Console()
815

16+
17+
def version_callback(value: bool):
18+
if value:
19+
print(
20+
f"MyoQuant Version: {__version__} \nCellpose Version: {__version_cellpose__} \nStardist Version: {__version_stardist__} \nTorch Version: {__version_torch__} \nTensorflow Version: {__version_tensorflow__}"
21+
)
22+
raise typer.Exit()
23+
24+
925
app = typer.Typer(
1026
name="MyoQuant",
1127
add_completion=False,
@@ -15,6 +31,17 @@
1531
app.add_typer(docs_app, name="docs", help="Generate documentation")
1632

1733

34+
@app.callback()
35+
def main(
36+
version: bool = typer.Option(
37+
None, "--version", callback=version_callback, is_eager=True
38+
)
39+
):
40+
"""
41+
MyoQuant Analysis Command Line Interface
42+
"""
43+
44+
1845
app.registered_commands += (
1946
run_sdh.app.registered_commands
2047
+ run_he.app.registered_commands

myoquant/src/common_func.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@ def extract_single_image(raw_image, df_props, index, erosion=None):
181181
surface_area = df_props.iloc[index, 1]
182182
cell_radius = math.sqrt(surface_area / math.pi)
183183
single_entity_mask = df_props.iloc[index, 9].copy()
184-
erosion_size = cell_radius * (
185-
erosion / 100
186-
) # Erosion in percentage of the cell radius
187184
if erosion is not None:
185+
erosion_size = cell_radius * (
186+
erosion / 100
187+
) # Erosion in percentage of the cell radius
188188
for i in range(int(erosion_size)):
189189
single_entity_mask = binary_erosion(
190190
single_entity_mask, out=single_entity_mask

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "myoquant"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
description = "MyoQuant🔬: a tool to automatically quantify pathological features in muscle fiber histology images."
55
authors = ["Corentin Meyer <[email protected]>"]
66
maintainers = ["Corentin Meyer <[email protected]>"]

0 commit comments

Comments
 (0)