imaging-server-kit 0.1.3__tar.gz → 0.3.0__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 (248) hide show
  1. imaging_server_kit-0.3.0/.github/workflows/deploy.yml +53 -0
  2. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/.github/workflows/publish.yml +4 -8
  3. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/.gitignore +10 -2
  4. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/PKG-INFO +46 -36
  5. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/README.md +23 -21
  6. imaging_server_kit-0.3.0/docs/assets/extra.css +11 -0
  7. imaging_server_kit-0.3.0/docs/assets/images/napari_widget.png +0 -0
  8. imaging_server_kit-0.3.0/docs/assets/images/threshold_qubalab.png +0 -0
  9. imaging_server_kit-0.3.0/docs/assets/videos/auto_call.mp4 +0 -0
  10. imaging_server_kit-0.3.0/docs/assets/videos/cellpose_example.mp4 +0 -0
  11. imaging_server_kit-0.3.0/docs/citing.md +22 -0
  12. imaging_server_kit-0.3.0/docs/concepts/algorithms.md +65 -0
  13. imaging_server_kit-0.3.0/docs/concepts/coordinates.md +96 -0
  14. imaging_server_kit-0.3.0/docs/concepts/layers-and-stacks.md +44 -0
  15. imaging_server_kit-0.3.0/docs/developers/ai_policy.md +21 -0
  16. imaging_server_kit-0.3.0/docs/examples.md +3 -0
  17. imaging_server_kit-0.3.0/docs/getting-started/demos.md +68 -0
  18. imaging_server_kit-0.3.0/docs/getting-started/installation.md +55 -0
  19. imaging_server_kit-0.3.0/docs/hooks/redirects.py +32 -0
  20. imaging_server_kit-0.3.0/docs/how-to/combine.md +117 -0
  21. imaging_server_kit-0.3.0/docs/how-to/deploy-server.md +32 -0
  22. imaging_server_kit-0.3.0/docs/how-to/live-updates.md +81 -0
  23. imaging_server_kit-0.3.0/docs/how-to/napari.md +110 -0
  24. imaging_server_kit-0.3.0/docs/how-to/qupath.md +68 -0
  25. imaging_server_kit-0.3.0/docs/how-to/regions.md +66 -0
  26. imaging_server_kit-0.3.0/docs/how-to/tiling.md +83 -0
  27. imaging_server_kit-0.3.0/docs/index.md +83 -0
  28. imaging_server_kit-0.3.0/docs/reference/api/algorithms.md +37 -0
  29. imaging_server_kit-0.3.0/docs/reference/api/gui.md +9 -0
  30. imaging_server_kit-0.3.0/docs/reference/api/layers.md +72 -0
  31. imaging_server_kit-0.3.0/docs/reference/api/remote.md +10 -0
  32. imaging_server_kit-0.3.0/docs/reference/api/stack.md +16 -0
  33. imaging_server_kit-0.3.0/docs/reference/cli.md +15 -0
  34. imaging_server_kit-0.3.0/docs/reference/http.md +27 -0
  35. imaging_server_kit-0.3.0/docs/tutorial/create-algorithm.md +203 -0
  36. imaging_server_kit-0.3.0/docs/tutorial/python.md +145 -0
  37. imaging_server_kit-0.3.0/docs/tutorial/samples-and-metadata.md +87 -0
  38. imaging_server_kit-0.3.0/docs/tutorial/serve.md +54 -0
  39. imaging_server_kit-0.3.0/mkdocs.yml +151 -0
  40. imaging_server_kit-0.3.0/pyproject.toml +87 -0
  41. imaging_server_kit-0.3.0/src/imaging_server_kit/__init__.py +144 -0
  42. imaging_server_kit-0.3.0/src/imaging_server_kit/_version.py +24 -0
  43. imaging_server_kit-0.3.0/src/imaging_server_kit/cli.py +142 -0
  44. imaging_server_kit-0.3.0/src/imaging_server_kit/core/__init__.py +5 -0
  45. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/_etc.py +12 -49
  46. imaging_server_kit-0.3.0/src/imaging_server_kit/core/_fmt.py +37 -0
  47. imaging_server_kit-0.3.0/src/imaging_server_kit/core/_progress_display.py +97 -0
  48. imaging_server_kit-0.3.0/src/imaging_server_kit/core/algorithm.py +561 -0
  49. imaging_server_kit-0.3.0/src/imaging_server_kit/core/domain.py +216 -0
  50. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/errors.py +16 -23
  51. imaging_server_kit-0.3.0/src/imaging_server_kit/core/multialgo.py +132 -0
  52. imaging_server_kit-0.3.0/src/imaging_server_kit/core/runner.py +396 -0
  53. imaging_server_kit-0.3.0/src/imaging_server_kit/core/stack.py +357 -0
  54. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/static/css/index.css +14 -3
  55. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/static/css/info.css +0 -50
  56. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/templates/index.html +6 -1
  57. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/core/templates/info.html +30 -6
  58. imaging_server_kit-0.3.0/src/imaging_server_kit/core/tiling.py +360 -0
  59. imaging_server_kit-0.3.0/src/imaging_server_kit/demo/__init__.py +35 -0
  60. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/demo/examples.py +99 -104
  61. imaging_server_kit-0.3.0/src/imaging_server_kit/demo/tools.py +751 -0
  62. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/__init__.py +2 -0
  63. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/common/__init__.py +3 -0
  64. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/common/parameter_panel.py +156 -0
  65. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/common/runner_widget.py +167 -0
  66. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/common/task_manager.py +45 -0
  67. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/__init__.py +98 -0
  68. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/extra_widgets.py +19 -0
  69. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/napari.yaml +31 -0
  70. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/napari_http_widget.py +8 -0
  71. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/napari_stack.py +330 -0
  72. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/napari_serverkit/napari_widget.py +267 -0
  73. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/qupath_serverkit/__init__.py +112 -0
  74. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/qupath_serverkit/qupath_bridge.py +480 -0
  75. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/qupath_serverkit/qupath_http_widget.py +8 -0
  76. imaging_server_kit-0.3.0/src/imaging_server_kit/gui/qupath_serverkit/qupath_widget.py +315 -0
  77. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/__init__.py +1 -0
  78. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/_image_merger.py +81 -0
  79. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/_mask_merger.py +336 -0
  80. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/_object_merger.py +80 -0
  81. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/common.py +74 -0
  82. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/layer_merger.py +129 -0
  83. imaging_server_kit-0.3.0/src/imaging_server_kit/merge/merger.py +32 -0
  84. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/__init__.py +44 -0
  85. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_any_serializer.py +65 -0
  86. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_boxes_serializer.py +48 -0
  87. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_image_serializer.py +23 -0
  88. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_mask_serializer.py +26 -0
  89. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_null_serializer.py +18 -0
  90. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_paths_serializer.py +32 -0
  91. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_points_serializer.py +50 -0
  92. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_tracks_serializer.py +24 -0
  93. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/_vectors_serializer.py +53 -0
  94. {imaging_server_kit-0.1.3/src/imaging_server_kit/core → imaging_server_kit-0.3.0/src/imaging_server_kit/remote}/app.py +88 -159
  95. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/client.py +210 -0
  96. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/encoding.py +64 -0
  97. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/layer_serializer.py +70 -0
  98. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/meta_serializer.py +48 -0
  99. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/serializer.py +37 -0
  100. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/stack_serializer.py +16 -0
  101. imaging_server_kit-0.3.0/src/imaging_server_kit/remote/tile_serializer.py +20 -0
  102. imaging_server_kit-0.3.0/src/imaging_server_kit/skills/isk-napari-qupath-gui/SKILL.md +64 -0
  103. imaging_server_kit-0.3.0/src/imaging_server_kit/skills/isk-write-algorithm/SKILL.md +89 -0
  104. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/types/__init__.py +21 -4
  105. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_any.py +46 -0
  106. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_bool.py +43 -0
  107. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_boxes.py +154 -0
  108. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_choice.py +70 -0
  109. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_float.py +68 -0
  110. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_image.py +171 -0
  111. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_integer.py +68 -0
  112. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_mask.py +382 -0
  113. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_notification.py +55 -0
  114. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_null.py +39 -0
  115. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_paths.py +71 -0
  116. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_points.py +153 -0
  117. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_progress.py +60 -0
  118. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_string.py +39 -0
  119. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_tracks.py +77 -0
  120. imaging_server_kit-0.3.0/src/imaging_server_kit/types/_vectors.py +162 -0
  121. imaging_server_kit-0.3.0/src/imaging_server_kit/types/common.py +119 -0
  122. imaging_server_kit-0.3.0/src/imaging_server_kit/types/layer.py +359 -0
  123. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/__init__.py +0 -0
  124. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/_boxes_validator.py +30 -0
  125. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/_image_validator.py +33 -0
  126. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/_mask_validator.py +28 -0
  127. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/_points_validator.py +23 -0
  128. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/_vectors_validator.py +21 -0
  129. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/layer_validator.py +31 -0
  130. imaging_server_kit-0.3.0/src/imaging_server_kit/validation/validator.py +22 -0
  131. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit.egg-info/PKG-INFO +46 -36
  132. imaging_server_kit-0.3.0/src/imaging_server_kit.egg-info/SOURCES.txt +180 -0
  133. imaging_server_kit-0.3.0/src/imaging_server_kit.egg-info/entry_points.txt +5 -0
  134. imaging_server_kit-0.3.0/src/imaging_server_kit.egg-info/requires.txt +42 -0
  135. imaging_server_kit-0.3.0/src/imaging_server_kit.egg-info/scm_file_list.json +175 -0
  136. imaging_server_kit-0.3.0/src/imaging_server_kit.egg-info/scm_version.json +8 -0
  137. {imaging_server_kit-0.1.3/tests → imaging_server_kit-0.3.0/tests/core}/test_basic.py +42 -8
  138. imaging_server_kit-0.3.0/tests/core/test_description.py +38 -0
  139. imaging_server_kit-0.3.0/tests/core/test_errors.py +58 -0
  140. imaging_server_kit-0.3.0/tests/core/test_indexing.py +135 -0
  141. imaging_server_kit-0.3.0/tests/core/test_repr.py +97 -0
  142. imaging_server_kit-0.3.0/tests/core/test_results.py +35 -0
  143. {imaging_server_kit-0.1.3/tests → imaging_server_kit-0.3.0/tests/core}/test_streaming.py +36 -2
  144. imaging_server_kit-0.3.0/tests/core/test_tiled_runs.py +431 -0
  145. imaging_server_kit-0.3.0/tests/core/test_tiling.py +393 -0
  146. imaging_server_kit-0.3.0/tests/demo/test_examples.py +204 -0
  147. imaging_server_kit-0.3.0/tests/demo/test_tools.py +397 -0
  148. imaging_server_kit-0.3.0/tests/gui/test_napari_stack.py +41 -0
  149. imaging_server_kit-0.3.0/tests/merge/test_merging.py +32 -0
  150. imaging_server_kit-0.3.0/tests/remote/test_app.py +157 -0
  151. imaging_server_kit-0.3.0/tests/remote/test_client_server.py +153 -0
  152. imaging_server_kit-0.3.0/tests/remote/test_serialization.py +160 -0
  153. imaging_server_kit-0.3.0/tests/test_cli.py +33 -0
  154. imaging_server_kit-0.3.0/tests/test_docs.py +39 -0
  155. imaging_server_kit-0.3.0/tests/types/test_mask.py +118 -0
  156. imaging_server_kit-0.3.0/uv.lock +10878 -0
  157. imaging_server_kit-0.1.3/.dockerignore +0 -2
  158. imaging_server_kit-0.1.3/.github/workflows/deploy.yml +0 -40
  159. imaging_server_kit-0.1.3/Dockerfile +0 -15
  160. imaging_server_kit-0.1.3/Dockerfile-GPU +0 -14
  161. imaging_server_kit-0.1.3/build.sh +0 -6
  162. imaging_server_kit-0.1.3/docs/_config.yml +0 -26
  163. imaging_server_kit-0.1.3/docs/_static/stardist_blobs.mp4 +0 -0
  164. imaging_server_kit-0.1.3/docs/_toc.yml +0 -15
  165. imaging_server_kit-0.1.3/docs/assets/threshold_qupath.png +0 -0
  166. imaging_server_kit-0.1.3/docs/index.md +0 -99
  167. imaging_server_kit-0.1.3/docs/sections/00_getting_started.md +0 -77
  168. imaging_server_kit-0.1.3/docs/sections/01_algorithm.ipynb +0 -424
  169. imaging_server_kit-0.1.3/docs/sections/02_samples.ipynb +0 -106
  170. imaging_server_kit-0.1.3/docs/sections/03_metadata.ipynb +0 -101
  171. imaging_server_kit-0.1.3/docs/sections/04_multialgo.ipynb +0 -114
  172. imaging_server_kit-0.1.3/docs/sections/05_streams.ipynb +0 -147
  173. imaging_server_kit-0.1.3/docs/sections/06_tiled.ipynb +0 -110
  174. imaging_server_kit-0.1.3/docs/sections/07_server.md +0 -61
  175. imaging_server_kit-0.1.3/docs/sections/08_python.ipynb +0 -407
  176. imaging_server_kit-0.1.3/docs/sections/09_docker.md +0 -57
  177. imaging_server_kit-0.1.3/docs/sections/10_types.md +0 -22
  178. imaging_server_kit-0.1.3/docs/sections/11_examples.md +0 -3
  179. imaging_server_kit-0.1.3/pyproject.toml +0 -80
  180. imaging_server_kit-0.1.3/src/imaging_server_kit/__init__.py +0 -165
  181. imaging_server_kit-0.1.3/src/imaging_server_kit/_version.py +0 -34
  182. imaging_server_kit-0.1.3/src/imaging_server_kit/cli.py +0 -65
  183. imaging_server_kit-0.1.3/src/imaging_server_kit/core/__init__.py +0 -14
  184. imaging_server_kit-0.1.3/src/imaging_server_kit/core/algorithm.py +0 -460
  185. imaging_server_kit-0.1.3/src/imaging_server_kit/core/client.py +0 -231
  186. imaging_server_kit-0.1.3/src/imaging_server_kit/core/encoding.py +0 -46
  187. imaging_server_kit-0.1.3/src/imaging_server_kit/core/multialgo.py +0 -113
  188. imaging_server_kit-0.1.3/src/imaging_server_kit/core/results.py +0 -261
  189. imaging_server_kit-0.1.3/src/imaging_server_kit/core/runner.py +0 -219
  190. imaging_server_kit-0.1.3/src/imaging_server_kit/core/serialization.py +0 -70
  191. imaging_server_kit-0.1.3/src/imaging_server_kit/core/tiling.py +0 -146
  192. imaging_server_kit-0.1.3/src/imaging_server_kit/demo/__init__.py +0 -15
  193. imaging_server_kit-0.1.3/src/imaging_server_kit/template/cookiecutter.json +0 -5
  194. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/.dockerignore +0 -1
  195. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/.gitignore +0 -26
  196. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/Dockerfile +0 -15
  197. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/README.md +0 -34
  198. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/docker-compose.yml +0 -6
  199. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/main.py +0 -41
  200. imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/requirements.txt +0 -1
  201. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_bool.py +0 -46
  202. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_boxes.py +0 -185
  203. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_choice.py +0 -61
  204. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_float.py +0 -59
  205. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_image.py +0 -135
  206. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_integer.py +0 -60
  207. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_mask.py +0 -287
  208. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_notification.py +0 -57
  209. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_null.py +0 -45
  210. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_paths.py +0 -82
  211. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_points.py +0 -202
  212. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_string.py +0 -46
  213. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_tracks.py +0 -73
  214. imaging_server_kit-0.1.3/src/imaging_server_kit/types/_vectors.py +0 -194
  215. imaging_server_kit-0.1.3/src/imaging_server_kit/types/common.py +0 -49
  216. imaging_server_kit-0.1.3/src/imaging_server_kit/types/data_layer.py +0 -120
  217. imaging_server_kit-0.1.3/src/imaging_server_kit.egg-info/SOURCES.txt +0 -106
  218. imaging_server_kit-0.1.3/src/imaging_server_kit.egg-info/entry_points.txt +0 -2
  219. imaging_server_kit-0.1.3/src/imaging_server_kit.egg-info/requires.txt +0 -26
  220. imaging_server_kit-0.1.3/tests/sample_images/blobs.tif +0 -0
  221. imaging_server_kit-0.1.3/tests/test_results.py +0 -32
  222. imaging_server_kit-0.1.3/tests/test_tiling.py +0 -144
  223. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/.gitattributes +0 -0
  224. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/CITATION.cff +0 -0
  225. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/LICENSE +0 -0
  226. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/MANIFEST.in +0 -0
  227. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/demo_napari_screenshot.png +0 -0
  228. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/gaussian_result.png +0 -0
  229. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/meta_sc.png +0 -0
  230. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/samples_sc.png +0 -0
  231. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/screenshot_napari_threshold.png +0 -0
  232. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/screenshot_server.png +0 -0
  233. {imaging_server_kit-0.1.3/docs/assets → imaging_server_kit-0.3.0/docs/assets/images}/server_running.png +0 -0
  234. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/oripy_threshold.mp4 +0 -0
  235. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/progressive_threshold.mp4 +0 -0
  236. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/server_napari.mp4 +0 -0
  237. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/tiles.mp4 +0 -0
  238. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/tiling2.mp4 +0 -0
  239. {imaging_server_kit-0.1.3/docs/_static → imaging_server_kit-0.3.0/docs/assets/videos}/yolo-stream.mp4 +0 -0
  240. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/docs/logo.ico +0 -0
  241. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/examples/readme.md +0 -0
  242. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/setup.cfg +0 -0
  243. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/demo/sample_images/blobs.tif +0 -0
  244. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit/demo/sample_images/tracks.tif +0 -0
  245. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit.egg-info/dependency_links.txt +0 -0
  246. {imaging_server_kit-0.1.3 → imaging_server_kit-0.3.0}/src/imaging_server_kit.egg-info/top_level.txt +0 -0
  247. {imaging_server_kit-0.1.3/tests → imaging_server_kit-0.3.0/tests/core}/test_multialgo.py +0 -0
  248. {imaging_server_kit-0.1.3/src/imaging_server_kit/template/serverkit-{{cookiecutter.name}}/samples → imaging_server_kit-0.3.0/tests/sample_images}/blobs.tif +0 -0
@@ -0,0 +1,53 @@
1
+ name: Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+ pages: write
12
+ id-token: write
13
+
14
+ concurrency:
15
+ group: docs-${{ github.ref }}
16
+ cancel-in-progress: true
17
+
18
+ jobs:
19
+ build:
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+
24
+ - name: Set up Python 3.11
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: '3.11'
28
+ cache: pip
29
+ cache-dependency-path: pyproject.toml
30
+
31
+ - name: Install dependencies
32
+ run: pip install ".[docs]"
33
+
34
+ - name: Build the docs
35
+ run: mkdocs build --strict
36
+
37
+ - name: Upload artifact
38
+ if: github.event_name == 'push'
39
+ uses: actions/upload-pages-artifact@v3
40
+ with:
41
+ path: site
42
+
43
+ deploy:
44
+ if: github.event_name == 'push'
45
+ needs: build
46
+ runs-on: ubuntu-latest
47
+ environment:
48
+ name: github-pages
49
+ url: ${{ steps.deployment.outputs.page_url }}
50
+ steps:
51
+ - name: Deploy to GitHub Pages
52
+ id: deployment
53
+ uses: actions/deploy-pages@v4
@@ -1,17 +1,16 @@
1
- # Build the package and publish it to PyPI on tag push.
2
1
  name: Publish to PyPI
3
2
  on:
4
3
  push:
5
4
  tags:
6
5
  - "v*"
7
6
 
8
- permissions:
9
- contents: write
10
-
11
7
  jobs:
12
8
  publish:
13
9
  name: publish
14
10
  runs-on: ubuntu-latest
11
+ environment: pypi
12
+ permissions:
13
+ id-token: write
15
14
  steps:
16
15
  - name: Checkout source
17
16
  uses: actions/checkout@v4
@@ -24,10 +23,7 @@ jobs:
24
23
  python -m pip install -U pip build
25
24
  python -m build
26
25
  - name: Publish
27
- uses: pypa/gh-action-pypi-publish@v1.5.0
28
- with:
29
- user: __token__
30
- password: ${{ secrets.TWINE_API_KEY }}
26
+ uses: pypa/gh-action-pypi-publish@v1.13.0
31
27
  - name: Create Release
32
28
  env:
33
29
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -2,6 +2,7 @@ __pycache__/
2
2
  *.py[cod]
3
3
  *$py.class
4
4
  old/
5
+ tmp/
5
6
  data/
6
7
  env/
7
8
  build/
@@ -16,7 +17,7 @@ eggs/
16
17
  .coverage
17
18
  .coverage.*
18
19
  .cache
19
- docs/_build/
20
+ site/
20
21
  .idea/
21
22
  venv/
22
23
  .vscode/
@@ -26,4 +27,11 @@ venv/
26
27
  **/_version.py
27
28
 
28
29
  push.sh
29
- todo.txt
30
+ todo.txt
31
+ release.md
32
+ TODO.md
33
+ AGENTS.md
34
+ CLAUDE.md
35
+ .claude/
36
+ summary.md
37
+ docs_missing.md
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: imaging-server-kit
3
- Version: 0.1.3
3
+ Version: 0.3.0
4
4
  Summary: Convert image processing functions to GUIs, FastAPI servers, and more.
5
5
  Author-email: Mallory Wittwer <mallory.wittwer@epfl.ch>
6
6
  License: Copyright (c) 2024, EPFL
@@ -33,67 +33,78 @@ License: Copyright (c) 2024, EPFL
33
33
 
34
34
  Project-URL: repository, https://github.com/Imaging-Server-Kit/imaging-server-kit
35
35
  Project-URL: documentation, https://imaging-server-kit.github.io/imaging-server-kit
36
- Classifier: Development Status :: 2 - Pre-Alpha
37
- Classifier: Intended Audience :: Developers
38
36
  Classifier: License :: OSI Approved :: BSD License
39
- Classifier: Operating System :: OS Independent
40
37
  Classifier: Programming Language :: Python
41
38
  Classifier: Programming Language :: Python :: 3
42
- Classifier: Programming Language :: Python :: 3 :: Only
43
- Classifier: Programming Language :: Python :: 3.9
44
39
  Classifier: Programming Language :: Python :: 3.10
45
40
  Classifier: Programming Language :: Python :: 3.11
46
41
  Classifier: Programming Language :: Python :: 3.12
42
+ Classifier: Programming Language :: Python :: 3.13
47
43
  Classifier: Topic :: Scientific/Engineering :: Image Processing
48
- Requires-Python: >=3.9
44
+ Requires-Python: >=3.10
49
45
  Description-Content-Type: text/markdown
50
46
  License-File: LICENSE
51
47
  Requires-Dist: numpy
48
+ Requires-Dist: pandas
52
49
  Requires-Dist: tifffile
53
- Requires-Dist: tqdm
50
+ Requires-Dist: rich
54
51
  Requires-Dist: pydantic>=2.0
55
52
  Requires-Dist: scikit-image[optional]
56
53
  Requires-Dist: jinja2
57
54
  Requires-Dist: PyYAML
58
- Requires-Dist: cookiecutter
59
- Requires-Dist: opencv-contrib-python-headless
60
- Requires-Dist: imantics
55
+ Requires-Dist: rasterio
56
+ Requires-Dist: shapely>=2.0
61
57
  Requires-Dist: geojson
62
58
  Requires-Dist: fastapi
63
59
  Requires-Dist: uvicorn[standard]
64
60
  Requires-Dist: python-multipart
65
61
  Requires-Dist: msgpack
66
- Requires-Dist: httpx
62
+ Requires-Dist: networkx
63
+ Provides-Extra: napari
64
+ Requires-Dist: qtpy; extra == "napari"
65
+ Requires-Dist: napari[all]>=0.4.16; extra == "napari"
66
+ Requires-Dist: napari-toolkit; extra == "napari"
67
+ Requires-Dist: opencv-contrib-python-headless; extra == "napari"
68
+ Provides-Extra: qupath
69
+ Requires-Dist: imaging-server-kit[napari]; extra == "qupath"
70
+ Requires-Dist: qubalab>=0.2.0; python_version >= "3.11" and extra == "qupath"
67
71
  Provides-Extra: docs
68
- Requires-Dist: jupyter-book<2.0; extra == "docs"
69
- Requires-Dist: jupytext; extra == "docs"
72
+ Requires-Dist: mkdocs<2,>=1.6; extra == "docs"
73
+ Requires-Dist: mkdocs-material>=9.5; extra == "docs"
74
+ Requires-Dist: mkdocstrings[python]>=0.26; extra == "docs"
75
+ Requires-Dist: ruff; extra == "docs"
70
76
  Provides-Extra: test
71
77
  Requires-Dist: pytest; extra == "test"
78
+ Requires-Dist: coverage; extra == "test"
79
+ Requires-Dist: httpx2; extra == "test"
72
80
  Provides-Extra: all
73
- Requires-Dist: imaging-server-kit[docs,test]; extra == "all"
81
+ Requires-Dist: imaging-server-kit[docs,napari,qupath,test]; extra == "all"
74
82
  Dynamic: license-file
75
83
 
76
- ![EPFL Center for Imaging logo](https://imaging.epfl.ch/resources/logo-for-gitlab.svg)
77
84
  # 🪐 Imaging Server Kit
78
85
 
79
86
  Turn Python-based image processing workflows into **algorithms** that gain extra functionalities.
80
87
 
81
- - [**Turn your algorithms into web servers**](https://imaging-server-kit.github.io/imaging-server-kit/sections/07_server.html) and run computations from [QuPath](https://github.com/Imaging-Server-Kit/qupath-extension-serverkit), [Napari](https://github.com/Imaging-Server-Kit/napari-serverkit), or [Python](./sections/08_python) via HTTP requests.
88
+ - [**Turn your algorithms into web servers**](https://imaging-server-kit.github.io/imaging-server-kit/tutorial/serve.html) and run computations from [Napari](https://napari.org/stable/), [QuPath](https://qupath.github.io/), or [Python](https://imaging-server-kit.github.io/imaging-server-kit/tutorial/python.html) via HTTP requests.
82
89
 
83
- https://github.com/user-attachments/assets/36bda69d-996e-4240-9a53-7e76d9ea3894
90
+ https://github.com/user-attachments/assets/0be819ea-fcc1-48ee-8fae-7265e63a00d4
84
91
 
85
- - [**Generate dock widgets**](https://imaging-server-kit.github.io/imaging-server-kit/sections/01_algorithm.html) to run your algorithms interactively in Napari.
92
+ - [**Generate dock widgets**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/napari.html) to run your algorithms interactively in Napari or QuPath.
86
93
 
87
94
  https://github.com/user-attachments/assets/1ff572f7-f159-4f5a-afd4-7a157de3d9f8
88
95
 
89
- - Run your algorithms [**tile-by-tile**](https://imaging-server-kit.github.io/imaging-server-kit/sections/06_tiled.html) on the input data.
96
+ - Run your algorithms [**tile-by-tile**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/tiling.html) on the input data.
90
97
 
91
98
  https://github.com/user-attachments/assets/47c2f734-5683-49d9-8aea-388c3a2bc16d
92
99
 
93
- - [**Stream results**](https://imaging-server-kit.github.io/imaging-server-kit/sections/05_streams.html) to inspect them in real-time.
100
+ - [**Stream results**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/live-updates.html) to inspect them in real-time.
94
101
 
95
102
  https://github.com/user-attachments/assets/a3f69a9f-fb68-4580-a804-6c57d5807b9a
96
103
 
104
+ ## Development status
105
+
106
+ The Imaging Server Kit is being actively developed and is iterating rapidly. It is likely that there will be **compatibility-breaking changes** in future versions.
107
+
97
108
  ## Installation
98
109
 
99
110
  Install the `imaging-server-kit` package with `pip`:
@@ -110,6 +121,18 @@ cd imaging-server-kit
110
121
  pip install -e .
111
122
  ```
112
123
 
124
+ To use the **Napari-related functionalities**, you additionally have to install [`napari`](https://github.com/napari/napari) and [`napari-toolkit`](https://github.com/MIC-DKFZ/napari_toolkit) which are not included by default. Install the package with:
125
+
126
+ ```sh
127
+ pip install "imaging-server-kit[napari]"
128
+ ```
129
+
130
+ To use the **QuPath-related functionalities**, you additionally have to install [`qubalab>=0.2.0`](https://pypi.org/project/qubalab/#history), which is not included by default. Install the package with:
131
+
132
+ ```sh
133
+ pip install "imaging-server-kit[qupath]"
134
+ ```
135
+
113
136
  ## Getting started
114
137
 
115
138
  The documentation is available on [this page](https://imaging-server-kit.github.io/imaging-server-kit).
@@ -128,22 +151,9 @@ If you encounter any problems, please file an issue along with a detailed descri
128
151
 
129
152
  ## Citing
130
153
 
131
- [![DOI](https://zenodo.org/badge/912741131.svg)](https://doi.org/10.5281/zenodo.15673151)
132
-
133
- If you use the Imaging Server Kit in the context of scientific publication, you can cite it as below.
134
-
135
- BibTeX:
154
+ If you use *Imaging Server Kit* in the context of scientific publication, you can cite it from the Zenodo repository:
136
155
 
137
- ```
138
- @software{mallory_wittwer_2025_15673152,
139
- author = {Mallory Wittwer and Edward Andò and Maud Barthélemy and Florian Aymanns},
140
- title = {Imaging-Server-Kit/imaging-server-kit: v0.0.14},
141
- url = {https://doi.org/10.5281/zenodo.15673152},
142
- doi = {10.5281/zenodo.15673152},
143
- version = {v0.0.14},
144
- year = 2025,
145
- }
146
- ```
156
+ [![DOI](https://zenodo.org/badge/912741131.svg)](https://doi.org/10.5281/zenodo.15673151)
147
157
 
148
158
  ## Acknowledgements
149
159
 
@@ -1,24 +1,27 @@
1
- ![EPFL Center for Imaging logo](https://imaging.epfl.ch/resources/logo-for-gitlab.svg)
2
1
  # 🪐 Imaging Server Kit
3
2
 
4
3
  Turn Python-based image processing workflows into **algorithms** that gain extra functionalities.
5
4
 
6
- - [**Turn your algorithms into web servers**](https://imaging-server-kit.github.io/imaging-server-kit/sections/07_server.html) and run computations from [QuPath](https://github.com/Imaging-Server-Kit/qupath-extension-serverkit), [Napari](https://github.com/Imaging-Server-Kit/napari-serverkit), or [Python](./sections/08_python) via HTTP requests.
5
+ - [**Turn your algorithms into web servers**](https://imaging-server-kit.github.io/imaging-server-kit/tutorial/serve.html) and run computations from [Napari](https://napari.org/stable/), [QuPath](https://qupath.github.io/), or [Python](https://imaging-server-kit.github.io/imaging-server-kit/tutorial/python.html) via HTTP requests.
7
6
 
8
- https://github.com/user-attachments/assets/36bda69d-996e-4240-9a53-7e76d9ea3894
7
+ https://github.com/user-attachments/assets/0be819ea-fcc1-48ee-8fae-7265e63a00d4
9
8
 
10
- - [**Generate dock widgets**](https://imaging-server-kit.github.io/imaging-server-kit/sections/01_algorithm.html) to run your algorithms interactively in Napari.
9
+ - [**Generate dock widgets**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/napari.html) to run your algorithms interactively in Napari or QuPath.
11
10
 
12
11
  https://github.com/user-attachments/assets/1ff572f7-f159-4f5a-afd4-7a157de3d9f8
13
12
 
14
- - Run your algorithms [**tile-by-tile**](https://imaging-server-kit.github.io/imaging-server-kit/sections/06_tiled.html) on the input data.
13
+ - Run your algorithms [**tile-by-tile**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/tiling.html) on the input data.
15
14
 
16
15
  https://github.com/user-attachments/assets/47c2f734-5683-49d9-8aea-388c3a2bc16d
17
16
 
18
- - [**Stream results**](https://imaging-server-kit.github.io/imaging-server-kit/sections/05_streams.html) to inspect them in real-time.
17
+ - [**Stream results**](https://imaging-server-kit.github.io/imaging-server-kit/how-to/live-updates.html) to inspect them in real-time.
19
18
 
20
19
  https://github.com/user-attachments/assets/a3f69a9f-fb68-4580-a804-6c57d5807b9a
21
20
 
21
+ ## Development status
22
+
23
+ The Imaging Server Kit is being actively developed and is iterating rapidly. It is likely that there will be **compatibility-breaking changes** in future versions.
24
+
22
25
  ## Installation
23
26
 
24
27
  Install the `imaging-server-kit` package with `pip`:
@@ -35,6 +38,18 @@ cd imaging-server-kit
35
38
  pip install -e .
36
39
  ```
37
40
 
41
+ To use the **Napari-related functionalities**, you additionally have to install [`napari`](https://github.com/napari/napari) and [`napari-toolkit`](https://github.com/MIC-DKFZ/napari_toolkit) which are not included by default. Install the package with:
42
+
43
+ ```sh
44
+ pip install "imaging-server-kit[napari]"
45
+ ```
46
+
47
+ To use the **QuPath-related functionalities**, you additionally have to install [`qubalab>=0.2.0`](https://pypi.org/project/qubalab/#history), which is not included by default. Install the package with:
48
+
49
+ ```sh
50
+ pip install "imaging-server-kit[qupath]"
51
+ ```
52
+
38
53
  ## Getting started
39
54
 
40
55
  The documentation is available on [this page](https://imaging-server-kit.github.io/imaging-server-kit).
@@ -53,22 +68,9 @@ If you encounter any problems, please file an issue along with a detailed descri
53
68
 
54
69
  ## Citing
55
70
 
56
- [![DOI](https://zenodo.org/badge/912741131.svg)](https://doi.org/10.5281/zenodo.15673151)
57
-
58
- If you use the Imaging Server Kit in the context of scientific publication, you can cite it as below.
59
-
60
- BibTeX:
71
+ If you use *Imaging Server Kit* in the context of scientific publication, you can cite it from the Zenodo repository:
61
72
 
62
- ```
63
- @software{mallory_wittwer_2025_15673152,
64
- author = {Mallory Wittwer and Edward Andò and Maud Barthélemy and Florian Aymanns},
65
- title = {Imaging-Server-Kit/imaging-server-kit: v0.0.14},
66
- url = {https://doi.org/10.5281/zenodo.15673152},
67
- doi = {10.5281/zenodo.15673152},
68
- version = {v0.0.14},
69
- year = 2025,
70
- }
71
- ```
73
+ [![DOI](https://zenodo.org/badge/912741131.svg)](https://doi.org/10.5281/zenodo.15673151)
72
74
 
73
75
  ## Acknowledgements
74
76
 
@@ -0,0 +1,11 @@
1
+ /* Videos scale with their container (content area or grid card). */
2
+ .md-typeset video {
3
+ display: block;
4
+ max-width: 100%;
5
+ height: auto;
6
+ border-radius: 0.2rem;
7
+ }
8
+
9
+ .md-typeset .grid.cards video {
10
+ margin-top: 0.6rem;
11
+ }
@@ -0,0 +1,22 @@
1
+ # Citing
2
+
3
+ If you use *Imaging Server Kit* in a scientific publication, please cite it using its Zenodo record:
4
+
5
+ [![DOI](https://zenodo.org/badge/912741131.svg)](https://doi.org/10.5281/zenodo.15673151)
6
+
7
+ The DOI [10.5281/zenodo.15673151](https://doi.org/10.5281/zenodo.15673151) always resolves to the latest version. Zenodo also provides citations for specific versions, in several formats including BibTeX.
8
+
9
+ For example, for version 0.0.14:
10
+
11
+ ```bibtex
12
+ @software{mallory_wittwer_2025_15673152,
13
+ author = {Mallory Wittwer and Edward Andò and Maud Barthélemy and Florian Aymanns},
14
+ title = {Imaging-Server-Kit/imaging-server-kit: v0.0.14},
15
+ url = {https://doi.org/10.5281/zenodo.15673152},
16
+ doi = {10.5281/zenodo.15673152},
17
+ version = {v0.0.14},
18
+ year = 2025,
19
+ }
20
+ ```
21
+
22
+ The repository also contains a [`CITATION.cff`](https://github.com/Imaging-Server-Kit/imaging-server-kit/blob/main/CITATION.cff) file.
@@ -0,0 +1,65 @@
1
+ # Algorithms
2
+
3
+ ## Algorithms
4
+
5
+ An **algorithm** (`sk.Algorithm`) wraps a Python function together with a description of its inputs and outputs. It is usually created with the `@sk.algorithm` decorator.
6
+
7
+ From the function signature and the annotations, the algorithm knows:
8
+
9
+ - Which [data layer](layers-and-stacks.md) corresponds to each parameter the function takes.
10
+ - How to interpret the **outputs** of the function as data layers.
11
+ - Extra information (samples, name, description, compatibility with tiling, etc.).
12
+
13
+ This representation is what allows the package to generate user interfaces, documentation pages, and web APIs for the algorithm without extra code.
14
+
15
+ ### Matching parameters with data layers
16
+
17
+ Each parameter of the function is matched with a data layer. The layer is chosen from the first of these sources that applies:
18
+
19
+ 1. **Explicit annotations** in `parameters={}`, for example `parameters={"sigma": sk.Float(min=0)}`.
20
+ 2. **Type hints**: `int`, `float`, `bool`, `str`, data layer classes such as `sk.Image`, or `np.ndarray` (interpreted as an image).
21
+ 3. **Default values**: a data layer instance (for example `sigma=sk.Float(default=1.0)`), or a value whose type is used as in type hints (for example `sigma=1.0` gives an `sk.Float`).
22
+ 4. **Variable names**, for parameters without a type hint or default value: `image`, `mask`, `points`, `vectors`, `boxes`, `paths`, and `tracks` are matched with the corresponding data layer.
23
+
24
+ Parameters that cannot be resolved, for example custom classes, lists, or dictionaries, become `sk.Any` layers. They are not shown in user interfaces, and they may not work with servers if they cannot be serialized.
25
+
26
+ ### Matching outputs with data layers
27
+
28
+ The values returned (or [yielded](../how-to/live-updates.md)) by the function are converted to data layers:
29
+
30
+ - Data layers, such as `sk.Mask(mask)`, are used as they are.
31
+ - Values of simple types (`int`, `float`, `bool`, `str`, `np.ndarray`, and `None`) are converted to the matching layer. A NumPy array becomes an `sk.Image`.
32
+ - A tuple or a list is treated as several outputs, each converted separately.
33
+ - Any other value becomes an `sk.Any` layer.
34
+
35
+ Wrapping outputs in data layers explicitly is recommended for arrays, since only the data layer tells whether an array is an image, a mask, or a set of points.
36
+
37
+ ## Algorithm collections
38
+
39
+ An **algorithm collection** (`sk.MultiAlgorithm`) groups several algorithms under one name. It is created with [`sk.combine`](../how-to/combine.md). In user interfaces, the algorithms of a collection appear in a single dropdown. In Python, methods take an extra `algorithm` argument to select an algorithm by name.
40
+
41
+ ## Clients
42
+
43
+ A **client** (`sk.Client`) is connected to an [algorithm server](../tutorial/serve.md). It gives access to the algorithms of the server, and sends the computations to the server when it runs them.
44
+
45
+ ## Shared interface
46
+
47
+ Algorithms, collections, and clients share the same interface, defined by the `AlgorithmRunner` base class:
48
+
49
+ | Method | Description |
50
+ |---|---|
51
+ | `run()` | Run an algorithm and return a [`Stack`](layers-and-stacks.md) of results. Supports [tiling](../how-to/tiling.md) and [regions](../how-to/regions.md). |
52
+ | `get_sample()` | Get a sample as a `Stack` of parameters. |
53
+ | `get_n_samples()` | Get the number of samples. |
54
+ | `info()` | Open the documentation page in a web browser. |
55
+ | `get_parameters()` | Get the parameters schema. |
56
+ | `algorithms` | The list of available algorithm names. |
57
+
58
+ As a result, the same code works on a local algorithm, an algorithm collection, or a remote server, and the same Napari widget works for all three via `sk.to_napari`.
59
+
60
+ ```python
61
+ # All three work the same way:
62
+ results = threshold_algo.run(image, threshold=100)
63
+ results = multi_algo.run(image, algorithm="threshold", threshold=100)
64
+ results = sk.Client("http://localhost:8000").run(image, threshold=100)
65
+ ```
@@ -0,0 +1,96 @@
1
+ # Pixel space
2
+
3
+ ## Coordinates
4
+
5
+ Spatial layers (images, masks, points, etc.) have a `position`, which places them in **global pixel coordinates**. A layer's data is expressed in *local* coordinates, and `position` is the offset that translates them to global coordinates.
6
+
7
+ For example, an image cropped from a larger image keeps track of where the crop came from: its data starts at index `(0, 0)`, while its `position` records where that pixel is in the original image.
8
+
9
+ You can set the position when creating a layer:
10
+
11
+ ```python
12
+ import imaging_server_kit as sk
13
+ import numpy as np
14
+
15
+ img = sk.Image(np.zeros((100, 200)), position=(50, 20))
16
+
17
+ print(img) # <Image 'Image' float64 (100, 200), at (50, 20)>
18
+ print(img.position) # (50, 20)
19
+ print(img.extent) # Domain(position=(50, 20), size=(100, 200))
20
+ print(img.coords_min) # (50.0, 20.0)
21
+ print(img.coords_max) # (150.0, 220.0)
22
+ ```
23
+
24
+ For object layers such as points, the extent is the bounding box of the objects:
25
+
26
+ ```python
27
+ pts = sk.Points(np.array([[30, 10], [60, 90]]))
28
+
29
+ print(pts.position) # (0, 0)
30
+ print(pts.coords_min) # (30.0, 10.0)
31
+ print(pts.coords_max) # (61.0, 91.0)
32
+ ```
33
+
34
+ Stacks have a position and an extent too. Setting the position of a stack moves all of its layers:
35
+
36
+ ```python
37
+ stack = sk.Stack([img, pts])
38
+
39
+ print(stack.extent) # Domain(position=(30, 10), size=(120, 210))
40
+
41
+ stack.position = (10, 10)
42
+
43
+ print(img.position) # (60, 30)
44
+ print(pts.position) # (10, 10)
45
+ ```
46
+
47
+ Layers and stacks share the following properties:
48
+
49
+ | Property | Type | Description |
50
+ |---|---|---|
51
+ | `position` | `tuple` | Offset of the local coordinates in global pixel coordinates. |
52
+ | `extent` | `sk.Domain` | Region covered by the data, in global coordinates. |
53
+ | `coords_min` | `tuple` | Lower corner of the extent (top-left in 2D). |
54
+ | `coords_max` | `tuple` | Upper corner of the extent (bottom-right in 2D). |
55
+ | `size` | `tuple` | Size of the extent along each axis. |
56
+ | `ndim` | `int` | Number of spatial dimensions. |
57
+
58
+ ## Domains
59
+
60
+ Extents are `sk.Domain` objects. A domain is a box defined by a `size` and a `position` (its lower corner, which defaults to the origin):
61
+
62
+ ```python
63
+ roi = sk.Domain(position=(20, 30), size=(60, 80))
64
+
65
+ print(roi.coords_min) # (20.0, 30.0)
66
+ print(roi.coords_max) # (80.0, 110.0)
67
+ ```
68
+
69
+ Domains are used to describe regions of interest and to [restrict computations](../how-to/regions.md), for example.
70
+
71
+ ## Merging data
72
+
73
+ ### Merging tiles
74
+
75
+ When an algorithm runs [tile-by-tile](../how-to/tiling.md), the input layers are split into tiles, the algorithm runs on each tile, and the results are merged into a single stack. How results are merged depends on the layer type:
76
+
77
+ | Layer | Merging |
78
+ |---|---|
79
+ | `sk.Image` | Intensities are **averaged** in overlapping regions. |
80
+ | `sk.Mask` | By default, the **last tile overwrites** overlapping regions. With `merger="instances"` and a non-zero overlap between tiles, labels are made unique across tiles and objects crossing tiles are stitched together (experimental). |
81
+ | `sk.Points`, `sk.Vectors`, `sk.Boxes` | Each object belongs to the tile that contains it (vectors are placed based on their origin, boxes based on their center). When tiles overlap, objects in overlapping regions are returned once per tile. |
82
+ | Other layers (`sk.Paths`, `sk.Tracks`, values, etc.) | Each tile **replaces** the previous value. |
83
+
84
+ ### Merging layers
85
+
86
+ You can use `sk.merge_layers()` to merge a list of layers of the same kind into a new layer, using the rules above. For example, to assemble two images:
87
+
88
+ ```python
89
+ left = sk.Image(np.ones((100, 100)))
90
+ right = sk.Image(np.full((100, 100), 2.0), position=(0, 100))
91
+
92
+ merged = sk.merge_layers([left, right])
93
+
94
+ print(merged) # <Image 'Image' float32 (100, 200)>
95
+ print(merged.position) # (0.0, 0.0)
96
+ ```
@@ -0,0 +1,44 @@
1
+ # Data layers
2
+
3
+ ## Data layers
4
+
5
+ A **data layer** holds a single piece of data, such as an image, a segmentation mask, a set of points, or a numeric value, together with information about what that data means. All data layers derive from `sk.Layer`, and the available types are listed in [Data layers](../reference/api/layers.md).
6
+
7
+ Data layers play two roles:
8
+
9
+ - **Describing parameters.** Layers passed in `parameters={}` describe the algorithm's inputs: their type, constraints such as `min` and `max`, a default value, a name, and a description. User interfaces and documentation pages are generated from these descriptions, and parameter values are validated against them.
10
+ - **Holding results.** Layers returned by an algorithm wrap its outputs, so that each output is displayed and handled correctly. For example, an array wrapped in `sk.Mask` is shown as a `Labels` layer in Napari.
11
+
12
+ Every layer has the following attributes:
13
+
14
+ | Attribute | Description |
15
+ |---|---|
16
+ | `data` | The data itself, for example a NumPy array or a number. |
17
+ | `name` | The name of the layer. Defaults to the name of the layer type, such as `"Mask"`. |
18
+ | `meta` | A dictionary of metadata: the description, the merging strategy, and any extra keyword arguments passed to the layer (for example `colormap="viridis"`). |
19
+ | `kind` | A short string identifying the layer type, such as `"mask"`. |
20
+
21
+ Spatial layers also have a position and an extent in global pixel coordinates (see [Coordinates, domains and tile merging](coordinates.md)).
22
+
23
+ ## Stacks
24
+
25
+ A **stack** (`sk.Stack`) is an ordered collection of data layers. `.run()` returns the results of an algorithm as a stack, and `.get_sample()` returns samples as a stack of parameter layers.
26
+
27
+ ```python
28
+ import imaging_server_kit as sk
29
+ import numpy as np
30
+
31
+ stack = sk.Stack([sk.Image(np.zeros((10, 10))), sk.Mask(np.ones((10, 10), dtype=int))])
32
+
33
+ image_layer = stack[0] # By index
34
+ mask_layer = stack.read("Mask") # By name
35
+ ```
36
+
37
+ Within a stack, layer names are unique. When a layer is added with `stack.add()` under a name that is already taken, a suffix is appended to its name, for example `Image-01`.
38
+
39
+ When results are merged into a stack, layers are matched by name:
40
+
41
+ - A layer with a *new name* is **added** to the stack.
42
+ - A layer with the *same name* as an existing layer **updates** that layer's data and metadata.
43
+
44
+ This concept is the basis of [live updates](../how-to/live-updates.md) and [tiled inference](../how-to/tiling.md); each yielded output, or processed tile, is merged into a single result stack according to the rule above, based on layer name.
@@ -0,0 +1,21 @@
1
+ # AI policy
2
+
3
+ *Imaging Server Kit* is being developed with passion and intent by humans, with the occasional help of AI to **improve the overall quality of the project**. The table below summarizes the respective contributions of humans and AI agents within the project.
4
+
5
+ | Human contributions |
6
+ | ----- |
7
+ | Conceptualization of the project |
8
+ | Implementing core functionalities (public API) |
9
+ | Deciding which features to prioritize |
10
+ | Writing the initial documentation site |
11
+ | Reviewing and validating AI-generated outputs |
12
+ | Reviewing tests and testing the package on real scientific data |
13
+
14
+ | AI contributions |
15
+ | -- |
16
+ | Catching and fixing bugs |
17
+ | Identifying series of actions that lead to unexpected results |
18
+ | Targeted refactoring to improve code clarity or maintainability |
19
+ | Enhancing the documentation site |
20
+ | Writing or fixing public docstrings |
21
+ | Writing tests and testing the package on toy scientific data |
@@ -0,0 +1,3 @@
1
+ # Examples
2
+
3
+ The [extra-examples](https://github.com/Imaging-Server-Kit/extra-examples) repository contains a gallery of Imaging Server Kit algorithms implemented for a selection of open-source projects.