Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions datamint/api/endpoints/annotations_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ async def _upload_segmentations_async(self,
file_path=file_path,
name=name,
imported_from=imported_from,
author_email=author_email,
worklist_id=worklist_id,
model_id=model_id,
transpose_segmentation=transpose_segmentation,
Expand Down Expand Up @@ -602,7 +601,6 @@ def upload_volume_segmentation(self,
file_path: str | Path | np.ndarray,
name: dict[int, str] | None = None,
imported_from: str | None = None,
author_email: str | None = None,
worklist_id: str | None = None,
model_name: str | None = None,
transpose_segmentation: bool = False,
Expand All @@ -622,7 +620,6 @@ def upload_volume_segmentation(self,
name: Mapping of integer label values to segmentation names.
Example: {1: 'liver', 2: 'tumor'}
imported_from: The imported from value.
author_email: The author email.
worklist_id: The annotation worklist unique id.
model_name: The AI model name.
transpose_segmentation: Whether to transpose the segmentation before uploading.
Expand Down Expand Up @@ -678,7 +675,6 @@ def upload_volume_segmentation(self,
file_path=file_path,
name=name,
imported_from=imported_from,
author_email=author_email,
worklist_id=worklist_id,
model_id=model_id,
transpose_segmentation=transpose_segmentation,
Expand Down Expand Up @@ -905,7 +901,6 @@ async def _upload_volume_segmentation_async(self,
file_path: str | np.ndarray,
name: str | dict[int, str] | dict[tuple, str] | None,
imported_from: str | None = None,
author_email: str | None = None,
worklist_id: str | None = None,
model_id: str | None = None,
transpose_segmentation: bool = False,
Expand All @@ -920,7 +915,6 @@ async def _upload_volume_segmentation_async(self,
file_path: Path to segmentation file or numpy array.
name: The name of the segmentation (string only for volumes).
imported_from: The imported from value.
author_email: The author email.
worklist_id: The annotation worklist unique id.
model_id: The model unique id.
transpose_segmentation: Whether to transpose the segmentation.
Expand Down Expand Up @@ -959,6 +953,8 @@ async def _upload_volume_segmentation_async(self,
form.add_field('annotation_worklist_id', worklist_id)
if source is not None:
form.add_field('source', source)
if imported_from is not None:
form.add_field('imported_from', imported_from)
form.add_field('segmentation_map', json.dumps(name), content_type='application/json')

try:
Expand Down Expand Up @@ -994,6 +990,8 @@ async def _upload_volume_segmentation_async(self,
form.add_field('annotation_worklist_id', worklist_id)
if source is not None:
form.add_field('source', source)
if imported_from is not None:
form.add_field('imported_from', imported_from)
if name is not None:
form.add_field('segmentation_map', json.dumps(name), content_type='application/json')

Expand Down
Loading