tags:

views:

405

answers:

2

I have a folder filled with DICOM structures. It starts with a DICOMDIR and goes on from there.

I want to encapsulate this as a single .dcm file for easy sharing and uploading. Does anyone know how to do this? Tools that utilize pydicom, dcm4chee2 toolkit, or DCMTK are preferable since I already have these things installed and functional.

Thanks in advance. : )

+2  A: 

Unfortunately DICOM is structured in such a way that this is more than likely not possible. First, as you may know, the DICOMDIR is a DICOM Directory file and is supposed to be in the root directory of DICOM Media such as a DICOM CD or DVD. The DICOMDIR contains references to all the other files contained on the media. A typical DICOM viewer/reader would look at the DICOMDIR to find the location and content of the other files on the media, display the contents for a user, and then load/view the appropriate files selected by the user.

The DICOM information model itself is hierarchical. The levels of the model are the Patient, Study, Series, and Image/Instance level. IE, a Patient has 1..N studies, a Study has 1..N Series, and a Series has 1..N images/instances. A DICOMDIR file reconstructs this hierarchy for all of the instances contained on the piece of media. The DICOM files themselves reside at the Instance level.

So, the main reason why you cannot combine the files into a single dcm file is that your directory of files may have references to images from multiple patients/studies/series, which cannot be encoded in DICOM in a single file.

The only way you could potentially combine the files into a single file would be if all of the images/files referenced by the DICOMDIR were contained in a single series. There are several DICOM SOP Classes (Service Object Pair Classes) that allow multi-frame images. If the type of images referenced supported multi-frame data and were in a single series, you could combine the images together into a single file. More than likely, however, this is not the case.

As a final FYI, the files contained on DICOM media are not allowed to have ".dcm" extensions on them.

Steve Wranovsky
A: 

DICOM is a binary format and can have a variety of encodings (Litte and Big Endian, ...). dcmdump and dump2dcm can only used to convert the binary file to a more human-readable format and back.

Nico