【发布时间】:2017-09-30 16:06:19
【问题描述】:
我有一个数组,它包含从 Dicom 图像中提取的 PixelData。
代码如下:
byte[] bytes = img.PixelData.GetFrame(0).Data; // img is the Dicom Image
int count = bytes.Length / 2;
ushort[] words = new ushort[count];
for (int i = 0, p = 0; i < count; i++, p += 2)
{
words[i] = BitConverter.ToUInt16(bytes, p);
}
pixels16 = words.ToList(); //pixels16 contains now the PixelData for the Grayscale image
现在,我的问题是,如何将它渲染到 Picturebox 中??
【问题讨论】:
标签: c# picturebox pixel