Пример #1
0
        public static List <Centroid> ListFromByteStream(Stream stream)
        {
            List <Centroid> centroids = new List <Centroid>();

            byte[] centroidBytes = new byte[Centroid.Size];
            while (stream.Position + Centroid.Size <= stream.Length)
            {
                stream.Read(centroidBytes, 0, Centroid.Size);
                Centroid c = Centroid.FromByteArray(centroidBytes);
                centroids.Add(c);
            }

            return(centroids);
        }