public ReadOnlyImageView(IReadOnlyImage <UType, TDepth> image, Box2i roi, int channel = 0)
        {
            _image = image;

            _viewTopLeft    = roi.MinCorner;
            _viewDimensions = roi.Dimensions;
            _viewStep       = new Vector2i(1, 1);
            _viewChannel    = channel;

            _step = image.Step;
        }
        public ReadOnlyImageView(IReadOnlyImage <UType, TDepth> image, Vector2i topLeft, Vector2i step, Vector2i dimensions, int channel = 0)
        {
            _image = image;

            _viewTopLeft    = topLeft;
            _viewDimensions = dimensions;
            _viewStep       = step;
            _viewChannel    = channel;

            _step = Vector2i.Mul(image.Step, step);
        }
 public static int Height <TType, TDepth>(this IReadOnlyImage <TType, TDepth> @this)
 {
     return(@this.Dimensions.Y);
 }
 public static Box2i Box <TType, TDepth>(this IReadOnlyImage <TType, TDepth> @this)
 {
     return(new Box2i(0, 0, @this.Width(), @this.Height()));
 }
 public static int Width <TType, TDepth>(this IReadOnlyImage <TType, TDepth> @this)
 {
     return(@this.Dimensions.X);
 }