예제 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parallel"></param>
        /// <returns></returns>
        public GridScalarField3d GetDivergence(bool parallel = false)
        {
            GridScalarField3d result = new GridScalarField3d(this);

            GetDivergence(result.Values, parallel);
            return(result);
        }
예제 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="parallel"></param>
        /// <returns></returns>
        public GridScalarField3d GetLaplacian(bool parallel = false)
        {
            GridScalarField3d result = new GridScalarField3d((Grid3d)this);

            GetLaplacian(result.Values, parallel);
            return(result);
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="copyValues"></param>
        /// <returns></returns>
        public GridScalarField3d Duplicate(bool copyValues)
        {
            var result = new GridScalarField3d(this, SampleMode);

            if (copyValues)
            {
                result.Set(this);
            }
            return(result);
        }
예제 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="bitmaps"></param>
        /// <param name="mapper"></param>
        /// <param name="interval"></param>
        /// <returns></returns>
        public static GridScalarField3d CreateFromImageStack(IList <Bitmap> bitmaps, Func <Color, double> mapper, Interval3d interval)
        {
            var bmp0 = bitmaps[0];
            int nx   = bmp0.Width;
            int ny   = bmp0.Height;
            int nz   = bitmaps.Count;

            var result = new GridScalarField3d(interval, nx, ny, nz);

            FieldIO.ReadFromImageStack(bitmaps, result, mapper);

            return(result);
        }