private void SetDivisionScheme() { ImageOperationsWrapper.SetDivisionScheme(HasLayerOfPeriphery, HasLayersOfRegions, HasLayerOfMiscellaneous); ImageOperationsWrapper.SetColorsForDivision(allColorsOfRegions, ColorValueOfPeriphery, ColorValueOfMiscellaneous); ImageOperationsWrapper.SetOrderOfRegions(OrderOfRegions); ImageOperationsWrapper.SetBackgroundStyle(HasLayerOfBackground, BackgroundStyle); ImageOperationsWrapper.SetLayerOptions(BlendMode, OpacityOfLayers); ImageOperationsWrapper.SetThreshold(ThresholdOfLines); ImageOperationsWrapper.SetReferenceOfPeriphery(ReferenceCorner); ImageOperationsWrapper.SetPeripheryManagement(ExcludesPeriphery); ImageOperationsWrapper.SetColorOverwhelming(LaysColorOverLines, MaxThicknessOfLines, IsOpeningEnabled); }
/// <summary> /// Execute image export(asynchronous execution). /// </summary> private async void ExportAsync() { await Task.Run(() => { // Set operation settings (Native). SetDivisionScheme(); // Execute operation (Native). ImageOperationsWrapper.ExecuteDividing(exportFilePath, sourceFilePath, exportStyle); // After native method execution. var currentdispatcher = Application.Current.Dispatcher; currentdispatcher.Invoke(() => { IsBusy = false; }); }); }