siibra 0.5a2__py3-none-any.whl → 1.0.0a1__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.

Potentially problematic release.


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

Files changed (83) hide show
  1. siibra/VERSION +1 -1
  2. siibra/__init__.py +20 -12
  3. siibra/commons.py +145 -90
  4. siibra/configuration/__init__.py +1 -1
  5. siibra/configuration/configuration.py +22 -17
  6. siibra/configuration/factory.py +177 -128
  7. siibra/core/__init__.py +1 -8
  8. siibra/core/{relation_qualification.py → assignment.py} +17 -14
  9. siibra/core/atlas.py +66 -35
  10. siibra/core/concept.py +81 -39
  11. siibra/core/parcellation.py +83 -67
  12. siibra/core/region.py +569 -263
  13. siibra/core/space.py +7 -39
  14. siibra/core/structure.py +111 -0
  15. siibra/exceptions.py +63 -0
  16. siibra/experimental/__init__.py +19 -0
  17. siibra/experimental/contour.py +61 -0
  18. siibra/experimental/cortical_profile_sampler.py +57 -0
  19. siibra/experimental/patch.py +98 -0
  20. siibra/experimental/plane3d.py +256 -0
  21. siibra/explorer/__init__.py +16 -0
  22. siibra/explorer/url.py +112 -52
  23. siibra/explorer/util.py +31 -9
  24. siibra/features/__init__.py +73 -8
  25. siibra/features/anchor.py +75 -196
  26. siibra/features/connectivity/__init__.py +1 -1
  27. siibra/features/connectivity/functional_connectivity.py +2 -2
  28. siibra/features/connectivity/regional_connectivity.py +99 -10
  29. siibra/features/connectivity/streamline_counts.py +1 -1
  30. siibra/features/connectivity/streamline_lengths.py +1 -1
  31. siibra/features/connectivity/tracing_connectivity.py +1 -1
  32. siibra/features/dataset/__init__.py +1 -1
  33. siibra/features/dataset/ebrains.py +3 -3
  34. siibra/features/feature.py +219 -110
  35. siibra/features/image/__init__.py +1 -1
  36. siibra/features/image/image.py +21 -13
  37. siibra/features/image/sections.py +1 -1
  38. siibra/features/image/volume_of_interest.py +1 -1
  39. siibra/features/tabular/__init__.py +1 -1
  40. siibra/features/tabular/bigbrain_intensity_profile.py +24 -13
  41. siibra/features/tabular/cell_density_profile.py +111 -69
  42. siibra/features/tabular/cortical_profile.py +82 -16
  43. siibra/features/tabular/gene_expression.py +117 -6
  44. siibra/features/tabular/layerwise_bigbrain_intensities.py +7 -9
  45. siibra/features/tabular/layerwise_cell_density.py +9 -24
  46. siibra/features/tabular/receptor_density_fingerprint.py +11 -6
  47. siibra/features/tabular/receptor_density_profile.py +12 -15
  48. siibra/features/tabular/regional_timeseries_activity.py +74 -18
  49. siibra/features/tabular/tabular.py +17 -8
  50. siibra/livequeries/__init__.py +1 -7
  51. siibra/livequeries/allen.py +139 -77
  52. siibra/livequeries/bigbrain.py +104 -128
  53. siibra/livequeries/ebrains.py +7 -4
  54. siibra/livequeries/query.py +1 -2
  55. siibra/locations/__init__.py +32 -25
  56. siibra/locations/boundingbox.py +153 -127
  57. siibra/locations/location.py +45 -80
  58. siibra/locations/point.py +97 -83
  59. siibra/locations/pointcloud.py +349 -0
  60. siibra/retrieval/__init__.py +1 -1
  61. siibra/retrieval/cache.py +107 -13
  62. siibra/retrieval/datasets.py +9 -14
  63. siibra/retrieval/exceptions/__init__.py +2 -1
  64. siibra/retrieval/repositories.py +147 -53
  65. siibra/retrieval/requests.py +64 -29
  66. siibra/vocabularies/__init__.py +2 -2
  67. siibra/volumes/__init__.py +7 -9
  68. siibra/volumes/parcellationmap.py +396 -253
  69. siibra/volumes/providers/__init__.py +20 -0
  70. siibra/volumes/providers/freesurfer.py +113 -0
  71. siibra/volumes/{gifti.py → providers/gifti.py} +29 -18
  72. siibra/volumes/{neuroglancer.py → providers/neuroglancer.py} +204 -92
  73. siibra/volumes/{nifti.py → providers/nifti.py} +64 -44
  74. siibra/volumes/providers/provider.py +107 -0
  75. siibra/volumes/sparsemap.py +159 -260
  76. siibra/volumes/volume.py +720 -152
  77. {siibra-0.5a2.dist-info → siibra-1.0.0a1.dist-info}/METADATA +25 -28
  78. siibra-1.0.0a1.dist-info/RECORD +84 -0
  79. {siibra-0.5a2.dist-info → siibra-1.0.0a1.dist-info}/WHEEL +1 -1
  80. siibra/locations/pointset.py +0 -198
  81. siibra-0.5a2.dist-info/RECORD +0 -74
  82. {siibra-0.5a2.dist-info → siibra-1.0.0a1.dist-info}/LICENSE +0 -0
  83. {siibra-0.5a2.dist-info → siibra-1.0.0a1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: siibra
3
- Version: 0.5a2
3
+ Version: 1.0.0a1
4
4
  Summary: siibra - Software interfaces for interacting with brain atlases
5
5
  Home-page: https://github.com/FZJ-INM1-BDA/siibra-python
6
6
  Author: Big Data Analytics Group, Forschungszentrum Juelich, Institute of Neuroscience and Medicine (INM-1)
@@ -10,6 +10,8 @@ Classifier: Programming Language :: Python :: 3.7
10
10
  Classifier: Programming Language :: Python :: 3.8
11
11
  Classifier: Programming Language :: Python :: 3.9
12
12
  Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
13
15
  Classifier: Operating System :: OS Independent
14
16
  Classifier: Intended Audience :: Developers
15
17
  Requires-Python: >=3.7
@@ -22,16 +24,17 @@ Requires-Dist: scikit-image
22
24
  Requires-Dist: requests
23
25
  Requires-Dist: neuroglancer-scripts
24
26
  Requires-Dist: nilearn
27
+ Requires-Dist: typing-extensions; python_version < "3.8"
25
28
  Requires-Dist: filelock
26
- Requires-Dist: ebrains-drive >=0.6.0
27
- Requires-Dist: typing-extensions ; python_version < "3.8"
29
+ Requires-Dist: ebrains-drive>=0.6.0
28
30
 
29
31
  |License| |PyPI version| |doi| |Python versions| |Documentation Status|
30
32
 
33
+ ==============================================================
31
34
  siibra - Software interface for interacting with brain atlases
32
35
  ==============================================================
33
36
 
34
- Copyright 2020-2023, Forschungszentrum Jülich GmbH
37
+ Copyright 2020-2024, Forschungszentrum Jülich GmbH
35
38
 
36
39
  *Authors: Big Data Analytics Group, Institute of Neuroscience and
37
40
  Medicine (INM-1), Forschungszentrum Jülich GmbH*
@@ -64,7 +67,7 @@ It aims to provide a safe way of using maps defined across multiple spatial scal
64
67
  .. getting-started-start
65
68
 
66
69
  Installation
67
- ------------
70
+ ============
68
71
 
69
72
  ``siibra`` is available on pypi.
70
73
  To install the latest released version, simply run ``pip install siibra``.
@@ -80,27 +83,9 @@ There is also an image based on jupyter:scipy-notebook, which already includes `
80
83
  --name siibra \
81
84
  docker-registry.ebrains.eu/siibra/siibra-python:latest
82
85
 
83
- Access to EBRAINS
84
- -----------------
85
-
86
- While the core features in ``siibra`` can be accessed without any authentication, siibra can perform dynamic queries to regional datasets stored in the `EBRAINS Knowledge Graph <https://kg.ebrains.eu>`__.
87
- To use this functionality, you need to obtain an EBRAINS authentication token with a valid EBRAINS user account.
88
- `Registering to EBRAINS <https://ebrains.eu/register/>`__ is easy and free of charge, so we strongly recommend to sign up.
89
- To use your EBRAINS access token in siibra:
90
-
91
- 1. If you do not yet have an EBRAINS account, register `here <https://ebrains.eu/register>`__.
92
- 2. When using siibra, fetch an authentication token by using `siibra.fetch_ebrains_token()`. You will be asked to visit an ebrains login website. Login, and accept the requested detail.
93
-
94
- Since tokens are temporary, step 2. needs to be repeated regularly.
95
- If you prefer, you can also create your token by visiting `the EBRAINS authorization endpoint <https://nexus-iam.humanbrainproject.org/v0/oauth2/authorize>`__.
96
- Copy the token, and either store it in the environment variable ``$HBP_AUTH_TOKEN`` or pass it explicitly to ``siibra`` using `siibra.set_ebrains_token()`.
97
- The token is a string sequence with more than 1000 characters, usually starting with with “ey”.
98
-
99
- Note that as of now, you need to to step 2 approximately every day to perform EBRAINS data queries.
100
- However, ``siibra`` maintains a local cache on disk, so once retrieved, data features become usable and accessible without refreshing the token.
101
86
 
102
87
  Documentation & Help
103
- --------------------
88
+ ====================
104
89
 
105
90
  ``siibra-python``\ ’s documentation is hosted on https://siibra-python.readthedocs.io.
106
91
  The documentation includes a catalogue of documented code examples that walk you through the different concepts and functionalities.
@@ -117,9 +102,8 @@ While care is taken to make everything work reliably, the API of the library is
117
102
 
118
103
  .. contribute-start
119
104
 
120
-
121
105
  How to contribute
122
- -----------------
106
+ =================
123
107
 
124
108
  If you want to contribute to ``siibra``, feel free to fork it and open a pull request with your changes.
125
109
  You are also welcome to contribute to discussions in the issue tracker and of course to report issues you are facing.
@@ -131,7 +115,7 @@ You can also star the project to show us that you are using it.
131
115
  .. acknowledgments-start
132
116
 
133
117
  Acknowledgements
134
- ----------------
118
+ ================
135
119
 
136
120
  This software code is funded from the European Union’s Horizon 2020 Framework Programme for Research and Innovation under the Specific Grant Agreement No. 945539 (Human Brain Project SGA3).
137
121
 
@@ -140,7 +124,7 @@ This software code is funded from the European Union’s Horizon 2020 Framework
140
124
  .. howtocite-start
141
125
 
142
126
  How to cite
143
- -----------
127
+ ===========
144
128
  Please cite the version used according to the citation file
145
129
  or all versions by
146
130
  `Timo Dickscheid, Xiayun Gui, Ahmet Nihat Simsek, Vadim Marcenko,
@@ -161,3 +145,16 @@ https://doi.org/10.5281/zenodo.7885728`.
161
145
  :target: https://siibra-python.readthedocs.io/en/latest/?badge=latest
162
146
  .. |doi| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.7885728.svg
163
147
  :target: https://doi.org/10.5281/zenodo.7885728
148
+
149
+
150
+ Versioning
151
+ ==========
152
+ Given a version number MAJOR.MINOR.PATCH, increments imply:
153
+ - MAJOR: incompatible API changes
154
+ - MINOR: a functionality in a backward compatible manner is added
155
+ - PATCH: backward compatible bug fixes and new configuration added such as new maps or features
156
+
157
+ Pre-release
158
+ -----------
159
+ For x.y.z, a full release,
160
+ - `x.y.z-alpha.t` is the development prerelease. By changing `t`, different siibra-configurations are targeted.
@@ -0,0 +1,84 @@
1
+ siibra/VERSION,sha256=z5nHe2XCeMrOjC07H6v06c1OS-6eT_ogB0is80RfNb8,14
2
+ siibra/__init__.py,sha256=odym0KtWXn55LqBXZDRgXCzSd5daKXrC0D6lSeYi3po,4715
3
+ siibra/commons.py,sha256=L0tEiZycG0GyDo-KxTeEs8abfTZC98VR_xsDRDdWWNQ,27561
4
+ siibra/exceptions.py,sha256=ruU9IGFBqD52mXUryBF41uE6mDV3kabfSAzUunhCWR8,1319
5
+ siibra/configuration/__init__.py,sha256=Kp00hs44rVSU5OPuZ26KFJpd6HXtMocEiLiZihdvav4,752
6
+ siibra/configuration/configuration.py,sha256=um31WGN0Ozl-3v5bUYECkJEJ5GMrEnrJO3_syUXgzFc,7263
7
+ siibra/configuration/factory.py,sha256=8PoPydqc_4csKF8f-E7Un1QnQ0yKDRgYyO1jbVhKeQU,22627
8
+ siibra/core/__init__.py,sha256=907tEZ3HxZSZqqhv0md3Sk8t9iy0-aWtbuo1G1oxN_w,735
9
+ siibra/core/assignment.py,sha256=9g2lLOj_ftuS623ZlVauTTLtJGAvDfE10wknJXJA7m4,3819
10
+ siibra/core/atlas.py,sha256=BNp96YZ3s6f5MrnuEWL8OktFtM528Dj9Zv6e9FbOAyg,8549
11
+ siibra/core/concept.py,sha256=cmWR2PFdWR3pdVa0NSOiPC-EWl0i_WBjyF3JjKt74gc,10889
12
+ siibra/core/parcellation.py,sha256=AF7yODxdhZZymFNzQdaL2qzSDwkgsogPs74e603Zl_Q,14506
13
+ siibra/core/region.py,sha256=6UDx31FmFYtFQJs5Z0fbpQ2yT9MCh4QCCANIa5GxTXQ,43423
14
+ siibra/core/space.py,sha256=0v_7aERZcVNPJmbr_LbeLRkbJj8TGaTrbqnXzr-I5Jg,4586
15
+ siibra/core/structure.py,sha256=eHvCRBZEDjTI8xc2UmSgt26ujgDxHTLai8NoGmeUU64,4497
16
+ siibra/experimental/__init__.py,sha256=s4bEYpMO4Ox-Xlx3FdnRUNKYs0mTHz5Hu4VnfNXpgxU,791
17
+ siibra/experimental/contour.py,sha256=uZOltesITk5t7EbohZtqA8gJRc3UuiqpJdJQhFP1gXo,2454
18
+ siibra/experimental/cortical_profile_sampler.py,sha256=JsX0FCJqvozdhWuayYJ-r3kHNsgSUfA00O9D0X6D7Rg,2086
19
+ siibra/experimental/patch.py,sha256=0VKVU7F7xMBr1hwtL-Z4K-_1XKw88WImPG4fWaiH5bw,3809
20
+ siibra/experimental/plane3d.py,sha256=XgmNemO9peDRDtHE_8joqroGpjCKI5H_vzyIFXDh434,10853
21
+ siibra/explorer/__init__.py,sha256=ZEBJlKs3r5tFWWoKvfrASb1M031FPwSVeysaktUnhbQ,781
22
+ siibra/explorer/url.py,sha256=1UWJyt18gMKTXuixfO8P1Xa5SJDUUagollow67VYT20,7068
23
+ siibra/explorer/util.py,sha256=lAy1pd-ym90H-BZx2X8GMT3qJIsRTgGCz6tW3t1duig,2083
24
+ siibra/features/__init__.py,sha256=NMmDmfrzscV-RHHZMoyjlH_bYfjNhGDX72dQ6-JCYXg,3970
25
+ siibra/features/anchor.py,sha256=FfeMfJxwApFE0iWo2RJj5_XFr0L5gF76V4ZxaPL2VUc,9130
26
+ siibra/features/feature.py,sha256=ls1E7BjRdPOkbtwzU-d01lwTRA_33IlzB44-tL0tg2g,35194
27
+ siibra/features/connectivity/__init__.py,sha256=A7fcXqlAtfFmuymfyOl7A7ecaP8nqIBPFaM76qwh4HA,1161
28
+ siibra/features/connectivity/functional_connectivity.py,sha256=3UiPpHfbYAOBwMn7TI79wy1fR9lWwI3ePMSRVziJONw,2122
29
+ siibra/features/connectivity/regional_connectivity.py,sha256=13uZ-TJBv_J3J-6KuJcKmJMKf7yWy21pzdsyvcWkWXg,18287
30
+ siibra/features/connectivity/streamline_counts.py,sha256=OBOQblhsqnfsvf2kdySRAoWxGsFi4Ulr2PNT9wOu1Ls,1064
31
+ siibra/features/connectivity/streamline_lengths.py,sha256=B9D6Y7szMRCuHRwisAorgTJfkq-1aTNB08H_HVZHpJs,1067
32
+ siibra/features/connectivity/tracing_connectivity.py,sha256=JehDrEEeYl_i-T81AE_AnamlKfzHkZ3nbheRAybFn24,1083
33
+ siibra/features/dataset/__init__.py,sha256=KlHddELER_5IQ-xQ1xx5ExcEtqXWI8gpNvzGlC2on-Y,748
34
+ siibra/features/dataset/ebrains.py,sha256=G3-jWGBMLyJm3X8g8vTVtXN2Kws3JZ7zIEDkO9jwWxc,2544
35
+ siibra/features/image/__init__.py,sha256=HZ5LdR6DzkkkgsftTu314-DAMMLdf6Sfg6ceYVzYjas,1013
36
+ siibra/features/image/image.py,sha256=QtFtXBt4rRkFq6AHeUOaQSCOjgBygIJ7lhz1gjsQ4c4,3585
37
+ siibra/features/image/sections.py,sha256=oQparLp7Nj5dLBvUAs09rgnSgAxH86wN1SMmwkit0S0,961
38
+ siibra/features/image/volume_of_interest.py,sha256=FuYxt-r6YOWN4tLaaZPL3_GAvX_WcZz3jRHxEnWySnQ,2654
39
+ siibra/features/tabular/__init__.py,sha256=sldsgKiwpGOk5PvntIO16lJlWiTy68qVI_pLhepqbdI,1176
40
+ siibra/features/tabular/bigbrain_intensity_profile.py,sha256=noXtsmQjW75epnpfHex0VAbvz7QLwvlkTn_PLSwASIQ,2708
41
+ siibra/features/tabular/cell_density_profile.py,sha256=W1GtrOCacankczxpkz2V3n9zJyf2WCW3W_BpYrEc6yk,10820
42
+ siibra/features/tabular/cortical_profile.py,sha256=I3MFsytAjvi6A2GaMhgXnF9-94LnAScIo_GR-HMEAv0,12540
43
+ siibra/features/tabular/gene_expression.py,sha256=GbXmsdHCz8eFErTLUd6DXhQaeObftrwl9aIEgzlEdXA,9827
44
+ siibra/features/tabular/layerwise_bigbrain_intensities.py,sha256=GIYjX7_Bfs7ywhJBkXd878BZGSiaKUV0BhILr-6D4zc,2117
45
+ siibra/features/tabular/layerwise_cell_density.py,sha256=V8c16KdBACUYFxMYh1T9tdlXs_V67iFAZqlYx7y_4RY,3783
46
+ siibra/features/tabular/receptor_density_fingerprint.py,sha256=GudVpZ2wWF1yGsDFKz4AEU761qA45rItLOwHYpY4Zcs,7299
47
+ siibra/features/tabular/receptor_density_profile.py,sha256=ZYgL-3WxevVFtmEQSbR8Ot24VCMg5xzfXYEPBH1oM6k,3725
48
+ siibra/features/tabular/regional_timeseries_activity.py,sha256=vfoEIu92l3wVdUbdnNqZ5nr9oBuahOrIGS5xhA8cW7s,10026
49
+ siibra/features/tabular/tabular.py,sha256=NoNexdPJ3nhSsztWdWnnIHcX6PakcjEAOV-f9azqa-s,5323
50
+ siibra/livequeries/__init__.py,sha256=yZ2bFYizwF_Z3F9VLNI95IrHcmSO5lqfFML_juifVHs,875
51
+ siibra/livequeries/allen.py,sha256=2jj1gMr9mZFaOfRSf9lPzrcRLAoAMuWjvT_N3_KUkHI,14809
52
+ siibra/livequeries/bigbrain.py,sha256=V7yRQIx6VLIkA9fwW6PfEw7kSkrwp3oE_-WYXe3bjMk,8365
53
+ siibra/livequeries/ebrains.py,sha256=nAIhyPlVeRPNmmMKkGATUSDRoGK7aAg8zOGEKuS-z_w,5820
54
+ siibra/livequeries/query.py,sha256=Yh24vRdcSYBTNx61sMoRCyXyNZ7TX1iqoiJ8fxOJ3V8,1849
55
+ siibra/locations/__init__.py,sha256=q97HYl9mdBWNuQKvgh1Wi0eAz1TlG_dLSIxpyJuHCZo,3342
56
+ siibra/locations/boundingbox.py,sha256=pdLZNyxUD-WvGHNYOvuqZtputCd5tPOxLYTvH6oBBNg,16492
57
+ siibra/locations/location.py,sha256=Taw7oUIFBdXTE8C3b2vbGicPusJlad_KI1wW6iLL324,4361
58
+ siibra/locations/point.py,sha256=wmtH0Isx1-bsk3TfNxXHFcYUmbsQXBt34l8LpFWxhHU,12863
59
+ siibra/locations/pointcloud.py,sha256=61sUvXw5dtKouNKinQNwgGOFd7iwgJLf4D4zYNWo7Js,12474
60
+ siibra/retrieval/__init__.py,sha256=bgoasCN6LFDlKVFCJC0q4kfGMZCsxt_NVCcJ5qy0sIo,1062
61
+ siibra/retrieval/cache.py,sha256=kVB-hYtvQIQmlCozKlYJPaQxgtCKWOS3jB2qqefCVNc,7832
62
+ siibra/retrieval/datasets.py,sha256=Hjai2cSFK1WoMgXp4uMJWBUqlO_APLQ_iDQ__8EpKEI,11031
63
+ siibra/retrieval/repositories.py,sha256=L-JrEuKF6Xq7sEIdJ3iPFQPWaf5CiHMt96X1zi-gOVM,29936
64
+ siibra/retrieval/requests.py,sha256=oup12LGw-MnSc7c3IwlX9Z5TrVXzCCRfGZFLLLR4jAs,23069
65
+ siibra/retrieval/exceptions/__init__.py,sha256=CEY_n-Eh0_EBXYHDPxmIXzO6C_Km0WQFvENAMvRXmYg,875
66
+ siibra/vocabularies/__init__.py,sha256=Qn_xBKrFhla7d_PjDgN6gX4gxroeSRP3ntBZ6gNnvtE,1288
67
+ siibra/vocabularies/gene_names.json,sha256=i-gnh753GyZtQfX_dWibNYr_d5ccDPHooOwsdeKUYqE,1647972
68
+ siibra/vocabularies/receptor_symbols.json,sha256=F6DZIArPCBmJV_lWGV-zDpBBH_GOJOZm67LBE4qzMa4,5722
69
+ siibra/vocabularies/region_aliases.json,sha256=T2w1wRlxPNTsPppXn0bzC70tNsb8mOjLsoHuxDSYm2w,8563
70
+ siibra/volumes/__init__.py,sha256=j7h6WNQk2juIyxs2OlruWj5VcKxsy1g-wD2Q05rM-wM,935
71
+ siibra/volumes/parcellationmap.py,sha256=lgqVjwHdmjmKj_2PguAH4jda3dc-L0p0QzfQ9emPJRg,49774
72
+ siibra/volumes/sparsemap.py,sha256=ZHkHh7NNEPZzRE2-XGWWPRaVVL2V4voYYzYdZ7RCxRg,17437
73
+ siibra/volumes/volume.py,sha256=-ULibtP5MCy0a3tHqbeFweIUP7sLZGuhj6eW558BRlM,32619
74
+ siibra/volumes/providers/__init__.py,sha256=0uDbnsjlAHnxoSdFghzYfhtjVki9721hi7Sp1P6GjNY,934
75
+ siibra/volumes/providers/freesurfer.py,sha256=LxPHbfVJLXkP4WVXCYhsildRUZUvzgv6jJOWeNLavw8,4893
76
+ siibra/volumes/providers/gifti.py,sha256=mPVFkBFnwbCbMks_ysuNbhe0Pj5ndxONPmq-Xr-ir3w,6231
77
+ siibra/volumes/providers/neuroglancer.py,sha256=JH8z6jb7u6nkqtNR3ZFYPrtwexAS6z68pesrLA2lYrk,28712
78
+ siibra/volumes/providers/nifti.py,sha256=AXhWvbt78uEvIT6Z8ABWZ6k0zYUEWZKniSxfLAqDE3k,10135
79
+ siibra/volumes/providers/provider.py,sha256=jxhOGHrSEeBgN0tAi7p8ju3twtUkhkjrk-e-3-chtxI,3695
80
+ siibra-1.0.0a1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
81
+ siibra-1.0.0a1.dist-info/METADATA,sha256=t-eGH-zWaKrG57csPyc0nlzOcElWykFpLxD5uUJxRSI,8884
82
+ siibra-1.0.0a1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
83
+ siibra-1.0.0a1.dist-info/top_level.txt,sha256=NF0OSGLL0li2qyC7MaU0iBB5Y9S09_euPpvisD0-8Hg,7
84
+ siibra-1.0.0a1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.3)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,198 +0,0 @@
1
- # Copyright 2018-2021
2
- # Institute of Neuroscience and Medicine (INM-1), Forschungszentrum Jülich GmbH
3
-
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
-
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
-
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- """A set of coordinates on a reference space."""
16
-
17
- from . import location, point, boundingbox
18
-
19
- from ..retrieval.requests import HttpRequest
20
- from ..commons import logger
21
-
22
- import numbers
23
- import json
24
- import numpy as np
25
- from nibabel import Nifti1Image
26
- from typing import Union
27
-
28
-
29
- class PointSet(location.Location):
30
- """A set of 3D points in the same reference space,
31
- defined by a list of coordinates."""
32
-
33
- def __init__(self, coordinates, space=None, sigma_mm=0):
34
- """
35
- Construct a 3D point set in the given reference space.
36
-
37
- Parameters
38
- ----------
39
- coordinates : list of Point, 3-tuples or string specs
40
- Coordinates in mm of the given space
41
- space : reference space (id, name, or Space object)
42
- The reference space
43
- sigma_mm : float, or list of float
44
- Optional standard deviation of point locations.
45
- """
46
- location.Location.__init__(self, space)
47
- if isinstance(sigma_mm, numbers.Number):
48
- self.points = [point.Point(c, self.space, sigma_mm) for c in coordinates]
49
- else:
50
- self.points = [
51
- point.Point(c, self.space, s) for c, s in zip(coordinates, sigma_mm)
52
- ]
53
-
54
- def intersection(self, other: Union[location.Location, Nifti1Image]):
55
- """Return the subset of points that are inside the given mask.
56
-
57
- NOTE: The affine matrix of the image must be set to warp voxels
58
- coordinates into the reference space of this Bounding Box.
59
- """
60
- if isinstance(other, point.Point):
61
- return self if other in self else None
62
- elif isinstance(other, PointSet):
63
- return [p for p in self if p in other]
64
- elif isinstance(other, boundingbox.BoundingBox):
65
- return [p for p in self if p.contained_in(other)]
66
- inside = [p for p in self if p.intersects(other)]
67
- if len(inside) == 0:
68
- return None
69
- elif len(inside) == 1:
70
- return inside[0]
71
- else:
72
- return PointSet(
73
- [p.coordinate for p in inside],
74
- space=self.space,
75
- sigma_mm=[p.sigma for p in inside],
76
- )
77
-
78
- def intersects(self, other: Union[location.Location, Nifti1Image]):
79
- return len(self.intersection(other)) > 0
80
-
81
- @property
82
- def sigma(self):
83
- return [p.sigma for p in self]
84
-
85
- @property
86
- def has_constant_sigma(self):
87
- return len(set(self.sigma)) == 1
88
-
89
- def warp(self, space, chunksize=1000):
90
- """Creates a new point set by warping its points to another space"""
91
- from ..core.space import Space
92
- spaceobj = Space.get_instance(space)
93
- if spaceobj == self.space:
94
- return self
95
- if any(_ not in location.Location.SPACEWARP_IDS for _ in [self.space.id, spaceobj.id]):
96
- raise ValueError(
97
- f"Cannot convert coordinates between {self.space.id} and {spaceobj.id}"
98
- )
99
-
100
- src_points = self.as_list()
101
- tgt_points = []
102
- N = len(src_points)
103
- if N > 10e5:
104
- logger.info(f"Warping {N} points from {self.space.name} to {spaceobj.name} space")
105
- for i0 in range(0, N, chunksize):
106
-
107
- i1 = min(i0 + chunksize, N)
108
- data = json.dumps({
109
- "source_space": location.Location.SPACEWARP_IDS[self.space.id],
110
- "target_space": location.Location.SPACEWARP_IDS[spaceobj.id],
111
- "source_points": src_points[i0:i1]
112
- })
113
- response = HttpRequest(
114
- url=f"{location.Location.SPACEWARP_SERVER}/transform-points",
115
- post=True,
116
- headers={
117
- "accept": "application/json",
118
- "Content-Type": "application/json",
119
- },
120
- data=data,
121
- func=lambda b: json.loads(b.decode()),
122
- ).data
123
- tgt_points.extend(list(response["target_points"]))
124
-
125
- return self.__class__(coordinates=tuple(tgt_points), space=spaceobj)
126
-
127
- def transform(self, affine: np.ndarray, space=None):
128
- """Returns a new PointSet obtained by transforming the
129
- coordinates of this one with the given affine matrix.
130
-
131
- Parameters
132
- ----------
133
- affine : numpy 4x4 ndarray
134
- affine matrix
135
- space : reference space (id, name, or Space)
136
- Target reference space which is reached after
137
- applying the transform. Note that the consistency
138
- of this cannot be checked and is up to the user.
139
- """
140
- return self.__class__(
141
- [c.transform(affine, space) for c in self.points], space
142
- )
143
-
144
- def __getitem__(self, index: int):
145
- if (index >= self.__len__()) or (index < 0):
146
- raise IndexError(
147
- f"Pointset has only {self.__len__()} points, "
148
- f"but index of {index} was requested."
149
- )
150
- else:
151
- return self.points[index]
152
-
153
- def __iter__(self):
154
- """Return an iterator over the coordinate locations."""
155
- return iter(self.points)
156
-
157
- def __len__(self):
158
- """The number of points in this PointSet."""
159
- return len(self.points)
160
-
161
- def __str__(self):
162
- return f"Set of {len(self)} points in the {self.boundingbox}"
163
-
164
- @property
165
- def boundingbox(self):
166
- """
167
- Return the bounding box of these points.
168
- """
169
- from .boundingbox import BoundingBox
170
- XYZ = self.homogeneous[:, :3]
171
- sigma_min = max(self.sigma[i] for i in XYZ.argmin(0))
172
- sigma_max = max(self.sigma[i] for i in XYZ.argmax(0))
173
- return BoundingBox(
174
- point1=XYZ.min(0) - max(sigma_min, 1e-6),
175
- point2=XYZ.max(0) + max(sigma_max, 1e-6),
176
- space=self.space,
177
- sigma_mm=[sigma_min, sigma_max]
178
- )
179
-
180
- @property
181
- def centroid(self):
182
- return point.Point(self.homogeneous[:, :3].mean(0), space=self.space)
183
-
184
- @property
185
- def volume(self):
186
- if len(self) < 2:
187
- return 0
188
- else:
189
- return self.boundingbox.volume
190
-
191
- def as_list(self):
192
- """Return the point set as a list of 3D tuples."""
193
- return [tuple(p) for p in self]
194
-
195
- @property
196
- def homogeneous(self):
197
- """Access the list of 3D point as an Nx4 array of homogeneous coorindates."""
198
- return np.array([c.homogeneous for c in self.points]).reshape((-1, 4))
@@ -1,74 +0,0 @@
1
- siibra/VERSION,sha256=7Kks-VgcMJS9Osf2T7QojRhV4dXgbFcd1ItJ_V2T8jQ,7
2
- siibra/__init__.py,sha256=qBxxMRyl9RojNt0twQr2LDk1Nyk5eNsPHFxxoIwnpx4,4540
3
- siibra/commons.py,sha256=EbFb3q7k2R6NY4pGFk89ApRjky_PeoE-UV6vdtUJa4s,25875
4
- siibra/configuration/__init__.py,sha256=-_Kuf0TfMEdFXiSCTAdcHUL_krA8-cxhJypSNNay53Q,752
5
- siibra/configuration/configuration.py,sha256=ZZgQX_5PtOuDYFqFY9Zo84XLZAu-GKwpvPJFKmvld_c,7070
6
- siibra/configuration/factory.py,sha256=EGOQGxJxWIku8sP7PvZUhRE-Pv-jnFkjKkNx_ygfHKk,20547
7
- siibra/core/__init__.py,sha256=z22elfoi5_TscUb17-pBoGyfT_q9PQpvgOgSLEJe2WE,916
8
- siibra/core/atlas.py,sha256=dZkvQZRHeAPdt8MGh3oi9QyYf_QL8L8PY9PZ7WwPIiE,7807
9
- siibra/core/concept.py,sha256=dT8uyG_l3jnD9gmXg54G2kvbvwxVjmr-Qi2LetakqCI,9160
10
- siibra/core/parcellation.py,sha256=Eob_rMtxQTOcFFbWuE0dbRXfHM8ALaeDsNpoyD7tVOc,13881
11
- siibra/core/region.py,sha256=P_WIC_TWAZmzrr1i4ZrKlj4y9IwHbXkdSSsRKF4W3Bw,32817
12
- siibra/core/relation_qualification.py,sha256=EUU9EPkV0mdCjGUU2hki1rQ5R5U4X2YoFmvwOirO2_E,3641
13
- siibra/core/space.py,sha256=dC225jhRFt0KlPtjKEEVre6X8HoDupsymEOrc7AdmmI,5774
14
- siibra/explorer/__init__.py,sha256=_9gCCp7P8AniGlztulrRyleIOEKcNZlBFVurtnI8GBM,40
15
- siibra/explorer/url.py,sha256=mUAFN7OHfLELfdqqJmSdAkmXJjKCv6Qh5RHtyxNQjfo,5868
16
- siibra/explorer/util.py,sha256=Z2ruicDL3S_qcxhHHW0GF1q5-r963tJpzgtQmAn8YSM,1424
17
- siibra/features/__init__.py,sha256=Y5q2M7HoToTcfAdO50jmnPGZybJOi5GyEcbxQRscJjo,1518
18
- siibra/features/anchor.py,sha256=lv_F_Ld3ovwd0krB1mxGDKs2ZyniN6tqsGjtk0Nx7IM,15289
19
- siibra/features/feature.py,sha256=pNxNtFJiOelp6DRQ-QO-cjSRUkKjLzxBb2Q_Xng6NjQ,30442
20
- siibra/features/connectivity/__init__.py,sha256=XU6w7kX6lN_fZLt0TFGqg39Z9FCfbcotSR79p-JhLV4,1161
21
- siibra/features/connectivity/functional_connectivity.py,sha256=9xHu_GaODGP6Q0--hTf_tMjLtg1IKWI4qw78sZ9GQ5M,2120
22
- siibra/features/connectivity/regional_connectivity.py,sha256=eSzAG_42txJNT2oOa-Bp5Z7Hmi7FrrllaHGIwN82IY0,14991
23
- siibra/features/connectivity/streamline_counts.py,sha256=ngl7xCiCUOyflyBvjZYa3ShOmtf21E5e0A_BeWfFtSQ,1064
24
- siibra/features/connectivity/streamline_lengths.py,sha256=0a09Dag-eRvs1KgHSU47I3xQwbgHICsDozhZyuNzQME,1067
25
- siibra/features/connectivity/tracing_connectivity.py,sha256=pyTMTLvkJL3ftk56s0AbT8dHexV4EyuTJ2yX27kLGfc,1083
26
- siibra/features/dataset/__init__.py,sha256=5h_wstfa3h35emL1qoKOtcFOiIjKZX9oIy-GwsChEyc,748
27
- siibra/features/dataset/ebrains.py,sha256=dWG6e19spJmhgmfP3PbxxNhMLLVSOhwoKEInRXSVeGg,2544
28
- siibra/features/image/__init__.py,sha256=UIECVLwKYKeuCPNa4WcjcLDuNr_3JxCyiOQSjBRf36U,1013
29
- siibra/features/image/image.py,sha256=Mo3ca3MkCi1zq0T6jNmr-Pr-x1Xq_Cl3y8SALOslOFI,3235
30
- siibra/features/image/sections.py,sha256=d4TQSs6nIKQ5vgi89htERfWOMgnvOA9k4LhaXBMWNbE,961
31
- siibra/features/image/volume_of_interest.py,sha256=DIv9GNOptfungLddA_CfrrCfY8p36rbWCT9xkE6K66w,2654
32
- siibra/features/tabular/__init__.py,sha256=3DBwa8JtGd-npeOyyw6kJzcveKXadbqSATyJtTnY3-w,1176
33
- siibra/features/tabular/bigbrain_intensity_profile.py,sha256=7WsfJhp4EGn7VhAhwIou4r3QZ5SQejR9SxPgmKaYez4,2321
34
- siibra/features/tabular/cell_density_profile.py,sha256=SgS1Fb0Ztuj0toJQVwpuimDx-r2DrVim7ru6KCba3ag,9187
35
- siibra/features/tabular/cortical_profile.py,sha256=euyAxi5C2Ths0fR93oM5B9oD9ej73dslVabDr4XH2Qo,9632
36
- siibra/features/tabular/gene_expression.py,sha256=YqUicjGC0rkPXSWZwJtUjgxCIcfekeGk9nkWT0EZceE,4965
37
- siibra/features/tabular/layerwise_bigbrain_intensities.py,sha256=w6AxLPyUxHBOQlkNPgr4O4xARTzmmXenEHA0nbUDgbo,2161
38
- siibra/features/tabular/layerwise_cell_density.py,sha256=CJMcUeN_aawfCzZTLq4xKq-Kas5sHFNVNVL6bqhCOEc,4167
39
- siibra/features/tabular/receptor_density_fingerprint.py,sha256=aah1PE3W4_tWSKmjTlGVsBp7DEGfAI6Xtt3yQHBOwPE,7164
40
- siibra/features/tabular/receptor_density_profile.py,sha256=KSh3SV6NYObR9gkTM-BQkY-V3MYuOL3pgrfr579bPGc,3733
41
- siibra/features/tabular/regional_timeseries_activity.py,sha256=z_CcMfC-fDJbMkKR8JbXpdgf3JM9LA_o0fBz-zDZIkQ,7966
42
- siibra/features/tabular/tabular.py,sha256=-HM6VfmNXXmWpGrixmkKFHgNmj5T0xNRqd6JBbIqbvc,5001
43
- siibra/livequeries/__init__.py,sha256=rpJKroYqtujIkvAUlavOIHUlP4Yg73U27Se44aZms2Q,1013
44
- siibra/livequeries/allen.py,sha256=a0-F1Wk8ocJcJBm1pZLv9BvHjdv2iPeM56xmkN-g-r4,12252
45
- siibra/livequeries/bigbrain.py,sha256=GzyrtMD31O-S6J-FMi5754fzfIexovOHmdDFF3mcvvs,8464
46
- siibra/livequeries/ebrains.py,sha256=6Ra-5Wjn-GOR5ybZp_zDqsIxwGJBS0mF-H8JXNCLeJI,5724
47
- siibra/livequeries/query.py,sha256=8npNqiovJpWioVe_vYof10y128E7sH0LJh62d7OJTSQ,1862
48
- siibra/locations/__init__.py,sha256=TeYmTYlo7GR0qLYj_ORkIqLQ_pENWZIkQxzPSZ-yCrE,2989
49
- siibra/locations/boundingbox.py,sha256=-oJMUSBa9YwosM5OQHzcugnjaMYif00k_XJ3-NNkNm0,16324
50
- siibra/locations/location.py,sha256=m0lSp_nvDoluZ7vjHS12eGW0Fpb8q7BhObjLAjpdV94,5086
51
- siibra/locations/point.py,sha256=ZPfjcGgxBvZrXNJ7HA4qLk9xr-0ZlA2Nj_5z8w4IZzw,12662
52
- siibra/locations/pointset.py,sha256=sBngAfcH5gwU0RrgVyt8dcYY4eo9N-9wWyv3Inglxig,7093
53
- siibra/retrieval/__init__.py,sha256=pAJ2WsNk9tVY1RddmXzya1iFgJXJarO4TVCJTob1Ej0,1062
54
- siibra/retrieval/cache.py,sha256=9Wssws2YHiI_OW4EZp72OzYV9nw8h5cAEAakSxtRMts,5143
55
- siibra/retrieval/datasets.py,sha256=1ULz7e6QGP2HBO9XF5D59_X2jcwl3V4kaY1USw7NGrQ,11205
56
- siibra/retrieval/repositories.py,sha256=wYE3oYcIBgD3WOqIerS3darsg_TSrfpdDJ72l2uytak,25961
57
- siibra/retrieval/requests.py,sha256=tRmgocvob7619e_4Vw-dVd8R3JJ95UGkVyESXF2EBE0,22013
58
- siibra/retrieval/exceptions/__init__.py,sha256=_w996kp5rxuvi-_iLhrByrH2OtApxm_TykthkaQvKpo,874
59
- siibra/vocabularies/__init__.py,sha256=h38zIUd44RRFOR6X09VnKsC-_WrhtB0xFzYWX-Nyncg,1293
60
- siibra/vocabularies/gene_names.json,sha256=i-gnh753GyZtQfX_dWibNYr_d5ccDPHooOwsdeKUYqE,1647972
61
- siibra/vocabularies/receptor_symbols.json,sha256=F6DZIArPCBmJV_lWGV-zDpBBH_GOJOZm67LBE4qzMa4,5722
62
- siibra/vocabularies/region_aliases.json,sha256=T2w1wRlxPNTsPppXn0bzC70tNsb8mOjLsoHuxDSYm2w,8563
63
- siibra/volumes/__init__.py,sha256=KFOT756W63pIEtw9lZGDzQYExOg94A1wvsuUEgLwVak,965
64
- siibra/volumes/gifti.py,sha256=_LUHgPqndzSj9nNH70Ee2lWMkockVGdi2_JufuaExG4,5551
65
- siibra/volumes/neuroglancer.py,sha256=HWxhTh2FviLkNHdKL-_OMtl3oC6-WQb5b8skdvQ0ql8,24504
66
- siibra/volumes/nifti.py,sha256=nGSCedjpsiy43XIiHQ2SRy9rPRK8Ci9QDq4AHKclCck,9030
67
- siibra/volumes/parcellationmap.py,sha256=nSxkVRbIhyrE6dXzVkrtGk1uoZlPQE1Mcgn1s2vjbZo,44173
68
- siibra/volumes/sparsemap.py,sha256=_vM14wKn-7PHBIbT9rBKGGN4XQXijdKtT6BnyKxWXeE,21682
69
- siibra/volumes/volume.py,sha256=Er8w5c76ZEKmoWyvEU-HHmZ6bbh8YM51j3jT-XRYDtU,10889
70
- siibra-0.5a2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
71
- siibra-0.5a2.dist-info/METADATA,sha256=-uOfumS914WIVtGOE8WoxTedytQP48sgK7fTcuX7kSU,9803
72
- siibra-0.5a2.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
73
- siibra-0.5a2.dist-info/top_level.txt,sha256=NF0OSGLL0li2qyC7MaU0iBB5Y9S09_euPpvisD0-8Hg,7
74
- siibra-0.5a2.dist-info/RECORD,,