Esempio n. 1
0
        public static DICOMObject ReadBigEndian(DICOMBinaryReader dr, TransferSyntax syntax)
        {
            DICOMObject d;
            int         length = LengthReader.ReadLittleEndian(VR.Null, dr.Skip(4));

            if (LengthReader.IsIndefinite(length))
            {
                d = ReadIndefiniteBigEndian(dr, syntax);
            }
            else
            {
                d = DICOMObjectReader.ReadObject(dr.ReadBytes(length), syntax);
            }

            return(d);
        }
Esempio n. 2
0
        public static DICOMObject ReadBigEndian(DICOMBinaryReader dr, TransferSyntax syntax, StringEncoding enc)
        {
            DICOMObject d;

            //Skip tag
            dr.Skip(4);
            var length = LengthReader.ReadBigEndian(VR.Null, dr);

            if (LengthReader.IsIndefinite(length))
            {
                d = ReadIndefiniteBigEndian(dr, syntax, enc);
            }
            else
            {
                d = DICOMObjectReader.ReadObject(dr.ReadBytes(length), syntax);
            }

            return(d);
        }