How to get an image from a given dicom file using clearcanvas libraries in c#

匆匆过客 提交于 2019-12-11 04:35:08

问题


Can you please help me in extracting image(binary data) from a dicom file.


回答1:


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;



来源:https://stackoverflow.com/questions/2770615/how-to-get-an-image-from-a-given-dicom-file-using-clearcanvas-libraries-in-c-sha

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!