1

I am currently using the evil-dicom library for opening DICOM files in c#. I am able to access the dicom file with:

var dcm = DICOMObject.Read('dicomfilename');

Then open up the pixel stream using

dcm.PixelStream

How can I save the pixelstream as a bmp image?

evanr77
  • 43
  • 4
  • Wich of the dozen DICOM Libraries and parser examples are you talking about? I have issues finding anyone with the term "Evil" in the name and I asume this was a description more then an actuall name part. – Christopher Jul 29 '19 at 22:34
  • Yes, weird name. But real. https://github.com/rexcardan/Evil-DICOM – Markus Sabin Jul 30 '19 at 05:50

1 Answers1

2

I never used the toolkit; but at least till Oct-2014, author of the toolkit was saying following:

Evil DICOM does not have any image classes to help with this. While that might seem strange to not include image tools in a DICOM library, it is not the original intent of the the library. Evil DICOM is more for manipulating and analysis of DICOM data. I used to have some image parts in the old library which I believe is still available on SourceForge. You can take a look, but the PixelData tag has the raw bits to put together an image. .NET has several classes that can help with that, but I don't have anything to write here in this post. If I get some time, I will write a blog post about how to do it on the website (rexcardan.com).

Source: GitHub

Apparently, it was not original intent of the toolkit to include imaging support in toolkit. Not sure if this is changed since then. Author was planning to write an article to achieve this through DotNet; not sure if he wrote any then after. Old library from SourceForge may create other issues as it might not have been updated since long.

You can find some example code here.

Community
  • 1
  • 1
Amit Joshi
  • 15,448
  • 21
  • 77
  • 141