Error when converting a Dicom image into JPEG2000

Hello, I am trying to compress a Dicom image into JPEG2000. The following code I am using is :
X = dicomread('test.dcm');
imwrite(X,'Xcomp.jp2','jp2','Mode','lossy','CompressionRatio',50);
Xcomp = imread('Xcomp.jp2');
figure(1), imshow(Xcomp,[])
However, when I run it, the image in Figure 1 appears but when I open from my documents the image Xcomp.jp2, there is only a black image. I noticed that the bitdepth of the Dicom file (bitdepth =12) and the bitdepth from the JPEG2000 (bitdepth =16) were different. Could it come from this? Thanks in advance.

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDICOM Format についてさらに検索

質問済み:

2015 年 3 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by