using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using ImageProcessing.Core;

namespace XplorePlane.Services
{
    public interface IImageProcessingService : IDisposable
    {
        IReadOnlyList<string> GetAvailableProcessors();
        IReadOnlyList<ProcessorParameter> GetProcessorParameters(string processorName);
        ImageProcessorBase GetProcessor(string processorName);
        string GetProcessorDisplayName(string processorName);
        void RegisterProcessor(string name, ImageProcessorBase processor);

        Task<BitmapSource> ProcessImageAsync(
            BitmapSource source,
            string processorName,
            IDictionary<string, object> parameters,
            IProgress<double> progress = null,
            CancellationToken cancellationToken = default);

        Task<ushort[]> ProcessRawFrameAsync(
            ushort[] pixelData,
            int width,
            int height,
            string processorName,
            IDictionary<string, object> parameters,
            CancellationToken cancellationToken = default);
    }
}
