简体   繁体   English

从 YBR_FULL Dicom Image 创建 BufferedImage

[英]Create BufferedImage from YBR_FULL Dicom Image

I want to Create BufferedImage from YBR_FULL Dicom Image to view it over a JPanel in my program, can any one tell me how to deal with this type of Dicom file?also can we convert from YBR_FULL to RGB?我想从 YBR_FULL Dicom Image 创建 BufferedImage 以在我的程序中通过 JPanel 查看它,任何人都可以告诉我如何处理这种类型的 Dicom 文件吗?我们也可以从 YBR_FULL 转换为 RGB 吗? if yes how?如果是怎么办?

You should convert the YBR values to RGB. 您应该将YBR值转换为RGB。 here's a page on how to convert between YBR and RGB 这是有关如何在YBR和RGB之间转换的页面

The formula that worked for me was this:对我有用的公式是这样的:

R = Y + 1.402 * (Cr-128);
G = Y - 0.344136 * (Cb-128) - 0.714136 * (Cr-128);
B = Y + 1.772 * (Cb-128);

I found it here .我在这里找到了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM