[DAR-6479][External] Get primary_plane from medical metadata of the slot during nifti export #1061
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Non-axial DICOM files with extracted views and at least one mask annotation break during export in nifti format. We need to know which is the primary_plane for non-axial files in Darwin Py to export them properly. The primary_plane (not axial) determined by the volumetric extractor is not stored in annotation files.
DICOM files uploaded without exporting views have one slot. If the file is non-axial this slot would have the primary plane in the plane map in metadata e.g.
plane_map: {"0": "CORONAL"}.However, files uploaded with views exported have three slots, and always have
plane_map: {"0.1": "AXIAL", "0.2": "CORONAL", "0.3": "SAGITTAL"}. Taking the plane name from the first slot is incorrect, and we need to know which plane is the primary one explicitly.PR to support
primary_planestorage in annotations on the backendSolution
We get
primary_planefrom medical metadata of DICOM annotation files. We use thisprimary_planeset by the volumetric extractor instead of the plane of the first slot to populate volumes from raster layer during nifti export.Changelog
Use
primary_planefrom medical metadata of DICOM annotation files to populate volumes from raster layer during nifti export