histomicsui 1.4.2.dev16__py2.py3-none-any.whl → 1.4.2.dev18__py2.py3-none-any.whl

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.
histomicsui/handlers.py CHANGED
@@ -115,7 +115,7 @@ def resolveAnnotationGirderIds(event, results, data, possibleGirderIds):
115
115
  return True
116
116
 
117
117
 
118
- def process_annotations(event):
118
+ def process_annotations(event): # noqa
119
119
  """Add annotations to an image on a ``data.process`` event"""
120
120
  results = _itemFromEvent(event, 'AnnotationFile')
121
121
  if not results:
@@ -132,7 +132,16 @@ def process_annotations(event):
132
132
  logger.error('Could not load models from the database')
133
133
  return
134
134
  try:
135
- data = orjson.loads(File().open(file).read().decode())
135
+ if file['size'] > 1 * 1024 ** 3:
136
+ raise Exception('File is larger than will be read into memory.')
137
+ data = []
138
+ with File().open(file) as fptr:
139
+ while True:
140
+ chunk = fptr.read(1024 ** 2)
141
+ if not len(chunk):
142
+ break
143
+ data.append(chunk)
144
+ data = orjson.loads(b''.join(data).decode())
136
145
  except Exception:
137
146
  logger.error('Could not parse annotation file')
138
147
  raise
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: histomicsui
3
- Version: 1.4.2.dev16
3
+ Version: 1.4.2.dev18
4
4
  Summary: Organize, visualize, and analyze histology images.
5
5
  Home-page: https://github.com/DigitalSlideArchive/histomicsui
6
6
  Author: Kitware, Inc.
@@ -58,22 +58,22 @@ HistomicsUI uses large_image sources to read different image file formats. You
58
58
  .. code-block:: bash
59
59
 
60
60
  # install all sources from the main repo
61
- pip install large-image[sources] --find-links https://girder.github.io/large_image_wheels
61
+ pip install large-image[sources] --find-links https://girder.github.io/large_image_wheels
62
62
 
63
- or
63
+ or
64
64
 
65
65
  .. code-block:: bash
66
66
 
67
67
  # install openslide and tiff sources
68
- pip install large-image-source-tiff large-image-source-openslide --find-links https://girder.github.io/large_image_wheels
68
+ pip install large-image-source-tiff large-image-source-openslide --find-links https://girder.github.io/large_image_wheels
69
69
 
70
- Now install the histomicsui package, have Girder build its UI, and start the Girder server. Note that at Girder may still require an old verison of node (12.x) to build correctly.
70
+ Now install the histomicsui package, have Girder build its UI, and start the Girder server. Note that at Girder may still require an old version of node (12.x) to build correctly -- nvm can be used to manage multiple versions of node.
71
71
 
72
72
  .. code-block:: bash
73
73
 
74
74
  pip install histomicsui[analysis]
75
75
  girder build
76
- girder serve
76
+ girder serve
77
77
 
78
78
  To use Girder Worker:
79
79
 
@@ -1,6 +1,6 @@
1
1
  histomicsui/__init__.py,sha256=8l1E5_H-oq7EuHqTofieK_q3ha5MgmOuIVRCexfQFg0,17578
2
2
  histomicsui/constants.py,sha256=pgZGKPwJ2Jlgi0vmTAMlVothJZlFXccLxkT749tntqg,917
3
- histomicsui/handlers.py,sha256=0ArTQKdsnTG0EozUXCYLTWofK9VQ7ysfuZcnqQO9mF4,10002
3
+ histomicsui/handlers.py,sha256=kwnPxRoCNFL0Voh7keTJ8sngNgwpfpCv_zlUeUsMotg,10341
4
4
  histomicsui/webroot.mako,sha256=Rnwd1LfJCGVSpyaxghHMxn5e0BhU65GURHTA88UDFno,1538
5
5
  histomicsui/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  histomicsui/models/aperio.py,sha256=3oN9auRA1n715sYP78rZyrf54Fu5gb_yUVh_9tjfHSA,3259
@@ -144,10 +144,10 @@ tests/web_client_specs/metadataPlotSpec.js,sha256=RPskJXJmKMR1sUseNDPMn1vEdq31qW
144
144
  tests/web_client_specs/overviewPanelSpec.js,sha256=-gz7fKgADN_jhZpiSFrsRZ-xHyi2v0OC3oz-5sv201U,6175
145
145
  tests/web_client_specs/panelLayoutSpec.js,sha256=C2PHkOHkENp3k2DXndxsiVeo0dALyQ1ygmUQUuP0Xu0,2917
146
146
  tests/web_client_specs/pixelmapCategorySpec.js,sha256=HSKhStf5UVef3j5HrEIxhdNqg6xc_QdvgE59VV3GUxc,13890
147
- histomicsui-1.4.2.dev16.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
148
- histomicsui-1.4.2.dev16.dist-info/METADATA,sha256=xExW5sskn9vnOMI76p65K_qpALfP0DAy7NifMDXYkYg,7218
149
- histomicsui-1.4.2.dev16.dist-info/NOTICE,sha256=Fb_KGPk6UyEsqbF5nJj2J_ux2IaIqze5ljBGfTE_auE,585
150
- histomicsui-1.4.2.dev16.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
151
- histomicsui-1.4.2.dev16.dist-info/entry_points.txt,sha256=SZB5fiWiKFOr_SsVOi94gDeNlJkMDI22AFcdKqoDVfs,55
152
- histomicsui-1.4.2.dev16.dist-info/top_level.txt,sha256=X2MiOqcwTp_HroIOfkJ78GumCBLy5RxeiWkYKTdQaHc,18
153
- histomicsui-1.4.2.dev16.dist-info/RECORD,,
147
+ histomicsui-1.4.2.dev18.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
148
+ histomicsui-1.4.2.dev18.dist-info/METADATA,sha256=Y3pczqoGdUmoq1_SL6Ps8Q5rPM4Kc_AnvdEZxoS9vn0,7267
149
+ histomicsui-1.4.2.dev18.dist-info/NOTICE,sha256=Fb_KGPk6UyEsqbF5nJj2J_ux2IaIqze5ljBGfTE_auE,585
150
+ histomicsui-1.4.2.dev18.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
151
+ histomicsui-1.4.2.dev18.dist-info/entry_points.txt,sha256=SZB5fiWiKFOr_SsVOi94gDeNlJkMDI22AFcdKqoDVfs,55
152
+ histomicsui-1.4.2.dev18.dist-info/top_level.txt,sha256=X2MiOqcwTp_HroIOfkJ78GumCBLy5RxeiWkYKTdQaHc,18
153
+ histomicsui-1.4.2.dev18.dist-info/RECORD,,