From 148d2a0dcea649962142fe25b5750a2db7e1207f Mon Sep 17 00:00:00 2001 From: Jo-Byr Date: Fri, 11 Jul 2025 09:03:33 +0200 Subject: [PATCH] e2e test for nifti multi-segment conversion --- e2e_tests/cli/test_convert.py | 5 + .../from/axial_RPI_pixdim_1.0_1.0_1.0.json | 259 ++++++++++++++++++ .../from/coronal_LAS_pixdim_0.1_0.2_0.5.json | 259 ++++++++++++++++++ .../from/sagittal_LPI_pixdim_0.1_0.2_0.5.json | 259 ++++++++++++++++++ ...ial_RPI_pixdim_1.0_1.0_1_Segments_m.nii.gz | Bin 0 -> 2510 bytes .../axial_RPI_pixdim_1.0_1.0_1_mask1_m.nii.gz | Bin 0 -> 2469 bytes .../axial_RPI_pixdim_1.0_1.0_1_mask2_m.nii.gz | Bin 0 -> 2467 bytes ...nal_LAS_pixdim_0.1_0.2_0_Segments_m.nii.gz | Bin 0 -> 2472 bytes ...oronal_LAS_pixdim_0.1_0.2_0_mask1_m.nii.gz | Bin 0 -> 2447 bytes ...oronal_LAS_pixdim_0.1_0.2_0_mask2_m.nii.gz | Bin 0 -> 2447 bytes ...tal_LPI_pixdim_0.1_0.2_0_Segments_m.nii.gz | Bin 0 -> 2535 bytes ...gittal_LPI_pixdim_0.1_0.2_0_mask1_m.nii.gz | Bin 0 -> 2491 bytes ...gittal_LPI_pixdim_0.1_0.2_0_mask2_m.nii.gz | Bin 0 -> 2489 bytes 13 files changed, 782 insertions(+) create mode 100644 e2e_tests/data/convert/nifti-multi-segment/from/axial_RPI_pixdim_1.0_1.0_1.0.json create mode 100644 e2e_tests/data/convert/nifti-multi-segment/from/coronal_LAS_pixdim_0.1_0.2_0.5.json create mode 100644 e2e_tests/data/convert/nifti-multi-segment/from/sagittal_LPI_pixdim_0.1_0.2_0.5.json create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_Segments_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask1_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask2_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_Segments_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask1_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask2_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_Segments_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask1_m.nii.gz create mode 100644 e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask2_m.nii.gz diff --git a/e2e_tests/cli/test_convert.py b/e2e_tests/cli/test_convert.py index 863b6c0cc..456af1544 100644 --- a/e2e_tests/cli/test_convert.py +++ b/e2e_tests/cli/test_convert.py @@ -70,6 +70,11 @@ def compare_directories(self, path: Path, expected_path: Path) -> None: data_path / "nifti-multislot/from", data_path / "nifti-multislot/to", ), + ( + "nifti", + data_path / "nifti-multi-segment/from", + data_path / "nifti-multi-segment/to", + ), ( "instance_mask", data_path / "instance_mask/from", diff --git a/e2e_tests/data/convert/nifti-multi-segment/from/axial_RPI_pixdim_1.0_1.0_1.0.json b/e2e_tests/data/convert/nifti-multi-segment/from/axial_RPI_pixdim_1.0_1.0_1.0.json new file mode 100644 index 000000000..7c64e0c0b --- /dev/null +++ b/e2e_tests/data/convert/nifti-multi-segment/from/axial_RPI_pixdim_1.0_1.0_1.0.json @@ -0,0 +1,259 @@ +{ + "version": "2.0", + "schema_ref": "https://darwin-public.s3.eu-west-1.amazonaws.com/darwin_json/2.0/schema.json", + "item": { + "name": "axial_RPI_pixdim_1.0_1.0_1.0.dcm", + "path": "/", + "source_info": { + "item_id": "0197ee1d-591e-a61b-82e2-e6f1e5c30cf2", + "dataset": { + "name": "dicom_test_data_new", + "slug": "dicom_test_data_new", + "dataset_management_url": "https://darwin.v7labs.com/datasets/1856922/dataset-management" + }, + "team": { + "name": "V7 John", + "slug": "v7-john" + }, + "workview_url": "https://darwin.v7labs.com/workview?dataset=1856922&item=0197ee1d-591e-a61b-82e2-e6f1e5c30cf2" + }, + "slots": [ + { + "type": "dicom", + "slot_name": "0", + "width": 128, + "height": 128, + "fps": null, + "thumbnail_url": "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/thumbnail?token=590de404-3490-4dde-90f9-d13136b0d14f", + "source_files": [ + { + "file_name": "axial_RPI_pixdim_1.0_1.0_1.0.dcm", + "url": "https://darwin.v7labs.com/api/v2/teams/v7-john/uploads/d4f4e7cd-e8a8-407f-9ff3-0a1f3298c84c?token=590de404-3490-4dde-90f9-d13136b0d14f" + } + ], + "frame_count": 16, + "frame_urls": [ + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/0?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/1?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/2?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/3?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/4?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/5?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/6?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/7?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/8?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/9?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/10?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/11?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/12?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/13?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/14?token=590de404-3490-4dde-90f9-d13136b0d14f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/243d7c36-d767-4e3c-adb0-44324ebd14fe/sections/15?token=590de404-3490-4dde-90f9-d13136b0d14f" + ], + "metadata": { + "handler": "MONAI", + "shape": [ + 1, + 128, + 128, + 16 + ], + "SeriesInstanceUID": "1.2.826.0.1.3680043.8.498.37180825650614764423282910493086149224", + "affine": "[[-1.0, 0.0, 0.0, 127.0], [0.0, -1.0, 0.0, 0.0], [0.0, 0.0, -1.0, 15.0], [0.0, 0.0, 0.0, 1.0]]", + "colorspace": "RG16", + "original_affine": [ + [ + "1.0", + "0.0", + "0.0", + "0.0" + ], + [ + "0.0", + "-1.0", + "0.0", + "0.0" + ], + [ + "0.0", + "0.0", + "1.0", + "0.0" + ], + [ + "0.0", + "0.0", + "0.0", + "1.0" + ] + ], + "pixdim": "(1.0, 1.0, 1.0)", + "plane_map": { + "0": "AXIAL" + }, + "primary_plane": "AXIAL" + } + } + ] + }, + "annotations": [ + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "02c693fa-97f5-4a3c-9c45-e1d9eebb0731", + "interpolate_algorithm": "linear-1.1", + "name": "mask1", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "d212f8a6-8e09-4901-a44b-77745626edc9", + "interpolate_algorithm": "linear-1.1", + "name": "mask2", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "raster_layer": { + "dense_rle": [ + 0, + 2104, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 11816 + ], + "mask_annotation_ids_mapping": { + "02c693fa-97f5-4a3c-9c45-e1d9eebb0731": 1, + "d212f8a6-8e09-4901-a44b-77745626edc9": 2 + }, + "total_pixels": 16384 + } + } + }, + "id": "a15c3b3e-89af-4733-b6c7-10f01e2c0b57", + "name": "__raster_layer__", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 0, + 16 + ] + ], + "slot_names": [ + "0" + ] + } + ], + "properties": [] +} \ No newline at end of file diff --git a/e2e_tests/data/convert/nifti-multi-segment/from/coronal_LAS_pixdim_0.1_0.2_0.5.json b/e2e_tests/data/convert/nifti-multi-segment/from/coronal_LAS_pixdim_0.1_0.2_0.5.json new file mode 100644 index 000000000..e42e9e8d3 --- /dev/null +++ b/e2e_tests/data/convert/nifti-multi-segment/from/coronal_LAS_pixdim_0.1_0.2_0.5.json @@ -0,0 +1,259 @@ +{ + "version": "2.0", + "schema_ref": "https://darwin-public.s3.eu-west-1.amazonaws.com/darwin_json/2.0/schema.json", + "item": { + "name": "coronal_LAS_pixdim_0.1_0.2_0.5.dcm", + "path": "/", + "source_info": { + "item_id": "0197ee1d-591e-7d19-bb01-65d27fb0bcdd", + "dataset": { + "name": "dicom_test_data_new", + "slug": "dicom_test_data_new", + "dataset_management_url": "https://darwin.v7labs.com/datasets/1856922/dataset-management" + }, + "team": { + "name": "V7 John", + "slug": "v7-john" + }, + "workview_url": "https://darwin.v7labs.com/workview?dataset=1856922&item=0197ee1d-591e-7d19-bb01-65d27fb0bcdd" + }, + "slots": [ + { + "type": "dicom", + "slot_name": "0", + "width": 128, + "height": 128, + "fps": null, + "thumbnail_url": "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/thumbnail?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "source_files": [ + { + "file_name": "coronal_LAS_pixdim_0.1_0.2_0.5.dcm", + "url": "https://darwin.v7labs.com/api/v2/teams/v7-john/uploads/bbf2147d-e328-4a93-a624-90f9c474a071?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f" + } + ], + "frame_count": 16, + "frame_urls": [ + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/0?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/1?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/2?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/3?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/4?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/5?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/6?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/7?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/8?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/9?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/10?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/11?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/12?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/13?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/14?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/b33547f6-c281-4766-97cf-1623f00353f5/sections/15?token=971b08d7-a0d7-4d95-a22f-f1f7429b207f" + ], + "metadata": { + "handler": "MONAI", + "shape": [ + 1, + 128, + 16, + 128 + ], + "SeriesInstanceUID": "1.2.826.0.1.3680043.8.498.10392093638286046303269310577715221690", + "affine": "[[-0.1, 0.0, 0.0, 0.0], [0.0, -1.0, 0.0, 0.0], [0.0, 0.0, -0.25, 31.75], [0.0, 0.0, 0.0, 1.0]]", + "colorspace": "RG16", + "original_affine": [ + [ + "-0.1", + "0.0", + "0.0", + "0.0" + ], + [ + "0.0", + "0.0", + "-1.0", + "0.0" + ], + [ + "0.0", + "0.25", + "0.0", + "0.0" + ], + [ + "0.0", + "0.0", + "0.0", + "1.0" + ] + ], + "pixdim": "(0.1, 1.0, 0.25)", + "plane_map": { + "0": "CORONAL" + }, + "primary_plane": "CORONAL" + } + } + ] + }, + "annotations": [ + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "0a8b3cfb-d6ff-427a-8b3e-a31410f10331", + "interpolate_algorithm": "linear-1.1", + "name": "mask1", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "0e845870-995b-4cb7-982e-741c1e54109e", + "interpolate_algorithm": "linear-1.1", + "name": "mask2", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "raster_layer": { + "dense_rle": [ + 0, + 6184, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 7736 + ], + "mask_annotation_ids_mapping": { + "0a8b3cfb-d6ff-427a-8b3e-a31410f10331": 1, + "0e845870-995b-4cb7-982e-741c1e54109e": 2 + }, + "total_pixels": 16384 + } + } + }, + "id": "1af4d613-c4c4-41cd-a53a-2e8905f90b95", + "name": "__raster_layer__", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 0, + 16 + ] + ], + "slot_names": [ + "0" + ] + } + ], + "properties": [] +} \ No newline at end of file diff --git a/e2e_tests/data/convert/nifti-multi-segment/from/sagittal_LPI_pixdim_0.1_0.2_0.5.json b/e2e_tests/data/convert/nifti-multi-segment/from/sagittal_LPI_pixdim_0.1_0.2_0.5.json new file mode 100644 index 000000000..b757dee96 --- /dev/null +++ b/e2e_tests/data/convert/nifti-multi-segment/from/sagittal_LPI_pixdim_0.1_0.2_0.5.json @@ -0,0 +1,259 @@ +{ + "version": "2.0", + "schema_ref": "https://darwin-public.s3.eu-west-1.amazonaws.com/darwin_json/2.0/schema.json", + "item": { + "name": "sagittal_LPI_pixdim_0.1_0.2_0.5.dcm", + "path": "/", + "source_info": { + "item_id": "0197ee1d-5920-c9f8-017f-987b38e38f5f", + "dataset": { + "name": "dicom_test_data_new", + "slug": "dicom_test_data_new", + "dataset_management_url": "https://darwin.v7labs.com/datasets/1856922/dataset-management" + }, + "team": { + "name": "V7 John", + "slug": "v7-john" + }, + "workview_url": "https://darwin.v7labs.com/workview?dataset=1856922&item=0197ee1d-5920-c9f8-017f-987b38e38f5f" + }, + "slots": [ + { + "type": "dicom", + "slot_name": "0", + "width": 128, + "height": 128, + "fps": null, + "thumbnail_url": "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/thumbnail?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "source_files": [ + { + "file_name": "sagittal_LPI_pixdim_0.1_0.2_0.5.dcm", + "url": "https://darwin.v7labs.com/api/v2/teams/v7-john/uploads/54adbf48-0129-44ea-978c-313aeb35627b?token=4ca42b77-ad16-42ce-82e1-e9c762085012" + } + ], + "frame_count": 16, + "frame_urls": [ + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/0?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/1?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/2?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/3?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/4?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/5?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/6?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/7?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/8?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/9?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/10?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/11?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/12?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/13?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/14?token=4ca42b77-ad16-42ce-82e1-e9c762085012", + "https://darwin.v7labs.com/api/v2/teams/v7-john/files/c160652a-9d74-4a27-91f5-158bd68eab2c/sections/15?token=4ca42b77-ad16-42ce-82e1-e9c762085012" + ], + "metadata": { + "handler": "MONAI", + "shape": [ + 1, + 16, + 128, + 128 + ], + "SeriesInstanceUID": "1.2.826.0.1.3680043.8.498.16951377570626244557338024182864652772", + "affine": "[[-1.0, 0.0, 0.0, 15.0], [0.0, -0.1, 0.0, 0.0], [0.0, 0.0, -0.25, 0.0], [0.0, 0.0, 0.0, 1.0]]", + "colorspace": "RG16", + "original_affine": [ + [ + "0.0", + "0.0", + "1.0", + "0.0" + ], + [ + "-0.1", + "0.0", + "0.0", + "0.0" + ], + [ + "0.0", + "-0.25", + "0.0", + "0.0" + ], + [ + "0.0", + "0.0", + "0.0", + "1.0" + ] + ], + "pixdim": "(1.0, 0.1, 0.25)", + "plane_map": { + "0": "SAGITTAL" + }, + "primary_plane": "SAGITTAL" + } + } + ] + }, + "annotations": [ + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "2d12dc2e-5cc5-4bb7-89ce-5f010fc0f184", + "interpolate_algorithm": "linear-1.1", + "name": "mask1", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "mask": {} + } + }, + "global_sub_types": {}, + "id": "97117be2-ae2e-4431-bcd3-5dd724121489", + "interpolate_algorithm": "linear-1.1", + "name": "mask2", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 15, + 16 + ] + ], + "slot_names": [ + "0" + ] + }, + { + "frames": { + "15": { + "keyframe": true, + "raster_layer": { + "dense_rle": [ + 0, + 2088, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 1, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 96, + 2, + 32, + 0, + 11832 + ], + "mask_annotation_ids_mapping": { + "2d12dc2e-5cc5-4bb7-89ce-5f010fc0f184": 1, + "97117be2-ae2e-4431-bcd3-5dd724121489": 2 + }, + "total_pixels": 16384 + } + } + }, + "id": "c41d3017-793b-41f8-b9be-fa95d2e505ef", + "name": "__raster_layer__", + "only_keyframes": true, + "properties": [], + "ranges": [ + [ + 0, + 16 + ] + ], + "slot_names": [ + "0" + ] + } + ], + "properties": [] +} \ No newline at end of file diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_Segments_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_Segments_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..3feaf827d5155849b4aaaaf0397a8882b1a76067 GIT binary patch literal 2510 zcmb2|=3oE;mj7>WUi3X|Ai$Qe-GHI`!x0vn4Q$2+&hAOfVcAMM+QS^J=C)dR&tH7P zEBW;IdcR*6_RV)&W!rPQ%%=D9`9kZLg}XOzKYhJy-@m%LeYN*@&;45;{(SGVwf7d6 zefc@>{XW@V>BoPrv%bpS#Y?@qWv<$7 z^?2-f^^W2C!Yv`06BplFE|zJtVwUwY)4pk1x|>mU~uJv59LhZ1@;OX5*Rrc02Ri5 As{jB1 literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask1_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask1_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..8a3ec61ae1ae99edf39aaf783a124b4649d7346f GIT binary patch literal 2469 zcmb2|=3oE;mj7>W?BzY=z{7UoaXQ1d1xZX?*Am#$5>(6*OobY|7bryL6@1j|^7G7@ zyFdKdF3FW!rN6(l>N)#7%IxiO{m;AXm;e6ryDsM5{b_gqSKm5k?EiV)+O6M<_r2d5 zW`68##V@@tJ`D_vOe`D%3Jy?)2j`Lh(_hWAT2dHjTK>hfZ<>^DQONfzioM;db}n9D zxaCU5#KpUo^JT__oRzKZUA)w-Tjr{5smJ3*S?^wC%jlX$Jz4Q?rL&ZHXt8_z;|w=t wn7MEZMj6P#JsKLLp@EhIN0Y>8k{C@Aqq$%-7YxE&kl84nvU^EX0wV_l0ONFBLI3~& literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask2_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/axial_RPI_pixdim_1.0_1.0_1.0/0/axial_RPI_pixdim_1.0_1.0_1_mask2_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..6952c3979256732ffa3470a301f2569d8976f640 GIT binary patch literal 2467 zcmb2|=3oE;mj7>W?&Uq?z{7UoaXQ1d1xZX?*Am#$5>(6*OobY`3nomEPI(zCGWXFD z_4@T^D^2U7W*5#~cQ<11y6?;0eo2eF{<}ne|NZTkKi{qX{(s)J&u1?0@y=dp_xyK^ z_x;|&oAP${Uwj%E7@1f&1QZ-F848?7{%?OZk1r=|#k0PBX@!?}OkBKcIrD7MRXZ22 zkGx}&_hiMpmj}{Xv);YP7Blaawp>+hwIOohEbCvhj`}`!>qFAo>y2srs0h|j9}Sk# lV8N9mN7Ke=+89k6qq$%-7Ysx$Xq?X~x8!X(djcZ|0|2foU^oB( literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_Segments_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_Segments_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..cf9b81479922cd6fced1e65ca2351a32d6aaba93 GIT binary patch literal 2472 zcmb2|=3oE;mj7?B?&UpXAix%&Zop6-5E#J3nr*;roT4J;pu=!^1H&_SB@V77+7G6r zpYEEh(e=JIY*Xf`@Z6AHx73$be!1R$?CZI$rR|qL?pSd=Rd)6FjnVhl@3s58d-Jz% zuRd4o+tv5aDoghFzn{hTWUD?$J%7G!?m4^r1ydOqnOHak6dW2x8KZ$Pni58H!DucR z%>|>mU^EvDl3c(nnBl!9J-sXRewx1hjD5d0=QI4aS5x?ZhiT)N+W$q% literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask1_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask1_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..062d845334ac95c2818584f5563a631b1f0d2c4a GIT binary patch literal 2447 zcmb2|=3oE;mj7?Bp5<*akYKnFCV9Ztrt-rInV7?pa~dbc9N56%_n1k{R8Wb1vfP$m zw@kjM^Zvbe{eWHD_ER<{EA^aeu6$gkwf4)>%=59^JkPteaUl1QZ+^7#NvG8KZ$Pni58H!DucR%>|>m zU^EvDzFhEtoi*vi>ZOyPxXOF;+Z+FWr2m&`$Nx&EPx0Fv;=a}XKXtC|$M65~FMk%- Uk=~m5(90BV;8DLNfsum&06qj%X#fBK literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask2_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/coronal_LAS_pixdim_0.1_0.2_0.5/0/coronal_LAS_pixdim_0.1_0.2_0_mask2_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..69127b8eb09f32ff08fb506473a5016eb7f5ca62 GIT binary patch literal 2447 zcmb2|=3oE;mj7?Bp5<*akYKnFCV9Ztrt-rInV7?pa~dbc9N56%_n1k{R8Wb1vYf}^ z?8_JCn|!H`XMQg6PwVxCCA&C31|OfjYRjeR%l4MvRkZD2d3FEWs;cw7<>$?#_Qw5P z@vZcJ+jEb?J8h5i_h+*I6?tB=GpGDAcN(XFfW9t>nM6k&V7AeJCMPlv(wMw@BG;b|_+S_E7f+|^YxDlZn?DM7`1<3(S+{ZwdOKCiO6;?2}E!U_%z42(=H90E{=Q{%Va zr(a0q&0AnGYxi1j0mGb)PbFjzpA{ByFWz3tsnn*sO=fZOj>@J-8Sl2~IUdI7?oa1AzoZt2 zJiGM!&-02?fAwttTQ=^?={prub^pJNf8=z8Ti}iwWgthCJ literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask1_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask1_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..c0dda9437b0c32c2515aa124079d09876b0c25a1 GIT binary patch literal 2491 zcmb2|=3oE;mj7>W9Q0*&#-e@6S2Huu=GZcSJaFKYzz3EHY z)}k_<^XKZ1+q^wCf8FVgXMb0{+4uhO!qqn;uYdcn@&5g@Rr~Aa+w1qYZ+-mofA#K& z`E~Qp+q@2seXoA~l;N>6U#l+7SbzKW&s&L4e?I%Rd|D|J3x|M$LjwaNl;NNy@PB_u z_O8n2G}H1krX4fn42#I+zUV+R9B#`f13An`Lt`{FMsvz&E*Q-Pqq$%-7YyQD@F2X= Nf5*vVs}dMF7yyU?YRv!u literal 0 HcmV?d00001 diff --git a/e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask2_m.nii.gz b/e2e_tests/data/convert/nifti-multi-segment/to/sagittal_LPI_pixdim_0.1_0.2_0.5/0/sagittal_LPI_pixdim_0.1_0.2_0_mask2_m.nii.gz new file mode 100644 index 0000000000000000000000000000000000000000..c9c482017c37e54887b112070266ca26eed79d1b GIT binary patch literal 2489 zcmb2|=3oE;mj7>Wp7mvR#-e@6S2Huu=GZb$G2`Ns{KXK{y z)l;99{hw7|w|RSP{=Cy0&wj6Zv+w@nWvh2?p7-`)^8Wp^zt;7h-#`8M;ai2@|DV;n z=D+`Z{=KiO*Zn-Xxv0mmc<;QNGcUiD?JJ9@+_&>@=4mTNCKe6>1&0O(Oh%(f$N&4Q zO!>2{Ry^z5w`}9*TN4*YeO|DvIqThvY$@yYvX;b3#?HoKJf?-CB3R>LG+0K11y>#& gO&gE4y=7P~&K>J*