code: def strel_periodicline(xoff, yoff, n):
      
      xoff, yoff, n = [int(t) for t in (xoff, yoff, n)]
      center_x, center_y = abs(n * xoff), abs(n * yoff)
      result = np.zeros((center_y * 2 + 1, center_x * 2 + 1), bool)
      k = np.arange(-n, n+1)
      result[center_y + yoff * k, center_x + xoff * k] = True
      return result
docs: Create a structuring element composed of a line of evenly-spaced points
      
      xoff, yoff - the line goes through the origin and this point
      
      n - the line is composed of the origin and n points on either side of the
          origin for a total of 2*n + 1 points
         
      The structuring element is composed of the points,
      (k * yoff, k * xoff)
      for k in range(-n, n+1)