Skip to main content
. Author manuscript; available in PMC: 2010 May 1.
Published in final edited form as: Ann Biomed Eng. 2009 Mar 11;37(5):913–926. doi: 10.1007/s10439-009-9666-5

Algorithm 1.

Linear exhaustive search with linked patches

Matchmax = –1
p1 = p(x, y1)
p2 = p(x, y2)
for all xisearch area do
    y1j = argmaxy{Match(p1, p(xi, y)) | y ∈ search area}
    y2j = argmaxy{Match(p2, p(xi, y)) | y ∈ search area}
    Matchi = Match(p1, p(xi, y1j)) + Match(p2, p(xi, y2j))
    if Matchi > Matchmax then
        Matchmax = Matchi
        x′ = xi; y1=y1j; y2=y2j;
    end if
end for
p1=p(x,y1)
p2=p(x,y2)