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);
        }
        public static DICOMObject ReadLittleEndian(DICOMBinaryReader dr, TransferSyntax syntax)
        {
            DICOMObject d;

            //Skip tag
            dr.Skip(4);
            int length = LengthReader.ReadLittleEndian(VR.Null, dr);

            if (LengthReader.IsIndefinite(length))
            {
                d = ReadIndefiniteLittleEndian(dr, syntax);
            }
            else
            {
            }

            return(null);
        }
        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);
        }