swcgeom 0.19.0__tar.gz → 0.19.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.

Potentially problematic release.


This version of swcgeom might be problematic. Click here for more details.

Files changed (72) hide show
  1. {swcgeom-0.19.0/swcgeom.egg-info → swcgeom-0.19.1}/PKG-INFO +2 -2
  2. {swcgeom-0.19.0 → swcgeom-0.19.1}/pyproject.toml +2 -2
  3. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/images/io.py +37 -14
  4. {swcgeom-0.19.0 → swcgeom-0.19.1/swcgeom.egg-info}/PKG-INFO +2 -2
  5. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom.egg-info/requires.txt +2 -0
  6. {swcgeom-0.19.0 → swcgeom-0.19.1}/LICENSE +0 -0
  7. {swcgeom-0.19.0 → swcgeom-0.19.1}/README.md +0 -0
  8. {swcgeom-0.19.0 → swcgeom-0.19.1}/setup.cfg +0 -0
  9. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/__init__.py +0 -0
  10. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/__init__.py +0 -0
  11. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/feature_extractor.py +0 -0
  12. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/features.py +0 -0
  13. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/lmeasure.py +0 -0
  14. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/sholl.py +0 -0
  15. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/trunk.py +0 -0
  16. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/visualization.py +0 -0
  17. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/visualization3d.py +0 -0
  18. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/analysis/volume.py +0 -0
  19. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/__init__.py +0 -0
  20. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/branch.py +0 -0
  21. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/branch_tree.py +0 -0
  22. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/compartment.py +0 -0
  23. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/node.py +0 -0
  24. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/path.py +0 -0
  25. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/population.py +0 -0
  26. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc.py +0 -0
  27. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/__init__.py +0 -0
  28. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/assembler.py +0 -0
  29. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/base.py +0 -0
  30. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/checker.py +0 -0
  31. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/io.py +0 -0
  32. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/normalizer.py +0 -0
  33. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/swc_utils/subtree.py +0 -0
  34. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/tree.py +0 -0
  35. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/tree_utils.py +0 -0
  36. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/core/tree_utils_impl.py +0 -0
  37. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/images/__init__.py +0 -0
  38. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/images/augmentation.py +0 -0
  39. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/images/contrast.py +0 -0
  40. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/images/folder.py +0 -0
  41. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/__init__.py +0 -0
  42. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/base.py +0 -0
  43. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/branch.py +0 -0
  44. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/branch_tree.py +0 -0
  45. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/geometry.py +0 -0
  46. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/image_preprocess.py +0 -0
  47. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/image_stack.py +0 -0
  48. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/images.py +0 -0
  49. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/mst.py +0 -0
  50. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/neurolucida_asc.py +0 -0
  51. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/path.py +0 -0
  52. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/population.py +0 -0
  53. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/tree.py +0 -0
  54. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/transforms/tree_assembler.py +0 -0
  55. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/__init__.py +0 -0
  56. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/debug.py +0 -0
  57. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/download.py +0 -0
  58. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/dsu.py +0 -0
  59. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/ellipse.py +0 -0
  60. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/file.py +0 -0
  61. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/neuromorpho.py +0 -0
  62. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/numpy_helper.py +0 -0
  63. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/plotter_2d.py +0 -0
  64. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/plotter_3d.py +0 -0
  65. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/renderer.py +0 -0
  66. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/sdf.py +0 -0
  67. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/solid_geometry.py +0 -0
  68. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/transforms.py +0 -0
  69. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom/utils/volumetric_object.py +0 -0
  70. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom.egg-info/SOURCES.txt +0 -0
  71. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom.egg-info/dependency_links.txt +0 -0
  72. {swcgeom-0.19.0 → swcgeom-0.19.1}/swcgeom.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swcgeom
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: Neuron geometry library for swc format
5
5
  Author-email: yzx9 <pypi@yzx9.xyz>
6
6
  License: Apache-2.0
@@ -20,7 +20,7 @@ Requires-Dist: seaborn>=0.12.0
20
20
  Requires-Dist: tifffile>=2022.8.12
21
21
  Requires-Dist: typing-extensions>=4.4.0
22
22
  Requires-Dist: tqdm>=4.46.1
23
- Requires-Dist: v3d-py-helper>=0.4.1
23
+ Requires-Dist: v3d-py-helper>=0.4.1; python_version < "3.13"
24
24
  Provides-Extra: all
25
25
  Requires-Dist: beautifulsoup4>=4.11.1; extra == "all"
26
26
  Requires-Dist: certifi>=2023.5.7; extra == "all"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "swcgeom"
3
- version = "0.19.0"
3
+ version = "0.19.1"
4
4
  description = "Neuron geometry library for swc format"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -19,7 +19,7 @@ dependencies = [
19
19
  "tifffile>=2022.8.12",
20
20
  "typing-extensions>=4.4.0",
21
21
  "tqdm>=4.46.1",
22
- "v3d-py-helper>=0.4.1",
22
+ "v3d-py-helper>=0.4.1; python_version < '3.13'",
23
23
  ]
24
24
 
25
25
  [project.optional-dependencies]
@@ -17,6 +17,7 @@
17
17
 
18
18
  import os
19
19
  import re
20
+ import sys
20
21
  import warnings
21
22
  from abc import ABC, abstractmethod
22
23
  from collections.abc import Callable, Iterable
@@ -28,7 +29,6 @@ import numpy as np
28
29
  import numpy.typing as npt
29
30
  import tifffile
30
31
  from typing_extensions import deprecated
31
- from v3dpy.loaders import PBD, Raw
32
32
 
33
33
  __all__ = ["read_imgs", "save_tiff", "read_images"]
34
34
 
@@ -263,25 +263,48 @@ class NrrdImageStack(NDArrayImageStack[ScalarType]):
263
263
  self.header = header
264
264
 
265
265
 
266
- class V3dImageStack(NDArrayImageStack[ScalarType]):
267
- """v3d image stack."""
266
+ if sys.version_info < (3, 13):
267
+ from v3dpy.loaders import PBD, Raw
268
268
 
269
- def __init_subclass__(cls, loader: Raw | PBD) -> None:
270
- super().__init_subclass__()
271
- cls._loader = loader
269
+ class V3dImageStack(NDArrayImageStack[ScalarType]):
270
+ """v3d image stack."""
272
271
 
273
- def __init__(self, fname: str, *, dtype: ScalarType, **kwargs) -> None:
274
- r = self._loader()
275
- imgs = r.load(fname)
276
- super().__init__(imgs, dtype=dtype, **kwargs)
272
+ def __init_subclass__(cls, loader: Raw | PBD) -> None:
273
+ super().__init_subclass__()
274
+ cls._loader = loader
275
+
276
+ def __init__(self, fname: str, *, dtype: ScalarType, **kwargs) -> None:
277
+ r = self._loader()
278
+ imgs = r.load(fname)
279
+ super().__init__(imgs, dtype=dtype, **kwargs)
280
+
281
+ class V3drawImageStack(V3dImageStack[ScalarType], loader=Raw):
282
+ """v3draw image stack."""
283
+
284
+ class V3dpbdImageStack(V3dImageStack[ScalarType], loader=PBD):
285
+ """v3dpbd image stack."""
286
+
287
+ else:
288
+
289
+ def _v3d_not_supported(*args, **kwargs):
290
+ raise RuntimeError(
291
+ "v3d-py-helper is not supported in Python 3.13 or newer. See #33"
292
+ )
293
+
294
+ class V3dImageStack:
295
+ """v3d image stack (disabled due to unsupported Python version)."""
296
+
297
+ __init__ = _v3d_not_supported
277
298
 
299
+ class V3drawImageStack:
300
+ """v3draw image stack (disabled due to unsupported Python version)."""
278
301
 
279
- class V3drawImageStack(V3dImageStack[ScalarType], loader=Raw):
280
- """v3draw image stack."""
302
+ __init__ = _v3d_not_supported
281
303
 
304
+ class V3dpbdImageStack:
305
+ """v3dpbd image stack (disabled due to unsupported Python version)."""
282
306
 
283
- class V3dpbdImageStack(V3dImageStack[ScalarType], loader=PBD):
284
- """v3dpbd image stack."""
307
+ __init__ = _v3d_not_supported
285
308
 
286
309
 
287
310
  class TeraflyImageStack(ImageStack[ScalarType]):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: swcgeom
3
- Version: 0.19.0
3
+ Version: 0.19.1
4
4
  Summary: Neuron geometry library for swc format
5
5
  Author-email: yzx9 <pypi@yzx9.xyz>
6
6
  License: Apache-2.0
@@ -20,7 +20,7 @@ Requires-Dist: seaborn>=0.12.0
20
20
  Requires-Dist: tifffile>=2022.8.12
21
21
  Requires-Dist: typing-extensions>=4.4.0
22
22
  Requires-Dist: tqdm>=4.46.1
23
- Requires-Dist: v3d-py-helper>=0.4.1
23
+ Requires-Dist: v3d-py-helper>=0.4.1; python_version < "3.13"
24
24
  Provides-Extra: all
25
25
  Requires-Dist: beautifulsoup4>=4.11.1; extra == "all"
26
26
  Requires-Dist: certifi>=2023.5.7; extra == "all"
@@ -9,6 +9,8 @@ seaborn>=0.12.0
9
9
  tifffile>=2022.8.12
10
10
  typing-extensions>=4.4.0
11
11
  tqdm>=4.46.1
12
+
13
+ [:python_version < "3.13"]
12
14
  v3d-py-helper>=0.4.1
13
15
 
14
16
  [all]
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