Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
bnoeafk
Posts: 32
Joined: Fri, 2012-10-12, 08:05

Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#1 Post by bnoeafk »

Hi,
I'm playing with the PDF2DCM utility as I want to add a PDF to an existing study and have some general questions about multiple page PDFs and their corresponding SOPInstanceUIDs:
  • I have a StudyInstanceUID of 1.2.3.4.5.6 containing three series, each series having 10 instances.
  • I have a four page PDF that I would like to add to this study
Extracting the StudyInstanceUID, PatientName, PatientBirthdate, PatientID, PatientSex and AccessionNumber from 1.2.3.4.5.6 using dcmdump, I use pdf2dcm and using +pn/i/b/s switches to create my new DICOM file with all the patient information. Adding the encapsulated PDF now to the study leads me to use dcmodify. I create a new SeriesInstanceUID (I own a UID root), so after creating that new SeriesInstanceUID I now come to consider SOPInstanceUIDs:
  • Do I need to create a SOPInstanceUID per page within the PDF, or just one for the entire PDF?
  • If I have more than one PDF to assign to this study, is it advisable to create one multi-page PDF and then convert that one larger file into its own series, or perform pdf2dcm individually to each PDF and attach each as it's own series? (This last one makes more sense to me, but I can't find a conclusive answer online)
  • I believe that it doesn't break any DICOM standard to have a series listed under a study that doesn't follow the same UID hierarchy, as long as the UID is (u)nique, correct? As in, under StudyInstanceUID 1.2.3.4.5.6 I can have a series named 1.2.9.8.3.4.7.6
(I've searched high and low for the answer to the last two questions, but there doesn't seem to be a definitive answer in the DICOM standard)

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#2 Post by J. Riesmeier »

Extracting the StudyInstanceUID, PatientName, PatientBirthdate, PatientID, PatientSex and AccessionNumber from 1.2.3.4.5.6 using dcmdump, I use pdf2dcm and using +pn/i/b/s switches to create my new DICOM file with all the patient information.
I personally would simply use pdf2dcm's --study-from option to copy the study (and patient) data from the existing DICOM file.
Do I need to create a SOPInstanceUID per page within the PDF, or just one for the entire PDF?
You have to create a new SOP Instance UID for each and every DICOM object (which might a single- or multi-page PDF encapsulated into a DICOM dataset).
If I have more than one PDF to assign to this study, is it advisable to create one multi-page PDF and then convert that one larger file into its own series, or perform pdf2dcm individually to each PDF and attach each as it's own series?
This certainly depends on the content of the PDF files: If these are separate files because of their different content, origin or whatever I would encapsulate them as separate DICOM instances. If they actually belong to a single document (but were scanned as separate pages or the like), I would concatenate the individual pages to a single PDF file and then create a single DICOM instance.
I believe that it doesn't break any DICOM standard to have a series listed under a study that doesn't follow the same UID hierarchy, as long as the UID is (u)nique, correct? As in, under StudyInstanceUID 1.2.3.4.5.6 I can have a series named 1.2.9.8.3.4.7.6
Yes, this is possible, of course. Quite often the Study Instance UID is not generated by the modality but copied from the selected worklist entry (i.e. generated by some other system).

bnoeafk
Posts: 32
Joined: Fri, 2012-10-12, 08:05

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#3 Post by bnoeafk »

You have to create a new SOP Instance UID for each and every DICOM object (which might a single- or multi-page PDF encapsulated into a DICOM dataset).
Understood - a follow up question therefore: for a 4 page PDF, does pdf2dcm create one DICOM object for the entire PDF (therefore a single SOPInstanceUID) or does it create 4 objects (therefore requiring 4 SOPInstanceUIDs)? From what I can see in testing, a two page test PDF has a single SOPInstanceUID, so I would imagine the former, but would like some confirmation, please.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#4 Post by J. Riesmeier »

pdf2dcm creates a single DICOM SOP Instance (i.e. DICOM file) for each PDF input file (i.e. one per call).

bnoeafk
Posts: 32
Joined: Fri, 2012-10-12, 08:05

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#5 Post by bnoeafk »

Thank you sir.

bnoeafk
Posts: 32
Joined: Fri, 2012-10-12, 08:05

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#6 Post by bnoeafk »

If I may ask one further follow up question : does pdf2dcm always produce an ELE file (1.2.840.10008.1.2.1) or perhaps it will unless using the --study-from option, in which case it uses the TransferSyntax of the source DICOM file?

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Multipage PDF: SOPInstanceUIDs for each page? (pdf2dcm)

#7 Post by J. Riesmeier »

For some reason, pdf2dcm does not offer the typical output options such as output transfer syntax. I also had to check the source code in order to find out which transfer syntax is used: it is Explicit VR Little Endian.

I just added this issue as a Feature Request to the DCMTK tracker.

Post Reply

Who is online

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