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); }
public HRegion Extract(HImage image) { var region = image.GetDomain(); var modDomain = RegionProcessor.Process(region); region.Dispose(); return(modDomain); }
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); }