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);
....
}
....
}
....
}
Igor