Exemple #1
0
        public HImage Process(HImage image)
        {
            var domain          = image.GetDomain();
            var fullDomainImage = image.FullDomain();
            var fullDomain      = fullDomainImage.GetDomain();

            //
            var expandImage     = image.ExpandDomainGray(ExpansionRange);
            var expandFullImage = expandImage.FullDomain();
//            expandFullImage.WriteImage("tiff", 0, "D:\\test-0-expandFullImage.tif");

            //
            var holeRegion = fullDomain.Difference(domain);

            HImage paintedImage = expandFullImage;

            for (int i = 0; i < Items.Count; i++)
            {
                var imageFilter  = Items[i];
                var reducedImage = image.ChangeDomain(holeRegion);
                var meanedImage  = imageFilter.Process(reducedImage);
//                meanedImage.WriteImage("tiff", 0, "D:\\test-1-meanedImage_" + i + ".tif");

                var paintedImage2 = meanedImage.PaintGray(paintedImage);
                paintedImage.Dispose();
                paintedImage = paintedImage2;
//                paintedImage.WriteImage("tiff", 0, "D:\\test-2-paintedImage_" + i + ".tif");
            }

            return(paintedImage);
        }
        public HImage Process(HImage image)
        {
            HImage enhancedImage = image.ExpandDomainGray(ExpansionRange);

            return(enhancedImage);
        }