如何使用C#中的clearcanvas库从给定的dicom文件中获取图像 [英] How to get an image from a given dicom file using clearcanvas libraries in c#
本文介绍了如何使用C#中的clearcanvas库从给定的dicom文件中获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能帮我从dicom文件中提取图像(二进制数据)吗?
Can you please help me in extracting image(binary data) from a dicom file.
推荐答案
The question is not completely clear. If you want a bitmap for display purposes, then this is basically a duplicate of this question. Please see the accepted answer.
如果您只是尝试将像素数据提取到字节数组中,则可以使用如下代码:
If you are just trying to extract the pixel data into a byte array, then you can use code like this:
DicomFile theFile = new DicomFile("c:\tmp.dcm");
theFile.Load();
byte[] thePixels = theFile.DataSet[DicomTags.PixelData].Values;
这篇关于如何使用C#中的clearcanvas库从给定的dicom文件中获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文