fusion-tools 2.2.0__tar.gz → 2.2.1__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.
Files changed (49) hide show
  1. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/PKG-INFO +1 -1
  2. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/setup.py +1 -1
  3. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/components/segmentation.py +3 -0
  4. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/tileserver.py +5 -2
  5. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/utils/shapes.py +24 -8
  6. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools.egg-info/PKG-INFO +1 -1
  7. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/LICENSE +0 -0
  8. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/README.md +0 -0
  9. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/pyproject.toml +0 -0
  10. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/setup.cfg +0 -0
  11. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/__init__.py +0 -0
  12. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/components/__init__.py +0 -0
  13. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/components/maps.py +0 -0
  14. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/components/tools.py +0 -0
  15. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/dataset.py +0 -0
  16. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/feature_extraction.py +0 -0
  17. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/handler.py +0 -0
  18. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/utils/__init__.py +0 -0
  19. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/utils/omics.py +0 -0
  20. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/utils/stats.py +0 -0
  21. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/visualization/__init__.py +0 -0
  22. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/visualization/components.py +0 -0
  23. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools/visualization/vis_utils.py +0 -0
  24. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools.egg-info/SOURCES.txt +0 -0
  25. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools.egg-info/dependency_links.txt +0 -0
  26. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools.egg-info/requires.txt +0 -0
  27. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/src/fusion_tools.egg-info/top_level.txt +0 -0
  28. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_classification_model.py +0 -0
  29. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_custom_component.py +0 -0
  30. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_dataset_classes.py +0 -0
  31. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_extract_nested_prop.py +0 -0
  32. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_feature_annotation.py +0 -0
  33. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_feature_extraction.py +0 -0
  34. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_generate_property_dict.py +0 -0
  35. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_get_gene_info.py +0 -0
  36. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_hra_viewer.py +0 -0
  37. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_image_overlay.py +0 -0
  38. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_model_train.py +0 -0
  39. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_multiframe_rgb.py +0 -0
  40. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_multiframeslidemap.py +0 -0
  41. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_property_plotter.py +0 -0
  42. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_read_anndata.py +0 -0
  43. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_remote_slide_annotations.py +0 -0
  44. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_remote_tileserver.py +0 -0
  45. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_segmentation.py +0 -0
  46. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_slide_annotations.py +0 -0
  47. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_spatial_aggregation.py +0 -0
  48. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_tile_server.py +0 -0
  49. {fusion_tools-2.2.0 → fusion_tools-2.2.1}/tests/test_visualization_component.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fusion-tools
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Modular visualization and analysis dashboard creation for high-resolution microscopy images
5
5
  Home-page: https://github.com/spborder/fusion-tools
6
6
  Author: Sam Border
@@ -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.0",
8
+ version="2.2.1",
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
 
@@ -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 not 'properties' in geojson_anns:
73
- geojson_anns['properties'] = {}
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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fusion-tools
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Modular visualization and analysis dashboard creation for high-resolution microscopy images
5
5
  Home-page: https://github.com/spborder/fusion-tools
6
6
  Author: Sam Border
File without changes
File without changes
File without changes