syntax question

Questions regarding the DCMJP2K library, a DCMTK add-on that implements support for JPEG 2000 compression (lossy and lossless) in DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

syntax question

#1 Post by SamanthaYong » Thu, 2008-06-19, 19:54

hallo,

i have compressed few 12 Bitstored radiography images with lossy compression, i want to remain the Bitstored as 12, so i began with the parameters:

-ey +df 12 -r 0.02
the results i got from the 30 to 40 images from 100 endded up with:
Bitstored: 12
Window Center: 3110.76\4097.00049
Window Width: 1888.46\8194.00098

but once i changed the parameters to:

+ey +dl or do -r 0.02
the results with change to
Bitstored: 11
124 $0028,$1050 Window Center 1555\2048 (same as the original)
125 $0028,$1051 Window Width 944\4096 (same as the original)

How can i obtain the the original Bitstored and a closer center/width to my original, or i should ask how to get rid of all the weird decimal values on center/width, because i would like to do images subtraction between the original and the compressed, with a different greyscale, it is not possible for me to this.

Thank you in advance.

cheers,
Samantha Yong

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 » Fri, 2008-06-20, 13:21

My first guess would be that the original DICOM image contains a modality LUT transform and that the required bit depth for the pixel data after the transformation is 11.

What does dcm2pnm with option -im and -o report on the original DICOM image? Is there a difference for the "bits per sample" value if you either use -M or +M in addition to the other options?

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

#3 Post by SamanthaYong » Fri, 2008-06-20, 15:56

Hello,

i don't know, but i will try the dcm2pnm, option -im and -0 and -M and +M. Thanks.

Regards,
Samantha

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

syntax question

#4 Post by SamanthaYong » Mon, 2008-06-30, 17:22

Hi,

i have checked on the dcm2pnm with options -im and -o and after that +M and -M, there are no change on the "bits per sample", this is the result

columns x rows : 3328 x 4084
bits per sample : 12
color model : monochrome 2
pixel aspect ratio: 1:00
number of frames : 1

VOI windows in file: 2
-window1
-window2
VOI LUTs in file: 0
Overlays in file : 0

maximum pixel value: 2024
minimum pixel value: 0

only with Bit-stored 12, i am able to open the image on my clinical finding monitor (siemens, syngo software), 11 Bit-stored is not possible.

thanks

regards,
sam

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

#5 Post by Jörg Riesmeier » Tue, 2008-07-01, 09:50

only with Bit-stored 12, i am able to open the image on my clinical finding monitor (siemens, syngo software), 11 Bit-stored is not possible.
If the image is DX or MG, then the valid range for Bits Stored is 6 to 16, so the workstation should be able to display this.

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

syntax question

#6 Post by SamanthaYong » Tue, 2008-07-01, 10:04

hello,

ya, but i compressed few mammo-images using +do, and it ends up giving me a Bit-stored with 11 that i am not able to open in on the workstation at all. i don't know where the problem is. is it because the 11 is not a common used Bit, so it is not possible to open on the workstation?

regards,
sam

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

#7 Post by Jörg Riesmeier » Tue, 2008-07-01, 11:03

but i compressed few mammo-images using +do, and it ends up giving me a Bit-stored with 11
This means that DicomImage::getDepth() returns 11 for this image. Should be identical to the output of dcm2pnm in the line "bits per sample".

Using "+df 12" should do what you want ...
is it because the 11 is not a common used Bit, so it is not possible to open on the workstation?
A value of 11 for Bits Stored might be unusual but the workstation should support it (for DX and MG).

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

syntax question

#8 Post by SamanthaYong » Tue, 2008-07-01, 11:41

hello,

first of all, i would like to thank you very much for answering all the questions. yes, you are right, using +df may let me remain my Bit-stored in 12, but in this case, it changes my Window center and width as i mentioned before

Window Center 1555\2048 (same as the original)
Window Width 944\4096 (same as the original)
Window Center: 3110.76\4097.00049
Window Width: 1888.46\8194.00098

actually, i wish to compress mammo images to a smaller size, without changing the window and the Bit-stored.

thanks alot.

regards,
sam

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

#9 Post by Jörg Riesmeier » Tue, 2008-07-01, 12:47

actually, i wish to compress mammo images to a smaller size, without changing the window
As far as I can see, this is not possible. You could either specify a single VOI window using option --set-window (+Ww) or add the original values for Window Center/Width using dcmodify.

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

#10 Post by SamanthaYong » Tue, 2008-07-01, 13:58

hello,

yes, i did try using +Ww to set my own VOI window, i got the result of 4098/2048 (center/width) for all images, although i have given a different values of center/width that i wanted to have. Thanks

cheers,
sam

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 » Tue, 2008-07-01, 14:02

It seems that --set-window is only used for pre-processing, so dcmodify would be the solution :-)

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

#12 Post by SamanthaYong » Tue, 2008-07-01, 15:52

hello,

sorry to ask you this, what is dcmodify, and where to get dcmodify, i didn't find this on my downloaded DCMTK version.

cheers,
sam

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

#13 Post by Jörg Riesmeier » Tue, 2008-07-01, 16:06

It is definitely part of the DCMTK (see documentation). Maybe, it was not part of your DCMJP2K evaluation package.

SamanthaYong
Posts: 10
Joined: Thu, 2008-06-19, 13:26
Location: Marburg, Germany

syntax question

#14 Post by SamanthaYong » Wed, 2008-07-02, 07:51

hello,

i have found out what the problem is. i didn't try this dcmodify version cos in fact using +ey +do are correct, because i tried to measure the max value of 4 images. the first 2 images were an original and a compressed image with both 12Bit-stored, the results are about 2158 and 2144, where both are over 11Bit, where the second 2 images were again an original image with 12Bit-stored and a compressed image with 11Bit-stored. The max values of both are 2034 and 2044, both do not exit 11Bit, therefore after compression, it will automatically jump to the nearest Bit-stored of the image. (Although the original should be showing 11Bit-stored as well). If i tried to force the image to 12Bit-stored using +df 12, it will expand the image to a higher Window level, where i am not suppose to do my image subtraction. thank you very much for all the advices, it really helps me alot. have a nice day. :wink:

regards,
samantha :)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests