Show / Hide Table of Contents
View Source

Class DICOMBinaryReader

A wrapper for the Binary Reader class that is specific to DICOM.

Inheritance
System.Object
DICOMBinaryReader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace:EvilDICOM.Core.IO.Reading
Assembly:EvilDICOM.dll
Syntax
public class DICOMBinaryReader : IDisposable

Constructors

View Source

DICOMBinaryReader()

Declaration
protected DICOMBinaryReader()
View Source

DICOMBinaryReader(Byte[])

Constructs a new reader from a byte array.

Declaration
public DICOMBinaryReader(byte[] byteStream)
Parameters
Type Name Description
System.Byte[] byteStream

the byte array to be read

View Source

DICOMBinaryReader(String)

Constructs a new reader from a file path.

Declaration
public DICOMBinaryReader(string filePath)
Parameters
Type Name Description
System.String filePath

path to the file to be read

Fields

View Source

_binaryReader

Declaration
protected BinaryReader _binaryReader
Field Value
Type Description
System.IO.BinaryReader

Properties

View Source

StreamLength

Returnts the length of the byte stream

Declaration
public long StreamLength { get; }
Property Value
Type Description
System.Int64
View Source

StreamPosition

Returns the current position of the byte stream

Declaration
public long StreamPosition { get; set; }
Property Value
Type Description
System.Int64

Methods

View Source

Dispose()

Declaration
public void Dispose()
Implements
System.IDisposable.Dispose()
View Source

GetSubStream(Int32)

Creates a new stream that is trimmed to the specification length.

Declaration
public virtual DICOMBinaryReader GetSubStream(int substreamLength)
Parameters
Type Name Description
System.Int32 substreamLength

the number of bytes to include in the new stream (starting from the current position)

Returns
Type Description
DICOMBinaryReader
View Source

IndexOf(Byte[])

Will return the index of a given byte pattern in the byte stream

Declaration
public long IndexOf(byte[] bytePattern)
Parameters
Type Name Description
System.Byte[] bytePattern

the pattern to be found

Returns
Type Description
System.Int64

the index of the pattern

View Source

Peek(Int32)

Declaration
public virtual byte[] Peek(int count)
Parameters
Type Name Description
System.Int32 count
Returns
Type Description
System.Byte[]
View Source

ReadBytes(Byte[], Int32, Int32)

Declaration
public int ReadBytes(byte[] buffer, int index, int count)
Parameters
Type Name Description
System.Byte[] buffer
System.Int32 index
System.Int32 count
Returns
Type Description
System.Int32
View Source

ReadBytes(Int32)

Reads the specified number of bytes

Declaration
public virtual byte[] ReadBytes(int count)
Parameters
Type Name Description
System.Int32 count

the number of bytes to be read

Returns
Type Description
System.Byte[]

the read bytes

View Source

ReadChars(Int32)

Reads the specified number of chars

Declaration
public virtual char[] ReadChars(int count)
Parameters
Type Name Description
System.Int32 count

the number of chars to be read

Returns
Type Description
System.Char[]

the read chars

View Source

ReadString(Int32)

Reads the specified number of chars and converts to a string

Declaration
public virtual string ReadString(int length)
Parameters
Type Name Description
System.Int32 length
Returns
Type Description
System.String

the read chars

View Source

Reset()

Declaration
public void Reset()
View Source

Skip(Int32)

Declaration
public virtual DICOMBinaryReader Skip(int count)
Parameters
Type Name Description
System.Int32 count
Returns
Type Description
DICOMBinaryReader
View Source

Take(Int32)

Reads the specified number of bytes (shorthand for ReadBytes method).

Declaration
public virtual byte[] Take(int count)
Parameters
Type Name Description
System.Int32 count

the number of bytes to be read

Returns
Type Description
System.Byte[]

the read bytes

Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX