I have a library of images where the customer wants to store them online for archiving purposes. I am trying to compress the images using any lossless codec with a quality factor of 90 (barely noticable). I am, however, aware that we will lose some details in pixel data when converting from 16 to 8 bit. However... is it actually possible?
When I try to convert the images and force them to 8 bit, all I get is a grey image. I've tried everything (mapping, rescaling, windowing...) but I can't seem to find where things go wrong.
When I look at the raw pixel data, however, not every byte has the same value, so there is actual difference between the individual pixels, it's just not showing when opening the DCM file.
I've tried command line combinations of all sorts, however with unsatisfactory results:
Code: Select all
dcmcjpeg.exe +Wn +be +eb +un +q 90 "c:\users\...\Image-C2-C3-20130507050242.dcm" test.dcm
dcmcjpeg.exe +rm +be +eb +un +q 90 "c:\users\...\Image-C2-C3-20130507050242.dcm" test.dcm
dcmcjpeg.exe +ca +be +eb +un +q 90 "c:\users\...\Image-C2-C3-20130507050242.dcm" test.dcm
dcmcjpeg.exe +Ww 32767 65535 +be +eb +un +q 90 "c:\users\...\Image-C2-C3-20130507050242.dcm" test.dcm
...
Code: Select all
(0028,0002) US 1 # 1, 2 Samples per Pixel
(0028,0004) CS MONOCHROME1 # 1, 12 Photometric Interpretation
(0028,0010) US 2048 # 1, 2 Rows
(0028,0011) US 1536 # 1, 2 Columns
(0028,0030) DS 0.129\0.129 # 2, 12 Pixel Spacing
(0028,0034) IS 1\1 # 2, 4 Pixel Aspect Ratio
(0028,0100) US 16 # 1, 2 Bits Allocated
(0028,0101) US 14 # 1, 2 Bits Stored
(0028,0102) US 13 # 1, 2 High Bit
(0028,0103) US 0 # 1, 2 Pixel Representation
(0028,1050) DS 861 # 1, 4 Window Center
(0028,1051) DS 20308 # 1, 6 Window Width
(0028,1052) DS -298200.4 # 1, 10 Rescale Intercept
(0028,1053) DS 29.10124 # 1, 8 Rescale Slope
If anyone can point me in the right direction, that'd be great!
Thanks in advance!
Jan