Export JPG out of Dicom File With mDCM
- by Ross Peoples
Hello, I'm using mDCM with C# to view dicom tags, but I'm trying to convert the pixel data to a Bitmap and eventually out to a JPG file. I have read all of the posts on the mDCM Google Group on the subject and all of the code examples either don't work or are missing important lines of code. The image I am working with is a 16 bit monochrome1. I have tried using LockBits, SetPixel, and unsafe code in order to convert the pixel data to a Bitmap but all attempts fail. Does anyone have any code that could make this work.
Thanks in advance
P.S. Before anyone suggests trying something else like ClearCanvas, know that mDCM is the only library that suits my needs and ClearCanvas is WAY too bloated for what I need to do.