dcm2pdf+Error: not an Encapsulated PDF Storage object: C:\xx

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

dcm2pdf+Error: not an Encapsulated PDF Storage object: C:\xx

#1 Post by nicolasdicom »

Hi all!!

I'am trying to use the dcm2pdf tool.

as example:
dcm2pdf c:\file .do c:\pdfFile.pdf

Result:
Error: not an Encapsulated PDF Storage object c:\file.do

Please, can someone tell me what this message means ?

Thanks in advance !! :D

martinrame
Posts: 347
Joined: Mon, 2009-02-23, 19:57

#2 Post by martinrame »

Hi Nicolás, read this:
dcm2pdf: Extract PDF file from DICOM encapsulated PDF
The error message is saying that file.do is not an Encapsulated PDF Storage object!.

Translation: dcm2pdf does not convert dicom files to pdf as you think, it extract PDF encapsulated files from dicom storage files.

PS: If you want to create a PDF file from dicom, you can do it in two steps:
1) Convert DCM -> JPeg using dcmj2pnm
2) Convert JPeg->PDF using ImageMagick.

nicolasdicom
Posts: 26
Joined: Thu, 2010-07-01, 19:47
Location: Argentina

#3 Post by nicolasdicom »

Thanks Martin!

I'ill take a look .

regards

Venu
Posts: 2
Joined: Tue, 2011-03-29, 14:14

dcm2pdf Error

#4 Post by Venu »

As said in above messages, we can do conversion using external tools.. but i wanna do it in terminal itself by passing parameters to dcm2pdf.

can anyone guide me, how to convert using dcm2pdf from the linux terminal itself.

I know the procedure, where we cant directly convert dcm to pdf. i did convert dcm file to jpeg format and then later i donno, how to proceed further..

I also tried below procedure:
#dcmcjpeg -d angiogram-16.dcm venjpeg1.jpeg
#img2dcm -d venjpeg1.jpeg demo.dcm
[
D: I2DJpegSource: Plugin instantiated
I: img2dcm: Instantiated input plugin: JPEG
D: I2DOutputPlugSC: Output plugin for Secondary Capture initialized
I: img2dcm: Instantiatiated output plugin: Secondary Capture Image SOP Class
I: img2dcm: Starting image conversion
D: Image2Dcm: Starting conversion of file: venjpeg1.jpeg
D: Image2Dcm: Generate and insert new UIDs if necessary
D: I2DJpegSource: Importing JPEG pixel data
D: I2DJpegSource: Opening JPEG file: venjpeg1.jpeg
D: I2DJpegSource: Examing JPEG file and creating map of JPEG markers
D: I2DJpegSource: Closing JPEG file and cleaning up memory
D: Freeing memory
F: Error converting file: Not a JPEG file
]


If i use the non-converted jpeg image file, it converts to dcm file, but if i execute below query, it shows the below error message:


# dcm2pdf -d demo.dcm pdfdemo.pdf
D: $dcmtk: dcm2pdf v3.6.0 2011-01-06 $
D:
I: open input file demo.dcm
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
F: not an Encapsulated PDF Storage object: demo.dcm


Same is happening with viceversa means pdf2dcm..

I am currently using "Linux 2.6.34.7-0.3-desktop #1 SMP PREEMPT 2010-09-20 15:27:38 +0200 x86_64 x86_64 x86_64 GNU/Linux"

Kindly anyone help me out in figuring this..
Waiting for your reply!!
Thanks,
Venu

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: dcm2pdf Error

#5 Post by Michael Onken »

Hi,
Venu wrote: I also tried below procedure:
#dcmcjpeg -d angiogram-16.dcm venjpeg1.jpeg
#img2dcm -d venjpeg1.jpeg demo.dcm


Is angiogram a multi frame file? img2dcm only works with single frame files at the moment.

Also, img2dcm stops with an error as you can see because you have to provide a JPEG file as input: The result of dcmcjpeg (venjpeg1.jpeg) is a DICOM file! If you like to create a JPEG file from a DICOM file, use dcm2pnm. If the input is a JPEG compressed DICOM file, use dcmj2pnm or decompress it first using dcmdjpeg.

# dcm2pdf -d demo.dcm pdfdemo.pdf
D: $dcmtk: dcm2pdf v3.6.0 2011-01-06 $
D:
I: open input file demo.dcm
D: DcmItem::checkTransferSyntax() TransferSyntax="Little Endian Explicit"
F: not an Encapsulated PDF Storage object: demo.dcm
dcm2pdf takes DICOM files which are belonging to the SOP Class Encapsulated PDF Storage. These kind of files have a PDF file embedded. I guess you provide as input (demo.dcm) some other image, like for example a CT/MR/Ultrasound Image Storage image.

Best regards,
Michael

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 »

Maybe a silly question: Why don't you just read the documentation of the tools before using them?

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#7 Post by Michael Onken »

Sorry Jörg, I will do that :-)

Post Reply

Who is online

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