fusion-tools 2.2.0__tar.gz → 2.2.2__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.
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/PKG-INFO +1 -1
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/setup.py +1 -1
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/components/segmentation.py +5 -2
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/tileserver.py +5 -2
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/utils/shapes.py +24 -8
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools.egg-info/PKG-INFO +1 -1
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/LICENSE +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/README.md +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/pyproject.toml +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/setup.cfg +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/__init__.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/components/__init__.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/components/maps.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/components/tools.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/dataset.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/feature_extraction.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/handler.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/utils/__init__.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/utils/omics.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/utils/stats.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/visualization/__init__.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/visualization/components.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools/visualization/vis_utils.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools.egg-info/SOURCES.txt +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools.egg-info/dependency_links.txt +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools.egg-info/requires.txt +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/src/fusion_tools.egg-info/top_level.txt +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_classification_model.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_custom_component.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_dataset_classes.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_extract_nested_prop.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_feature_annotation.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_feature_extraction.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_generate_property_dict.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_get_gene_info.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_hra_viewer.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_image_overlay.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_model_train.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_multiframe_rgb.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_multiframeslidemap.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_property_plotter.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_read_anndata.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_remote_slide_annotations.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_remote_tileserver.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_segmentation.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_slide_annotations.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_spatial_aggregation.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_tile_server.py +0 -0
- {fusion_tools-2.2.0 → fusion_tools-2.2.2}/tests/test_visualization_component.py +0 -0
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="fusion-tools",
|
|
8
|
-
version="2.2.
|
|
8
|
+
version="2.2.2",
|
|
9
9
|
author="Sam Border",
|
|
10
10
|
author_email="sam.border2256@gmail.com",
|
|
11
11
|
description="Modular visualization and analysis dashboard creation for high-resolution microscopy images",
|
|
@@ -1270,6 +1270,9 @@ class BulkLabels(Tool):
|
|
|
1270
1270
|
],
|
|
1271
1271
|
[
|
|
1272
1272
|
Output({'type': 'bulk-labels-add-property-div','index': ALL},'children')
|
|
1273
|
+
],
|
|
1274
|
+
[
|
|
1275
|
+
State({'type': 'bulk-labels-property-info','index': ALL},'data')
|
|
1273
1276
|
]
|
|
1274
1277
|
)(self.update_label_properties)
|
|
1275
1278
|
|
|
@@ -1723,7 +1726,7 @@ class BulkLabels(Tool):
|
|
|
1723
1726
|
|
|
1724
1727
|
properties_div = Patch()
|
|
1725
1728
|
add_click = get_pattern_matching_value(add_click)
|
|
1726
|
-
property_info = json.loads(get_pattern_matching_value(property_info))
|
|
1729
|
+
property_info = json.loads(get_pattern_matching_value(property_info))['property_info']
|
|
1727
1730
|
|
|
1728
1731
|
if 'bulk-labels-add-property-icon' in ctx.triggered_id['type']:
|
|
1729
1732
|
|
|
@@ -1785,7 +1788,7 @@ class BulkLabels(Tool):
|
|
|
1785
1788
|
if not any([i['value'] for i in ctx.triggered]):
|
|
1786
1789
|
raise exceptions.PreventUpdate
|
|
1787
1790
|
|
|
1788
|
-
property_info = json.loads(get_pattern_matching_value(property_info))
|
|
1791
|
+
property_info = json.loads(get_pattern_matching_value(property_info))['property_info']
|
|
1789
1792
|
property_values = property_info[property_value]
|
|
1790
1793
|
|
|
1791
1794
|
if 'min' in property_values:
|
|
@@ -215,11 +215,13 @@ class LocalTileServer(TileServer):
|
|
|
215
215
|
|
|
216
216
|
if image<len(self.tile_sources) and image>=0:
|
|
217
217
|
try:
|
|
218
|
+
if not style=='':
|
|
219
|
+
self.tile_sources[image] = large_image.open(self.local_image_paths[image],style=json.loads(style))
|
|
220
|
+
|
|
218
221
|
raw_tile = self.tile_sources[image].getTile(
|
|
219
222
|
x = x,
|
|
220
223
|
y = y,
|
|
221
224
|
z = z,
|
|
222
|
-
style = json.loads(style) if not style=='' else None
|
|
223
225
|
)
|
|
224
226
|
|
|
225
227
|
except large_image.exceptions.TileSourceXYZRangeError:
|
|
@@ -257,6 +259,8 @@ class LocalTileServer(TileServer):
|
|
|
257
259
|
:rtype: Response
|
|
258
260
|
"""
|
|
259
261
|
if image<len(self.tile_sources) and image>=0:
|
|
262
|
+
if not style=='':
|
|
263
|
+
self.tile_sources[image] = large_image.open(self.local_image_paths[image],style = json.loads(style))
|
|
260
264
|
image_region, mime_type = self.tile_sources[image].getRegion(
|
|
261
265
|
region = {
|
|
262
266
|
'left': left,
|
|
@@ -264,7 +268,6 @@ class LocalTileServer(TileServer):
|
|
|
264
268
|
'right': right,
|
|
265
269
|
'bottom': bottom
|
|
266
270
|
},
|
|
267
|
-
style = json.loads(style)
|
|
268
271
|
)
|
|
269
272
|
|
|
270
273
|
return Response(content = image_region, media_type = 'image/png')
|
|
@@ -66,18 +66,34 @@ def load_geojson(geojson_path: str, name:Union[str,None]=None) -> dict:
|
|
|
66
66
|
|
|
67
67
|
with open(geojson_path,'r') as f:
|
|
68
68
|
geojson_anns = json.load(f)
|
|
69
|
-
|
|
70
69
|
f.close()
|
|
70
|
+
|
|
71
|
+
print(type(geojson_anns))
|
|
72
|
+
print(len(geojson_anns))
|
|
71
73
|
|
|
72
|
-
if
|
|
73
|
-
|
|
74
|
+
if type(geojson_anns)==list:
|
|
75
|
+
for g in geojson_anns:
|
|
76
|
+
if not 'properties' in g:
|
|
77
|
+
g['properties'] = {}
|
|
78
|
+
|
|
79
|
+
geo_id = uuid.uuid4().hex[:24] if not '_id' in g['properties'] else g['properties']['_id']
|
|
80
|
+
g['properties'] = g['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
for f_idx, f in enumerate(g['features']):
|
|
84
|
+
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
85
|
+
|
|
86
|
+
elif type(geojson_anns)==dict:
|
|
87
|
+
if not 'properties' in geojson_anns:
|
|
88
|
+
geojson_anns['properties'] = {}
|
|
89
|
+
geo_id = uuid.uuid4().hex[:24] if not '_id' in g['properties'] else geojson_anns['properties']['_id']
|
|
90
|
+
geojson_anns['properties'] = geojson_anns['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
for f_idx, f in enumerate(geojson_anns['features']):
|
|
94
|
+
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
74
95
|
|
|
75
|
-
geo_id = uuid.uuid4().hex[:24] if not '_id' in geojson_anns['properties'] else geojson_anns['properties']['_id']
|
|
76
|
-
geojson_anns['properties'] = geojson_anns['properties'] | {'name': name if not name is None else geo_id, '_id': geo_id}
|
|
77
96
|
|
|
78
|
-
|
|
79
|
-
for f_idx, f in enumerate(geojson_anns['features']):
|
|
80
|
-
f['properties'] = f['properties'] | {'name': name if not name is None else geo_id, '_id': uuid.uuid4().hex[:24], '_index': f_idx}
|
|
81
97
|
|
|
82
98
|
return geojson_anns
|
|
83
99
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|