示例#1
0
        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;
        }
示例#2
0
 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));
     }
 }