public ImageProcessingPreparationSteps(IHandwrittenInputExtractor handwrittenInputExtractor, ITemplateAreasCropper templateAreasCropper, ICroppedAreaCleaner croppedAreaCleaner, ICroppedAreaScaler croppedAreaScaler, IRegionOfInterestExtractor regionOfInterestExtractor) { VerifyConstructionParams(handwrittenInputExtractor, templateAreasCropper, croppedAreaCleaner, croppedAreaScaler, regionOfInterestExtractor); HandwrittenInputExtractor = handwrittenInputExtractor; TemplateAreasCropper = templateAreasCropper; CroppedAreaCleaner = croppedAreaCleaner; CroppedAreaScaler = croppedAreaScaler; RegionOfInterestExtractor = regionOfInterestExtractor; }
private static void VerifyConstructionParams(IHandwrittenInputExtractor handwrittenInputExtractor, ITemplateAreasCropper templateAreasCropper, ICroppedAreaCleaner croppedAreaCleaner, ICroppedAreaScaler croppedAreaScaler, IRegionOfInterestExtractor regionOfInterestExtractor) { if (handwrittenInputExtractor == null) { throw new ArgumentNullException(nameof(handwrittenInputExtractor)); } if (templateAreasCropper == null) { throw new ArgumentNullException(nameof(templateAreasCropper)); } if (croppedAreaCleaner == null) { throw new ArgumentNullException(nameof(croppedAreaCleaner)); } if (croppedAreaScaler == null) { throw new ArgumentNullException(nameof(croppedAreaScaler)); } if (regionOfInterestExtractor == null) { throw new ArgumentNullException(nameof(regionOfInterestExtractor)); } }