Exemplo n.º 1
0
        public IImageIterator <T> Offset(int steps)
        {
            ImageRowIterator <T> result = this;

            result.Advance(steps);
            return(result);
        }
Exemplo n.º 2
0
 public int Difference(ImageRowIterator <T> rhs)
 {
     if (image == rhs.image &&
         row == rhs.row)
     {
         return(this.column - rhs.column);
     }
     throw new ArgumentException();
 }
Exemplo n.º 3
0
 public int Difference(IImageIterator <T> obj)
 {
     if (obj is ImageRowIterator <T> )
     {
         ImageRowIterator <T> rhs = (ImageRowIterator <T>)obj;
         return(Difference(rhs));
     }
     throw new ArgumentException();
 }
Exemplo n.º 4
0
 public override bool Equals(object obj)
 {
     if (obj is ImageRowIterator <T> )
     {
         ImageRowIterator <T> rhs = (ImageRowIterator <T>)obj;
         return(Equals(rhs));
     }
     return(false);
 }
Exemplo n.º 5
0
        /// <summary>
        /// Performs a one dimensional convolution in the x direction
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        /// <param name="kernel"></param>
        private static void SeparableConvolveX(IImage <double> source, IImage <double> target, Kernel1D kernel)
        {
            Debug.Assert(kernel.Left <= 0);
            Debug.Assert(kernel.Right >= 0);
            int w = source.Width;
            int h = source.Height;

            Debug.Assert(w >= kernel.Right - kernel.Left + 1, "Kernel cannot be longer than line");
            for (int y = 0; y < h; ++y)
            {
                ImageRowIterator <double> rs    = source.GetRowIterator(y);
                ImageRowIterator <double> rsEnd = source.GetRowIterator(source.Width, y);
                ImageRowIterator <double> rt    = target.GetRowIterator(y);
                ConvolveLine(rs, rsEnd, rt, kernel);
            }
        }
Exemplo n.º 6
0
 public bool Equals(ImageRowIterator <T> rhs)
 {
     return(image == rhs.image && row == rhs.row && column == rhs.column);
 }