Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="image"></param>
        /// <param name="mapper"></param>
        /// <param name="interval"></param>
        /// <returns></returns>
        public GridField2d <T> CreateFromImage(Bitmap image, Func <Color, T> mapper)
        {
            var result = Create(image.Width, image.Height);

            FieldIO.ReadFromImage(image, result, mapper);
            return(result);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="images"></param>
        /// <param name="mapper"></param>
        /// <param name="interval"></param>
        /// <returns></returns>
        public GridField3d <T> CreateFromImageStack(IList <Bitmap> images, Func <Color, T> mapper)
        {
            var bmp0   = images[0];
            var result = Create(bmp0.Width, bmp0.Height, images.Count);

            FieldIO.ReadFromImageStack(images, result, mapper);
            return(result);
        }