Skip to content

Conversation

@JBWilkie
Copy link
Contributor

@JBWilkie JBWilkie commented Nov 25, 2024

Problem

We discovered that DICOM slices uploaded as series via darwin-py would result in items that could not be viewed in MPR, and some would outright fail to process - This is despite the same files being uploadable via the UI as ZIP archives with the .dcm extension

This comes down to a difference in the way that darwin-py was uploading data vs. what happens happens when you upload a .dcm ZIP archive through the UI. Currently, darwin-py sends a registration payload to /register_upload containing as many objects are there are slices to be uploaded. This causes backend to assume the item is a multi-slotted item, in which case we cannot display volumes. Therefore backend sets is_volume=False, which disables MPR

The reason backend makes this assumption is that it currently doesn't have a way to know for certain if every item in the payload is part of the same slot at the point where this logic is present

Solution

This PR changes the way darwin-py uploads DICOM series. Specifically:

  • Every slice bound for a specific item is placed in a ZIP archive, then the archive is renamed to .dcm
  • We remove the ignore_dicom_layout flag when uploading DICOM series to more closely mirror the UI-upload experience
  • We always use slot name "0" as this is required for MPR to work
  • We set layout to None as layout is not required for single-slotted items

Changelog

Allowed upload of volumetric DICOM series from folders of slices via darwin-py

@linear
Copy link

linear bot commented Nov 25, 2024

@JBWilkie JBWilkie merged commit 96d9a60 into master Nov 26, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants