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:
- Open the encapsulated DICOM file — click Open files… (⌘O).
- Run the extraction command — press ⌘P to open the command palette, then select Extract encapsulated document.
- Save the output — the system downloads the embedded document (e.g.
.pdffor an Encapsulated PDF). - Verify — open the extracted file. The content matches the original document.
Wrapping:
- Open any DICOM file (as a metadata template) — click Open files… (⌘O).
- Open the Wrap Document modal — press ⌘P, then select Wrap non-DICOM document….
- Select the file to wrap — choose a PDF, STL, or other supported format.
- Enter patient metadata — provide Patient Name, Patient ID, and Document Title.
- Wrap — click Create to generate an Encapsulated Document DICOM file.
Round-trip verification:
- Load the wrapped DICOM file. Verify PatientName and DocumentTitle tags match entered values.
- 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.