Skip to content

Commit f6e2183

Browse files
committed
Re-ordering post-processing functions
1 parent ff2d551 commit f6e2183

26 files changed

+95
-65
lines changed

flamingo_tools/measurements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from tqdm import tqdm
2323

2424
from .file_utils import read_image_data
25-
from .segmentation.postprocessing import compute_table_on_the_fly
25+
from .postprocessing.label_components import compute_table_on_the_fly
2626
import flamingo_tools.s3_utils as s3_utils
2727

2828

flamingo_tools/segmentation/cochlea_mapping.py renamed to flamingo_tools/postprocessing/cochlea_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from scipy.ndimage import distance_transform_edt, binary_dilation, binary_closing
88
from scipy.interpolate import interp1d
99

10-
from flamingo_tools.segmentation.postprocessing import downscaled_centroids
10+
from flamingo_tools.postprocessing.label_components import downscaled_centroids
1111

1212

1313
def find_most_distant_nodes(G: nx.classes.graph.Graph, weight: str = 'weight') -> Tuple[float, float]:
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
SYNAPSE_DICT = {
2+
"M_LR_000226_L": {"synapse_table_name": "synapse_v3_ihc_v4c", "ihc_table_name": "IHC_v4c"},
3+
"M_LR_000226_R": {"synapse_table_name": "synapse_v3_ihc_v4c", "ihc_table_name": "IHC_v4c"},
4+
"M_LR_000227_L": {"synapse_table_name": "synapse_v3_ihc_v4c", "ihc_table_name": "IHC_v4c"},
5+
"M_LR_000227_R": {"synapse_table_name": "synapse_v3_ihc_v4c", "ihc_table_name": "IHC_v4c"},
6+
"G_EK_000233_L": {"synapse_table_name": "synapse_v3_ihc_v6", "ihc_table_name": "IHC_v6"},
7+
"G_LR_000233_R": {"synapse_table_name": "synapse_v3_ihc_v6", "ihc_table_name": "IHC_v6"},
8+
9+
# fHC
10+
"M_AMD_N139_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
11+
"component_list": [1, 4]},
12+
"M_AMD_N139_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
13+
"component_list": [2, 5, 3]},
14+
"M_AMD_N153_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b"},
15+
"M_AMD_N153_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
16+
"component_list": [7, 1, 4]},
17+
18+
# PELCOfHC1
19+
"M_AMD_N140_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
20+
"component_list": [1, 5]},
21+
"M_AMD_N140_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b"},
22+
"M_AMD_N142_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b"},
23+
"M_AMD_N142_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
24+
"component_list": [2, 4, 3]},
25+
26+
# PELCOfHC2
27+
"M_AMD_N75_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
28+
"component_list": [1, 3]},
29+
"M_AMD_N75_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
30+
"component_list": [1, 5, 12, 4, 2, 13, 7]},
31+
"M_AMD_N129_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
32+
"component_list": [2, 5, 3, 6]},
33+
"M_AMD_N129_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
34+
"component_list": [4, 2, 6]},
35+
36+
# PELCODISCO2
37+
"M_AMD_N88_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b"},
38+
"M_AMD_N89_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
39+
"component_list": [1, 2]},
40+
41+
# PELCODISCO2
42+
"M_AMD_N95_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
43+
"component_list": [1, 4, 3, 9, 17, 2]},
44+
"M_AMD_N95_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
45+
"component_list": [8, 4, 2, 29, 6, 9, 3]},
46+
"M_AMD_N97_L": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
47+
"component_list": [2, 1, 3]},
48+
"M_AMD_N97_R": {"synapse_table_name": "synapse_v3_ihc_v4b", "ihc_table_name": "IHC_v4b",
49+
"component_list": [2, 5]},
50+
}

flamingo_tools/test_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from skimage.measure import label
1111

1212
from .file_utils import get_cache_dir
13-
from .segmentation.postprocessing import compute_table_on_the_fly
13+
from .postprocessing.label_components import compute_table_on_the_fly
1414

1515
SEGMENTATION_URL = "https://owncloud.gwdg.de/index.php/s/kwoGRYiJRRrswgw/download"
1616

reproducibility/block_extraction/repro_equidistant_centers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pandas as pd
77
from flamingo_tools.s3_utils import get_s3_path
8-
from flamingo_tools.segmentation.cochlea_mapping import equidistant_centers
8+
from flamingo_tools.postprocessing.cochlea_mapping import equidistant_centers
99

1010

1111
def repro_equidistant_centers(

reproducibility/label_components/repro_label_components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pandas as pd
77
from flamingo_tools.s3_utils import get_s3_path
8-
from flamingo_tools.segmentation.postprocessing import label_components_sgn, label_components_ihc
8+
from flamingo_tools.postprocessing.label_components import label_components_sgn, label_components_ihc
99

1010

1111
def label_custom_components(tsv_table, custom_dict):

reproducibility/tonotopic_mapping/repro_tonotopic_mapping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import pandas as pd
77
from flamingo_tools.s3_utils import get_s3_path
8-
from flamingo_tools.segmentation.cochlea_mapping import tonotopic_mapping
8+
from flamingo_tools.postprocessing.cochlea_mapping import tonotopic_mapping
99

1010

1111
def repro_tonotopic_mapping(

0 commit comments

Comments
 (0)