Specialized modalities

Encapsulated PDF/STL extraction & wrap

Extract an encapsulated PDF or STL from a DICOM object, or wrap one in.

Problem

DICOM Encapsulated Document IODs can store PDF, STL, CDA, or other non-image documents inside a DICOM wrapper. You need to extract the encapsulated document for external use, or wrap a non-DICOM file into a DICOM Encapsulated Document for archival.

Steps

Extraction:

  1. Open the encapsulated DICOM file — click Open files… (⌘O).
  2. Run the extraction command — press ⌘P to open the command palette, then select Extract encapsulated document.
  3. Save the output — the system downloads the embedded document (e.g. .pdf for an Encapsulated PDF).
  4. Verify — open the extracted file. The content matches the original document.

Wrapping:

  1. Open any DICOM file (as a metadata template) — click Open files… (⌘O).
  2. Open the Wrap Document modal — press ⌘P, then select Wrap non-DICOM document….
  3. Select the file to wrap — choose a PDF, STL, or other supported format.
  4. Enter patient metadata — provide Patient Name, Patient ID, and Document Title.
  5. Wrap — click Create to generate an Encapsulated Document DICOM file.

Round-trip verification:

  1. Load the wrapped DICOM file. Verify PatientName and DocumentTitle tags match entered values.
  2. Extract the document and confirm it matches the original byte-for-byte.

Expected Result

  • Encapsulated documents extract to their original file format (e.g. .pdf, .stl).
  • Wrapped DICOM files contain the correct PatientName, PatientID, and DocumentTitle.
  • Extracted document content matches the original byte-for-byte.
  • Encapsulated tags are visible in the metadata tree after loading the wrapped file.
  • Round-trip (wrap → extract → compare) produces an identical file.