Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello to all , i'm using Dicom#[^] library

i can read the dicom file information but i couldn't read the image pixels
can any body help me by reading the pixels using DICOM# library


Stream ins = null;
 DcmParser parser = null;
 Dataset ds = null;


 ins = new BufferedStream(new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read));
 parser = new DcmParser(ins);
 long ee = parser.StreamPosition;
 FileFormat format = parser.DetectFileFormat();
 if (format != null)
 {
     ds = new Dataset();
     parser.DcmHandler = ds.DcmHandler;
     parser.ParseDcmFile(format, Tags.PixelData);

     long re = parser.StreamPosition;
     int Re = Convert.ToInt32(re);
      imageWidth = ds.GetInt(Tags.Rows, 0);
     imageHeight = ds.GetInt(Tags.Columns, 0);
Posted
Updated 18-Nov-10 3:34am
v2
Comments
Toli Cuturicu 18-Nov-10 12:08pm    
Ask them (the Dicom folks), not us!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900