Exemplo n.º 1
0
        public void CopyData(Array3D source)
        {
            _data = new double[source.Height, source.Width, source.Depth];

            for (var i = 0; i < source.Height; i++)
            {
                for (var j = 0; j < source.Width; j++)
                {
                    for (var k = 0; k < source.Depth; k++)
                    {
                        _data[i, j, k] = source[i, j, k];
                    }
                }
            }
        }
Exemplo n.º 2
0
        public static double Merge(Array3D image, Array3D filter, int height, int width)
        {
            var result = 0.0;

            for (var i = 0; i < filter.Height; i++)
            {
                for (var j = 0; j < filter.Width; j++)
                {
                    for (var k = 0; k < filter.Depth; k++)
                    {
                        result += image[i + height, j + width, k] * filter[i, j, k];
                    }
                }
            }

            return(result);
        }
Exemplo n.º 3
0
        public object Clone()
        {
            Array3D result = new Array3D(Height, Width, Depth);

            for (int i = 0; i < Height; i++)
            {
                for (int j = 0; j < Width; j++)
                {
                    for (int k = 0; k < Depth; k++)
                    {
                        result[i, j, k] = this[i, j, k];
                    }
                }
            }

            return(result);
        }