using System;
using OpenCvSharp;

namespace OpenCVStudio_v0
{
    public sealed class TransposeExecutor : IImageBlockExecutor
    {
        public string BlockType => "Transpose";

        public Mat Execute(Mat input, ProjectBlock block, ProjectManager projectManager)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }
            if (input.Empty())
            {
                throw new InvalidOperationException("Transpose: входное изображение пустое.");
            }
            Mat result = new Mat();
            Cv2.Transpose(input, result);
            return result;
        }
    }
}