DICOMDIR (again)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Posts: 8
Joined: Mon, 2004-11-08, 22:31

DICOMDIR (again)

#1 Post by okigan » Wed, 2006-04-12, 00:24

Creation of DICOMDIR takes quite a bit of time. Seems one
of the reasons might be double read of the dicom file.
First time in the DicomDirInterface class then in
DcmDirectoryRecord (fillElementsAndReadSOP function).

In documentation there is a hint that addDicomFile could take
a yet not existing file, but not clear how to use it. And from
source I am not sure if it is supported.

Question: Is it possible to avoid the second read in

Also I added a variation of addDicomFile to DcmFileFormat&
to already loaded dataset.

Below is the function except (sorry this not the latest latest release)

Code: Select all

OFCondition DcmDirectoryRecord::fillElementsAndReadSOP(const char *referencedFileID,
                                                       const char *sourceFileName)
    if (referencedFileID != NULL && *referencedFileID != '\0')
        if (DirRecordType != ERT_Mrdr)
            refFile = new DcmFileFormat();
            l_error = refFile->loadFile(fileName);
Last edited by okigan on Wed, 2011-02-16, 15:55, edited 3 times in total.

Jörg Riesmeier
Posts: 2217
Joined: Fri, 2004-10-29, 21:38
Location: Oldenburg, Germany

#2 Post by Jörg Riesmeier » Tue, 2006-05-09, 10:19

Thanks for your suggestion. I've added a note to our to-do list.

The DICOMDIR related stuff needs indeed some speed improvement. This is at least true for DICOM storage media with more than a few thousand DICOM files. We already received a couple of other suggestions for improving the performance ...

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

#3 Post by J. Riesmeier » Thu, 2011-09-22, 15:47

With the latest snapshot (from today) we've tried to enhance the performance of the DICOMDIR code significantly. Could you please check? Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest