Show / Hide Table of Contents
View Source

Class LengthReader

Contains methods for reading the length of DICOM elements

Inheritance
System.Object
LengthReader
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 LengthReader

Methods

View Source

IsIndefinite(Int32)

Checks to see if length is indefinite type (eg. FFFFFFFF)

Declaration
public static bool IsIndefinite(int length)
Parameters
Type Name Description
System.Int32 length

the length of the DICOM element

Returns
Type Description
System.Boolean
View Source

PeekBigEndian(VR, DICOMBinaryReader)

Declaration
public static int PeekBigEndian(VR vr, DICOMBinaryReader dr)
Parameters
Type Name Description
VR vr
DICOMBinaryReader dr
Returns
Type Description
System.Int32
View Source

PeekLittleEndian(VR, DICOMBinaryReader)

Declaration
public static int PeekLittleEndian(VR vr, DICOMBinaryReader dr)
Parameters
Type Name Description
VR vr
DICOMBinaryReader dr
Returns
Type Description
System.Int32
View Source

Read(VR, DICOMBinaryReader, TransferSyntax)

Reads the length from a series of bytes in a stream. The number of bytes is automatically determined from VR.

Declaration
public static int Read(VR vr, DICOMBinaryReader dr, TransferSyntax syntax)
Parameters
Type Name Description
VR vr

the value representation of the element

DICOMBinaryReader dr

the binary stream with a current position on the length parameter

TransferSyntax syntax

the transfer syntax of this element

Returns
Type Description
System.Int32
View Source

ReadBigEndian(VR, DICOMBinaryReader)

Reads the length in big endian byte format from a series of bytes in a stream. The number of bytes is automatically determined from VR.

Declaration
public static int ReadBigEndian(VR vr, DICOMBinaryReader dr)
Parameters
Type Name Description
VR vr

the value representation of the element

DICOMBinaryReader dr

the binary stream with a current position on the length parameter

Returns
Type Description
System.Int32
View Source

ReadBigEndian(DICOMBinaryReader, Int32)

Reads the length in big endian byte format from a series of bytes in a stream

Declaration
public static int ReadBigEndian(DICOMBinaryReader dr, int length)
Parameters
Type Name Description
DICOMBinaryReader dr

the binary stream with a current position on the length parameter

System.Int32 length

the number of bytes containing the length

Returns
Type Description
System.Int32

the length

View Source

ReadBigEndian(Byte[])

Reads the length in big endian byte format from a series of bytes in a stream

Declaration
public static int ReadBigEndian(byte[] length)
Parameters
Type Name Description
System.Byte[] length

the bytes containing the length

Returns
Type Description
System.Int32

the length

View Source

ReadLittleEndian(VR, DICOMBinaryReader)

Reads the length in little endian byte format from a series of bytes in a stream. The number of bytes is automatically determined from VR.

Declaration
public static int ReadLittleEndian(VR vr, DICOMBinaryReader dr)
Parameters
Type Name Description
VR vr

the value representation of the element

DICOMBinaryReader dr

the binary stream with a current position on the length parameter

Returns
Type Description
System.Int32
View Source

ReadLittleEndian(DICOMBinaryReader, Int32)

Reads the length in little endian byte format from a series of bytes in a stream

Declaration
public static int ReadLittleEndian(DICOMBinaryReader dr, int length)
Parameters
Type Name Description
DICOMBinaryReader dr

the binary stream with a current position on the length parameter

System.Int32 length

the number of bytes containing the length

Returns
Type Description
System.Int32

the length

View Source

ReadLittleEndian(Byte[])

Reads the length in little endian byte format from a series of bytes in a stream

Declaration
public static int ReadLittleEndian(byte[] length)
Parameters
Type Name Description
System.Byte[] length

the bytes containing the length

Returns
Type Description
System.Int32

the length

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