Click or drag to resize

DicomHeaderParser Constructor

Construct a DicomHeaderParser object with a stream that is pointing to the beginning of a DICOM encoded image

Namespace:  Atalasoft.Imaging.Codec.Dicom
Assembly:  Atalasoft.dotImage.Dicom (in Atalasoft.dotImage.Dicom.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public DicomHeaderParser(
	Stream s
)

Parameters

s
Type: System.IOStream
A readable stream that is pointing to the beginning of a DICOM encoded image
Examples
Read data from header (C#)
using (FileStream fs = new FileStream("xray.dcm", FileMode.Open, FileAccess.Read, FileShare.Read))
{
   using (DicomHeaderParser parser = new DicomHeaderParser(fs)) 
   {
      String imageType = parser.GetString(DicomGroup.Identifying, 
         0, DicomTag.IdentifyingImageType, 0);

      uint numFrames = parser.GetUnsignedLong(DicomGroup.ImagePresentation, 
         0, DicomTag.ImagePresentationNumberOfFrames, 0), 0);
   }
}
See Also