1

I'm trying to implement this example.

DicomFile df;  
VoxelGrid vt ;    
if (openFileDialog1.ShowDialog () == DialogResult.OK)    
{    
    df = new DicomFile (openFileDialog1.FileName);    
    vt = new VoxelGrid (df);    
    pictureBox1.Image = vt.getImage();   
}

The problem is that it does not find the component VoxelGrid in your dll (EvilDicom), there are only a component called Voxel and does not work as the tutorial is asking, is there any version change EvilDicom 0,04 or need to use another component to add the image in my pictureBox ?

Anders Gustafsson
  • 15,837
  • 8
  • 56
  • 114
banha126
  • 11
  • 3

1 Answers1

1

In the more recent Evil DICOM releases, such as 0.05.7, there is an ImageMatrix class that can be used to retrieve image bitmap data from a DICOM file.

You should be able to change your example to the following to sufficiently upload images to your picture box:

if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
    var imgFile = new ImageMatrix(openFileDialog1.FileName);
    pictureBox1.Image = imgFile.GetImage(0);
}
Anders Gustafsson
  • 15,837
  • 8
  • 56
  • 114
  • Anders Gustafsson, thank you for your help, I downloaded an image Dicom "ct.001.dcm" and it worked perfectly, however, we are using images dicom vai own faculty and some strange points appears in place of radiography. This library (EvilDicom) supports any format or need to use another library or version? Just below I am providing the "test program" and the images used, if you or someone can tell us or help would be very grateful. http://www.4shared.com/zip/AJNTcWXL/test.html? thank you – banha126 Aug 31 '12 at 20:31
  • You are welcome. If you are looking for an open-source C# library that has a more comprehensive handling of different image codecs, I would recommend that you take a look at [mdcm](https://github.com/rcd/mdcm) or [fo-dicom](https://github.com/rcd/fo-dicom). – Anders Gustafsson Aug 31 '12 at 20:45