|
"Ganesh " <nganesh76@hotmail.com> wrote in message <ho0lh6$ev3$1@fred.mathworks.com>...
> Hi,
> I have a stack of 2D Ct images (16-bit) in DICOM format that I would like to convert into tiff or jpeg format.
> When I read each one individually, the range of intensities goes from -1024 to 3000 (approx). As imwrite doesnot like negative intensities, I added 1024 to the value of intensity at every pixel uniformly. Now, imwrite writes a jpeg file, however, I am not able to open it using any standard software. Can you help.
>
> Command used:
> imwrite(temp,file_out,'jpeg','bitdepth',16,'Quality',100,'Mode','lossless');
>
> I chose jpeg just because writing to tiff, one would make the image 8-bit and thereby loose information.
>
> Thanks,
> Ganesh
I think your problem is that most standard software can not read lossless jpeg which is actually a pretty obscure part of the JPEG standard
To illustrate:
Y = dicomread('CT-MONO2-16-ankle.dcm');
Y = mat2gray(Y);
imshow(Y,[]);
imwrite(Y,'save_loosless.jpg','Quality',100,'Mode','lossless');
imwrite(Y,'save_lossy.jpg','Quality',100,'Mode','lossy');
Opening the lossless file will fail on most commercial software while the lossy will open.
Hope this helps
Matt W.
|