Encapsulate ZIP file in DICOM file

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
Jingkun4dcmtk
Posts: 7
Joined: Wed, 2023-02-08, 18:18

Encapsulate ZIP file in DICOM file

#1 Post by Jingkun4dcmtk »

Hi Team,

I'm trying to encapsulate zip, txt, or json file, etc into DICOM file via private attribute, for example. No similar topics have been found in this channel yet.

Any suggestion?

Thanks,
Jingkun

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Encapsulate ZIP file in DICOM file

#2 Post by Michael Onken »

Hi Jingkun,

some general info how to insert private data can be found in our Howtos: https://support.dcmtk.org/redmine/proje ... rivateData

Best regards,
Michael

Jingkun4dcmtk
Posts: 7
Joined: Wed, 2023-02-08, 18:18

Re: Encapsulate ZIP file in DICOM file

#3 Post by Jingkun4dcmtk »

Hi Michael,

Adding private attribute won't be able to encapsulate files into DICOM object as far as I know.

I should make my question more specific. There are three IODs of Encapsulating documents defined in DICOM standard. DCMTK also implemented DcmEncapsulatedDocument which allows encapsulating PDF file in DICOM. Is it possible to encapsulate ZIP TXT or JSON using DcmEncapsulatedDocument? Any other suggestions?

Thanks,
Jingkun

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Encapsulate ZIP file in DICOM file

#4 Post by J. Riesmeier »

No, the DcmEncapsulatedDocument does not support this, as the DICOM standard does not support this. Encapsulating ZIP, TXT or JSON files, would be a private extension and should be encoded appropriately, e.g. by using private attributes in a standard Storage SOP Class or by using a private SOP Class.

However, I personally would not recommend to encapsulate these types of data. Text files could be converted to PDF or encoded as DICOM SR (Structured Report). JSON files will probably also contain structured data, so they should be encoded as DICOM SR. Regarding ZIP files, I don't know what their contents is.

Bottom line: we don't know your use case, but storing private data in a standardized encapsulation format only makes sense in very rare cases. It always means that probably only the creator can actually read (and interpret) the stored data, which contradicts the purpose of a vendor-independent standard like DICOM.
Last edited by J. Riesmeier on Tue, 2023-05-09, 09:16, edited 2 times in total.

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: Encapsulate ZIP file in DICOM file

#5 Post by Michael Onken »

Hi,

no, there is no specific IOD for this task. In DICOM there is so far: Encapsulated PDF, Enc. CDA, Enc. STL, Enc. OBJ and Enc. MTL. The only way to encapsulate a ZIP file would be private data, and/or using the Raw Data IOD.

Best regards,
Michael

Jingkun4dcmtk
Posts: 7
Joined: Wed, 2023-02-08, 18:18

Re: Encapsulate ZIP file in DICOM file

#6 Post by Jingkun4dcmtk »

Hi Michael and Riesmeier,

Thank you very much for your responses. Using DICOM SR IOD might be a reasonable approach to embed Json files.

Regard,
Jingkun

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest