datamint 2.4.1__py3-none-any.whl → 2.4.2__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 datamint might be problematic. Click here for more details.
- datamint/api/__init__.py +0 -3
- datamint/api/endpoints/annotations_api.py +0 -1
- datamint/api/endpoints/resources_api.py +6 -3
- datamint/entities/resource.py +1 -5
- {datamint-2.4.1.dist-info → datamint-2.4.2.dist-info}/METADATA +1 -1
- {datamint-2.4.1.dist-info → datamint-2.4.2.dist-info}/RECORD +8 -8
- {datamint-2.4.1.dist-info → datamint-2.4.2.dist-info}/WHEEL +0 -0
- {datamint-2.4.1.dist-info → datamint-2.4.2.dist-info}/entry_points.txt +0 -0
datamint/api/__init__.py
CHANGED
|
@@ -6,7 +6,6 @@ from ..entity_base_api import ApiConfig, CreatableEntityApi, DeletableEntityApi
|
|
|
6
6
|
from .models_api import ModelsApi
|
|
7
7
|
from datamint.entities.annotation import Annotation
|
|
8
8
|
from datamint.entities.resource import Resource
|
|
9
|
-
from datamint.entities.project import Project
|
|
10
9
|
from datamint.api.dto import AnnotationType, CreateAnnotationDto, LineGeometry, BoxGeometry, CoordinateSystem, Geometry
|
|
11
10
|
import numpy as np
|
|
12
11
|
import os
|
|
@@ -2,9 +2,9 @@ from typing import Any, Optional, Sequence, TypeAlias, Literal, IO
|
|
|
2
2
|
from ..base_api import ApiConfig, BaseApi
|
|
3
3
|
from ..entity_base_api import CreatableEntityApi, DeletableEntityApi
|
|
4
4
|
from datamint.entities.resource import Resource
|
|
5
|
-
from datamint.entities.project import Project
|
|
6
5
|
from datamint.entities.annotation import Annotation
|
|
7
6
|
from datamint.exceptions import DatamintException, ResourceNotFoundError
|
|
7
|
+
from datamint.api.dto import AnnotationType
|
|
8
8
|
import httpx
|
|
9
9
|
from datetime import date
|
|
10
10
|
import json
|
|
@@ -147,7 +147,8 @@ class ResourcesApi(CreatableEntityApi[Resource], DeletableEntityApi[Resource]):
|
|
|
147
147
|
|
|
148
148
|
return super().get_list(limit=limit, params=payload)
|
|
149
149
|
|
|
150
|
-
def get_annotations(self, resource: str | Resource
|
|
150
|
+
def get_annotations(self, resource: str | Resource,
|
|
151
|
+
annotation_type: AnnotationType | str | None = None) -> Sequence[Annotation]:
|
|
151
152
|
"""Get annotations for a specific resource.
|
|
152
153
|
|
|
153
154
|
Args:
|
|
@@ -156,7 +157,9 @@ class ResourcesApi(CreatableEntityApi[Resource], DeletableEntityApi[Resource]):
|
|
|
156
157
|
Returns:
|
|
157
158
|
A sequence of Annotation objects associated with the specified resource.
|
|
158
159
|
"""
|
|
159
|
-
return self.annotations_api.get_list(resource=resource
|
|
160
|
+
return self.annotations_api.get_list(resource=resource,
|
|
161
|
+
load_ai_segmentations=True,
|
|
162
|
+
annotation_type=annotation_type)
|
|
160
163
|
|
|
161
164
|
@staticmethod
|
|
162
165
|
def __process_files_parameter(file_path: str | Sequence[str | IO | pydicom.Dataset]
|
datamint/entities/resource.py
CHANGED
|
@@ -176,11 +176,7 @@ class Resource(BaseEntity):
|
|
|
176
176
|
) -> Sequence['Annotation']:
|
|
177
177
|
"""Get annotations associated with this resource."""
|
|
178
178
|
|
|
179
|
-
annotations = self._api.get_annotations(self)
|
|
180
|
-
|
|
181
|
-
if annotation_type:
|
|
182
|
-
annotation_type = AnnotationType(annotation_type)
|
|
183
|
-
annotations = [a for a in annotations if a.annotation_type == annotation_type]
|
|
179
|
+
annotations = self._api.get_annotations(self, annotation_type=annotation_type)
|
|
184
180
|
return annotations
|
|
185
181
|
|
|
186
182
|
# def get_projects(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datamint
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: A library for interacting with the Datamint API, designed for efficient data management, processing and Deep Learning workflows.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
datamint/__init__.py,sha256=ucsnxrYClh6pdy7psRJXWam_9rjAQB4NXzvy7xLovmo,824
|
|
2
|
-
datamint/api/__init__.py,sha256=
|
|
2
|
+
datamint/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
datamint/api/base_api.py,sha256=q-TQKFbupUPCaOTihoFEljxCyTF76ojsDoGkhtIJRPc,20194
|
|
4
4
|
datamint/api/client.py,sha256=x-hkoDoKBWqwVCLbFZjHEWEwfqxo8bwVUSIWB4aebYQ,4018
|
|
5
5
|
datamint/api/dto/__init__.py,sha256=fUi901Zs-q5XHyWwZ4dMi2fEO8-CUEVEdYbpd17lahc,416
|
|
6
6
|
datamint/api/endpoints/__init__.py,sha256=wi4liAb5-wOohwyzKUD6TxHGeZmUPaZerFUGa2IUju4,529
|
|
7
|
-
datamint/api/endpoints/annotations_api.py,sha256=
|
|
7
|
+
datamint/api/endpoints/annotations_api.py,sha256=tkYGljljA1mdnLmmtbw6jP1qDowDygvHC1oIzJ9TLoM,49667
|
|
8
8
|
datamint/api/endpoints/annotationsets_api.py,sha256=NIsPIjGGptiUBxHft-EhOMRG-DsQAthheVqd7ph0id4,409
|
|
9
9
|
datamint/api/endpoints/channels_api.py,sha256=oQqxSw9DJzAqtVQI7-tc1llTdnsm-URx8jwtXNXnhio,867
|
|
10
10
|
datamint/api/endpoints/datasetsinfo_api.py,sha256=WdzrUzK63w9gvAP6U--P65FbD-3X-jm9TPCcYnRNjas,597
|
|
11
11
|
datamint/api/endpoints/models_api.py,sha256=tbVuajc-mCsIp5AKSCoq3uQRDWgKnJaIA6tf_ck8-XY,1502
|
|
12
12
|
datamint/api/endpoints/projects_api.py,sha256=Pfr3fEiMw_aRzoGtcVXHJQ68leVoPAghw23L4ZIglno,8237
|
|
13
|
-
datamint/api/endpoints/resources_api.py,sha256=
|
|
13
|
+
datamint/api/endpoints/resources_api.py,sha256=PY3QMF9yPdO07YDMWpGTC7U3GC4H7R_4KfnUSAKuOXg,52177
|
|
14
14
|
datamint/api/endpoints/users_api.py,sha256=pnkuTZ1B9Y0FtwwvXO8J64e02RSkRxnBmTl9UGSuC5I,1186
|
|
15
15
|
datamint/api/entity_base_api.py,sha256=-8SIt4M8P9G2b8SQznuWpFuFE8zEQjQxkRkw0s_w0Y4,11692
|
|
16
16
|
datamint/apihandler/annotation_api_handler.py,sha256=W3vV4z3BqX1OQe1r7zr8dI-IVu4zUDxED4QttdiWV-E,57098
|
|
@@ -35,7 +35,7 @@ datamint/entities/cache_manager.py,sha256=ZN5_HeyM6c0ocWFsJuJEF4CkuOHr6RPErwhZNY
|
|
|
35
35
|
datamint/entities/channel.py,sha256=9fl22eSx_ng98NosfQGs18cdaRdbeC3wXL61KhSg4Zo,1601
|
|
36
36
|
datamint/entities/datasetinfo.py,sha256=yeGy5CVxqc7h0SFBJROr0UObeIMkOVZKwrOBsZ-iCEg,4151
|
|
37
37
|
datamint/entities/project.py,sha256=QQXBOe6FzupPrCunBcqOlY6d3uqxvnYvGeCq8hZy_U8,4192
|
|
38
|
-
datamint/entities/resource.py,sha256=
|
|
38
|
+
datamint/entities/resource.py,sha256=z7W49TyiHXHYLAsijIcPYQfhJcsQDgBzWNAMckAsYFE,9167
|
|
39
39
|
datamint/entities/user.py,sha256=MREHDOsV9NOBEbXqiQ2ww6DmetN07CELId-ZQVpZCb8,620
|
|
40
40
|
datamint/examples/__init__.py,sha256=zcYnd5nLVme9GCTPYH-1JpGo8xXK2WEYvhzcy_2alZc,39
|
|
41
41
|
datamint/examples/example_projects.py,sha256=sU-Gxy7PPqA0WUfN-ZmXV-0YnwrnzpJ79lMXTJp2DzU,2804
|
|
@@ -61,7 +61,7 @@ datamint/types.py,sha256=2OaY5QJvQIJKxyMNJYzxBksKCa9ZS2gb_ayJrByvu2Y,410
|
|
|
61
61
|
datamint/utils/logging_utils.py,sha256=9pRoaPrWu2jOdDCiAoUsjEdP5ZwaealWL3hjUqFvx9g,4022
|
|
62
62
|
datamint/utils/torchmetrics.py,sha256=lwU0nOtsSWfebyp7dvjlAggaqXtj5ohSEUXOg3L0hJE,2837
|
|
63
63
|
datamint/utils/visualization.py,sha256=yaUVAOHar59VrGUjpAWv5eVvQSfztFG0eP9p5Vt3l-M,4470
|
|
64
|
-
datamint-2.4.
|
|
65
|
-
datamint-2.4.
|
|
66
|
-
datamint-2.4.
|
|
67
|
-
datamint-2.4.
|
|
64
|
+
datamint-2.4.2.dist-info/METADATA,sha256=GUVaw9czq5utZnZErSe9ohdXB7LROheAwGYkacvX6AY,8974
|
|
65
|
+
datamint-2.4.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
66
|
+
datamint-2.4.2.dist-info/entry_points.txt,sha256=wTr9DXteCfAFqLUstN1Qx_SqC_rFLrAUIcDx9q1eXZw,845
|
|
67
|
+
datamint-2.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|