1

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

Priya
  • 11
  • 1
  • 2

1 Answers1

2

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;

Community
  • 1
  • 1
Steve Wranovsky
  • 5,503
  • 4
  • 34
  • 52