Skip to content

Commit c0eec87

Browse files
authored
Merge pull request #71 from hanslovsky/improve-distance-transform-usability
Improve distance transform usability
2 parents b19faf9 + 759583a commit c0eec87

File tree

5 files changed

+831
-83
lines changed

5 files changed

+831
-83
lines changed

src/main/java/net/imglib2/algorithm/morphology/distance/Distance.java

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* {@code d' = f(x - x0) + y0}, must have exactly one intersection point (for
4646
* each dimension):
4747
* </p>
48-
*
48+
*
4949
* <pre>
5050
* |{ x : f(x) = f(x -x0) + y0 }| = 1
5151
* </pre>
@@ -55,24 +55,47 @@
5555
* <p>
5656
* {@code D( p ) = min_q f(q) + d(p,q)} where p,q are points on a grid/image.
5757
* </p>
58-
*
58+
*
5959
* @author Philipp Hanslovsky
6060
*
6161
*/
6262
public interface Distance
6363
{
6464

6565
/**
66-
* Evaluate function with family parameters xShift and yShift at position x
67-
* in dimension dim.
66+
* Evaluate function with family parameters {@code xShift} and
67+
* {@code yShift} at position {@code x} in dimension dim.
68+
*
69+
* @param x
70+
* position on x-axis at which function is evaluated
71+
* @param xShift
72+
* shift along the x-axis
73+
* @param yShift
74+
* shift along y-axis
75+
* @param dim
76+
* dimension in which to evaluate
77+
* @return Function value at position {@code x}
6878
*/
6979
double evaluate( double x, double xShift, double yShift, int dim );
7080

7181
/**
7282
*
7383
* Determine the intersection point in dimension dim of two members of the
74-
* function family. The members are parameterized by xShift1, yShift1,
75-
* xShift2, yShift2, with xShift1 &lt; xShift2.
84+
* function family. The members are parameterized by {@code xShift1},
85+
* {@code yShift1}, {@code xShift2}, {@code yShift2}, with {@code xShift1 >
86+
* xShift2}.
87+
*
88+
* @param xShift1
89+
* shift along the x-axis
90+
* @param yShift1
91+
* shift along the y-axis
92+
* @param xShift2
93+
* shift along the x-axis
94+
* @param yShift2
95+
* shift along the y-axis
96+
* @param dim
97+
* dimension in which to evaluate
98+
* @return intersection point along axis defined by {@code dim}
7699
*/
77100
double intersect( double xShift1, double yShift1, double xShift2, double yShift2, int dim );
78101

0 commit comments

Comments
 (0)