DICOMDIR

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

DICOMDIR

#1 Post by ub_2k »

Hi,

I have MR DICOM files CD in which there are folders(of different patient), each folder containing images pertaining to a series. I mean each frame is written as separate DICOM file and clubbed into a folder so that it represents 1 volume of MR image of that patient.

Now, I want to create a DICOMDIR so that it maintains that folder structure that I have. Somthing like Patient1--->Study1---->Series1----image 1..10 etc. Can I do it using dcmmkdir?

I tried creating using options "+I +id C:\M +r +D C:\M\DICOMDIR " for 1 folder, but it creates each frame or image as different patient.

Thanks,
Uday

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 »

What is the output in verbose/debug mode? Since you specified the invent option (+I): Do all images that belong to the same patient share the same (non-empty) Patient ID?

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#3 Post by ub_2k »

Hi Jorg,

That's a good catch, my DICOM files are anonymized, there is no Patient Id nor Patient Name, hence I had to specify the +I option to generate one as without it it throws an error. How can I force to generate the same patient id?

Thanks,
Uday

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 »

If the Parient ID is empty, at least the Patient's Name should be non-empty and identical for all images that belong to the same Patient.

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#5 Post by ub_2k »

Jorg, thanks for the prompt response. No it does not have a patient name.

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

#6 Post by Jörg Riesmeier »

Ok, this explains why a new PATIENT record is created for each image. The DICOMDIR creation code in DCMTK requires that at least the Patient ID or the Patient's Name is present in the referenced DICOM file in order to associate the file with a particular patient. If this is not the case and the invent mode is enabled, a new PATIENT record is created for each file. Of course, it should also be possible to use the Study Instance UID and/or Series Instance UID as another criterion on the patient level but this would require significant changes to the code ...

So in your case, it's probably the easiest thing to add a dummy Patient ID and/or Patient's Name to the files before adding them to the DICOMDIR.

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#7 Post by ub_2k »

Hi Jorg,

Thanks, but what is the standard? Can we use any Type1 field to build a DICOMDIR? Or are there any specific attributes to be used?

Thanks,
Uday

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

#8 Post by Jörg Riesmeier »

Did you read my last sentence?

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#9 Post by ub_2k »

Yep, I read it but can we use any type I attribute to build the DICOMDIR if some attributes like Patient Id or Patient Name or anonymized?

Thanks,
Uday

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

#10 Post by Jörg Riesmeier »

I have to admit that I still don't know exactly what your question is ...

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#11 Post by ub_2k »

Hi Jorg,

Sorry for any confusion created. I would elaborate more on my question,

You said that I can generate dummy patient id or patient name to solve my issue, but if I do not want to do it, then can I use any type 1 attribute present (as Study UID etc, I know few attribute that are of type 2 for DICOM and type 1 for DICOMDIR) to club them into single patient record? In doing so would I be following the DICOM standard for creating the DICOMDIR? Sorry for asking too many things, I am petty new to DICOM and in process of learning things.

Thanks a lot for your time.

Thanks,
Uday

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

#12 Post by Jörg Riesmeier »

The reason for all the trouble is that the Patient ID is type 2 in the image IODs but type 1 in the DICOMDIR. So, when the "invent mode" is enabled dcmmkdir creates a new Patient ID value for each new patient for which the Patient ID element is empty. However, as I wrote before this meachnism requires the Patient's Name to be present (non-empty) in the image object. Otherwise dcmmkdir cannot associate different image objects with the same patient (i.e. PATIENT directory record).

ub_2k
Posts: 12
Joined: Thu, 2009-02-26, 19:12

#13 Post by ub_2k »

Thanks for the clarification Jorg, I created a dummy pateint ID and it works fine now.

Thanks once again for all the support.

Post Reply

Who is online

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