def iawatershed(f, Bc=iasecross(), option='LINES'): from ipdp import se2offset offset = se2offset(Bc) w = connectedComponents(f, offset) if option == 'LINES': w = iasubm(w, iaero(w)) w = iabinary(w) return w
def iacwatershed(f, g, Bc=iasecross(), option='LINES'): from ipdp import se2offset if iaisbinary(g): g = ialabel(g, Bc) offset = se2offset(Bc) w = ift_m(f, offset, g) if option == 'LINES': w = iasubm(w, iaero(w)) w = iabinary(w) return w
def iatz(f, Bc=iasecross()): from ipdp import se2offset offset = se2offset(Bc) return tieZone(f, offset)