Why some of my Dicom files can not Add to DICOMDIR??

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
alang88
Posts: 5
Joined: Sat, 2005-12-24, 14:03

Why some of my Dicom files can not Add to DICOMDIR??

#1 Post by alang88 »

help!!
I follow the example in the forum, but find some of the Dicom files can not be added to DicomDirInterface.
By the way, they can be done with other tools!
look my code, is there any mistake?

DicomDirInterface ddir;
ddir.enableAbortMode(OFFalse);
OFCondition result;
result = ddir.createNewDicomDir( DicomDirInterface::AP_GeneralPurpose,"C:\\myDIR\\DICOMDIR");
if (result.bad())
return;
result = ddir.setFilesetDescriptor("DICOMDIR");
//find file
CString str = gstrDir + "\\*";
CFileFind file;
BOOL bContinue = file.FindFile(str);
while(bContinue)
{
bContinue = file.FindNextFile();
str = file.GetFileName();
result = ddir.addDicomFile(str.GetBuffer(str.GetLength()), gstrDir);
if (result.bad())
{
// MessageBox("No");
}
}
result = ddir.writeDicomDir(EET_ExplicitLength, EGL_withGL);

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 »

I guess that either the filename or the content of these files is incorrect. Try dcmgpdir with option --verbose (and possibly --debug) and see what happens.

alang88
Posts: 5
Joined: Sat, 2005-12-24, 14:03

error msg:

#3 Post by alang88 »

Error: JPEG compression not supported: 1356405
dcmgpdir: error: no good files: DICOMDIR not created

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

#4 Post by Jörg Riesmeier »

The answer is easy: The General Purpose (STD-GEN-CD) application profile does not support compressed images (see DICOM standard for details). You should either decompress the images or use a different application profile with "dcmmkdir".

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest