Ejemplo n.º 1
0
        public LayeredEvolutionJob(SourceImage sourceImage, int layerCount, Settings settings)
        {
            this.sourceImage = sourceImage;
            LayerCount = layerCount;
            workers = new List<LayeredWorker>();
            int range = 255/LayerCount;
            int workerMin = 0;
            for (int i = 0; i < LayerCount; i++)
            {
                SourceImage newSourceImage = GetIntensityMap(sourceImage, workerMin, range);

                var worker = new LayeredWorker(newSourceImage, settings)
                                 {
                                     MinIntensity = workerMin,
                                     MaxIntensity = (workerMin + range),
                                 };

                workers.Add(worker);
                workerMin += range;
            }
        }
Ejemplo n.º 2
0
        public LayeredEvolutionJob(SourceImage sourceImage, int layerCount, Settings settings)
        {
            this.sourceImage = sourceImage;
            LayerCount       = layerCount;
            workers          = new List <LayeredWorker>();
            int range     = 255 / LayerCount;
            int workerMin = 0;

            for (int i = 0; i < LayerCount; i++)
            {
                SourceImage newSourceImage = GetIntensityMap(sourceImage, workerMin, range);

                var worker = new LayeredWorker(newSourceImage, settings)
                {
                    MinIntensity = workerMin,
                    MaxIntensity = (workerMin + range),
                };

                workers.Add(worker);
                workerMin += range;
            }
        }