banha126
banha126

Reputation: 11

EvilDicom problems in using VoxelGrid

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 ?

Upvotes: 1

Views: 1435

Answers (1)

Anders Gustafsson
Anders Gustafsson

Reputation: 15981

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);
}

Upvotes: 1

Related Questions