Create DicomDir

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
lavoiekeven
Posts: 3
Joined: Fri, 2009-10-30, 15:26

Create DicomDir

#1 Post by lavoiekeven »

Hi i'm trying to create a dicomdir and having some problem
I'm working with DCMTK 3.5.4

here what i'm doing :


{
DicomDirInterface dcmDir;

dcmDir.createNewDicomDir(DicomDirInterface::Ap_Default, "c:\\Temp\\DICOMDIR");

dcmDir.addDicomFile("DICOM\\VIEW0001","c:\\Temp");

dcmDir.writeDicomDir()
}

i have a file VIEW0001.dcm in C:\\Temp\\DICOM\\

i have also try to do :

OFCondition cond;
cond = dcmDir.checkDicomFile("DICOM\VIEW0001","c:\\Temp");

and the error return in cond is "No such File or Directory"

what i'm doing wrong ??

I'have done a test by removing the extention .dcm and the error in cond is :"Storage media application profile violated"

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'have done a test by removing the extention .dcm
A file extension is not allowed for DICOM files referenced from a DICOMDIR!
and the error in cond is :"Storage media application profile violated"
This means that you are trying to add a DICOM file to the DICOMDIR which is not allowed according to the selected application profile (i.e. STD-GEN-CD).

It would probably help if you would first try to create a DICOMDIR using the ready-to-use tools dcmgpdir and/or dcmmkdir. Of course, you should also understand what a DICOMDIR and a Media Storage Application Profile is. Please read the DICOM standard for details (especially part 10-12).

lavoiekeven
Posts: 3
Joined: Fri, 2009-10-30, 15:26

#3 Post by lavoiekeven »

Thanks for your help

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest