Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://opendicom.sourceforge.net/" rel="nofollow">openDICOM.NET</a> is a very simple library for DICOM file processing. The library itself is designed to be <em>relatively</em> platform-agnostic, i.e. it should be possible to build using the .NET Framework as well as Mono in various operating systems. However, out-of-the-box it is not possible to build as a WinRT/Metro library, so unless you have made substantial refactoring I assume that you have compiled the library as a regular C# class library, .NET Framework 4.5? </p> <p>Assuming that you are really developing a Windows WPF or Forms application, and assuming that you have managed to read a DICOM data set using <em>openDICOM.NET</em>, you should then be able to construct a <code>PixelData</code> object:</p> <pre><code>var pixelData = new PixelData(dataset); </code></pre> <p>From the <code>PixelData</code> object you can access the pixel data as arrays of bytes:</p> <pre><code>byte[][] byteArray = pixelData.ToBytesArray(); </code></pre> <p>You then need to transform the byte two-dimensional array into a one-dimensional array that can be used to construct a bitmap image, by using the following properties of the <code>PixelData</code> object:</p> <pre><code>Rows Columns BitsAllocated (BitsStored) </code></pre> <p>In a WPF application you should be able to create a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx" rel="nofollow">WriteableBitmap</a> object, and in Windows Forms a <a href="http://msdn.microsoft.com/en-us/library/4e7y164x" rel="nofollow">Bitmap</a> object.</p> <p><strong>However</strong>, <em>openDICOM.NET</em> has not been maintained for many years, and I would strongly recommend that you use a different, more up-to-date library as the basis for your DICOM processing. For example, please have a look at the light-weight library <a href="http://evildicom.rexcardan.com/" rel="nofollow">Evil DICOM</a>. Here you have ready-made methods for creating a (Windows Forms) <code>Bitmap</code>, simply create a DICOM image object using the file name and immediately access the corresponding bitmap image:</p> <pre><code>var imageMtx = new EvilDicom.Image.ImageMatrix(name_of_dicom_file); var dicomImage = imageMtx.GetImage(slice_numeber); </code></pre> <p><em>Evil DICOM</em> currently only works for Windows Forms, but it is probably a relatively small effort to refactor the required classes to use WPF instead.</p> <p>Other open-source class libraries worth exploring are <a href="https://github.com/rcd/mdcm" rel="nofollow">mdcm</a> and the more recent <a href="https://github.com/rcd/fo-dicom" rel="nofollow">fo-dicom</a>, both developed by Colby Dillion. At least <em>mdcm</em> provides full WPF support.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload