some trubles on dcmcjpeg.

All other questions regarding DCMTK

Moderator: Moderator Team

Message
Author
gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

some trubles on dcmcjpeg.

#1 Post by gavin_dcm »

hello experts:

I'm trying to convert a dicom file named "ttt" to a jpeg image using the following command without any options:
C:\ttt\bin>dcmcjpeg ttt ttt.jpeg

and i get ttt.jpeg successfully .
to my surprise, maybe this file is not a standard jpeg file,and when i open it ,there is no image that i expect.the image is painted in white。

Must i add options tp the comand and what to be add?
i'm sorry,i'm strange at image compression.

thanks!

gavin

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'm trying to convert a dicom file named "ttt" to a jpeg image
dcmcjpeg is the wrong tool for this purpose, use dcmj2pnm instead.

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#3 Post by gavin_dcm »

Jörg Riesmeier wrote:
I'm trying to convert a dicom file named "ttt" to a jpeg image
dcmcjpeg is the wrong tool for this purpose, use dcmj2pnm instead.
=======================
thanks,i have tried it ,but failed again!

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 »

I'm sorry but without more details we will not be able to help you.

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#5 Post by gavin_dcm »

Jörg Riesmeier wrote:I'm sorry but without more details we will not be able to help you.
====================================
thanks,here is the processing detail:

C:\aaa\bin>dcmcjpeg -v 111 111.jpeg
reading input file 111
Convert DICOM file to compressed transfer syntax
Output transfer syntax JPEG Lossless, Non-hierarchical, 1st Order Prediction can
be written
creating output file 111.jpeg
Warning: dcfilefo: unknown Version of MetaHeader detected: 0x0101 supported: 0x0
100
conversion successful

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 »

So, the result is a JPEG compressed DICOM image (not a JPEG image). And where is your problem?

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#7 Post by gavin_dcm »

Jörg Riesmeier wrote:So, the result is a JPEG compressed DICOM image (not a JPEG image). And where is your problem?
=========================================

oh, thanks。 now i known the use of dcmcjpeg.
but when i used dcmj2pnm,i failed to get a jpeg file either.


C:\aaa\bin>dcmj2pnm -v 111 111.jpeg
reading DICOM file: 111
preparing pixel data.
disabling VOI window computation
writing frame 1 to 111.jpeg
cleaning up memory.

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 »

I can't see any error message. So, where exactly is your problem with dcmj2pnm?

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#9 Post by gavin_dcm »

Jörg Riesmeier wrote:I can't see any error message. So, where exactly is your problem with dcmj2pnm?
==========================================
C:\aaa\bin>dcmj2pnm -v 111 111.jpeg
reading DICOM file: 111
preparing pixel data.
disabling VOI window computation
writing frame 1 to 111.jpeg
cleaning up memory.

=============================
is it wrong here?
disabling VOI window computation

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#10 Post by gavin_dcm »

Jörg Riesmeier wrote:I can't see any error message. So, where exactly is your problem with dcmj2pnm?
========================================

i download the tool from dcmtk.org. do the tools not support windows 2003 server os of chinese verson ?

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

#11 Post by Jörg Riesmeier »

do the tools not support windows 2003 server os of chinese verson ?
I have no idea because nobody from our team ever tested this. What exactly is not working on your system?

Btw, "disabling VOI window computation" simply means that no VOI window is selected (which is the default). Use e.g. +Wm in order to select an automatic min-max VOI window ...

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#12 Post by gavin_dcm »

i use dcmj2nm to convert a dicom file to a jpeg file,but fail.
here is the command line:
dcmj2nm 111 222.jpeg.
i can get the 222.jpeg file successfully,but i can't open the file .

may be the file i get by dcmj2jpeg tool is not a real jpeg file.

thanks.

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#13 Post by gavin_dcm »

C:\aaa\bin>dcmj2pnm -v +ob 111 333.jpeg
reading DICOM file: 111
preparing pixel data.
disabling VOI window computation
writing frame 1 to 333.jpeg
cleaning up memory.
===========================
when i use the aommand line above adding the output option ,i succeed!

thanks!

gavin_dcm
Posts: 28
Joined: Tue, 2007-12-25, 04:27

#14 Post by gavin_dcm »

gavin_dcm wrote:C:\aaa\bin>dcmj2pnm -v +ob 111 333.jpeg
reading DICOM file: 111
preparing pixel data.
disabling VOI window computation
writing frame 1 to 333.jpeg
cleaning up memory.
===========================
when i use the command line above adding the output option ,i succeed!

thanks!

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

#15 Post by Jörg Riesmeier »

So, you are now writing a BMP image to a file with ".jpeg" extension?

Why don't you use option +oj in order to write an 8-bit lossy JPEG (baseline) image (as you can read in the documentation of this tool).

Post Reply

Who is online

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