コード例 #1
0
        public HRegion Extract(HImage image)
        {
            HRegion region;

            if (RegionExtractor != null)
            {
                region = RegionExtractor.Extract(image);
            }
            else
            {
                region = image.GetDomain();
            }

            HRegion processedRegion;

            if (RegionProcessor != null)
            {
                processedRegion = RegionProcessor.Process(region);
                region.Dispose();
            }
            else
            {
                processedRegion = region;
            }
            return(processedRegion);
        }
コード例 #2
0
        public HRegion Extract(HImage image)
        {
            var region    = image.GetDomain();
            var modDomain = RegionProcessor.Process(region);

            region.Dispose();
            return(modDomain);
        }
コード例 #3
0
        public HRegion Extract(HImage image)
        {
            HImage targetFilterImage = ImageFilter != null?ImageFilter.Process(image) : image;

            HRegion targetRegion = RegionExtractor != null?RegionExtractor.Extract(targetFilterImage) : targetFilterImage.GetDomain();

            HRegion targetProcessedRegion = RegionProcessor != null?RegionProcessor.Process(targetRegion) : targetRegion;

            if (ImageFilter != null)
            {
                targetFilterImage.Dispose();
            }

            if (RegionProcessor != null)
            {
                targetRegion.Dispose();
            }

            return(targetProcessedRegion);
        }