Convert dicom file to Image (jpg ir bmp)

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
oguhantunes
Posts: 15
Joined: Mon, 2015-07-20, 14:25

Convert dicom file to Image (jpg ir bmp)

#1 Post by oguhantunes » Sun, 2015-10-04, 18:05

Hi,
I am retrieving dicom dose image files from CT Examinations. I get the dicom file successfully.
Now i need to convert it to JPEG ou BMP. I have tried a lot of parameters but it does not work..
I think it should work with this command
dcmj2pnm.exe +Fa +op -O --log-level info dicomfile.dcm jpegfile
But the result is a black image.
Can anyone give me some help?
Information regarding the image:
COMMAND: dcmj2pnm -v -im -o SC.1.3.12.2.1107.5.1.4.78788.30000015092108072482500001198
RESULT:
I: reading DICOM file: SC.1.3.12.2.1107.5.1.4.78788.30000015092108072482500001198
I: preparing pixel data
I: dumping image parameters
I: filename : SC.1.3.12.2.1107.5.1.4.78788.30000015092108072482500001198
I: transfer syntax : Little Endian Explicit
I: SOP class : SecondaryCaptureImageStorage
I: SOP instance UID : 1.3.12.2.1107.5.1.4.78788.30000015092108072482500001198
I: columns x rows : 512 x 512
I: bits per sample : 12
I: color model : MONOCHROME2
I: pixel aspect ratio : 1.00
I: number of frames : 1
I: VOI LUT function : <default>
I: VOI windows in file : 1
I: - WINDOW1
I: VOI LUTs in file : 0
I: presentation shape : <default>
I: overlays in file : 1
I: maximum pixel value : 0
I: minimum pixel value : 0
I: cleaning up memory



Thanks,

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

Re: Convert dicom file to Image (jpg ir bmp)

#2 Post by Michael Onken » Sun, 2015-10-04, 19:04

Hi,

Try one of the VOI LUT options, eg +Wm.

Best regards,
Michael

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

Re: Convert dicom file to Image (jpg ir bmp)

#3 Post by J. Riesmeier » Mon, 2015-10-05, 16:43

Since there is a VOI window stored in the DICOM image, you could also select this particular one (with "+Wi 1" or "--use-window 1").

By default, no VOI window / setting is used:

Code: Select all

VOI LUT transformation:

  -W    --no-windowing
          no VOI windowing (default)

oguhantunes
Posts: 15
Joined: Mon, 2015-07-20, 14:25

Re: Convert dicom file to Image (jpg ir bmp)

#4 Post by oguhantunes » Fri, 2015-10-09, 01:43

Great! It worked sucessfully!
Thanks,

Post Reply

Who is online

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