DICOMDIR (again)

All other questions regarding DCMTK

Moderator: Moderator Team

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

DICOMDIR (again)

#1 Post by okigan »

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
DcmDirectoryRecord::fillElementsAndReadSOP?


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);
            ....
        }
        ....
    }
    ....
}
Thanks,
Igor
Last edited by okigan on Wed, 2011-02-16, 15:55, edited 3 times in total.

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

#2 Post by Jörg Riesmeier »

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: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

#3 Post by J. Riesmeier »

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: Ahrefs [Bot], Baidu [Spider], Google [Bot] and 1 guest