Skip to content

Commit 2a6b917

Browse files
committed
Merge remote-tracking branch 'imglib/master' into hough-circle-transform
2 parents 07a0686 + 33e53d9 commit 2a6b917

File tree

64 files changed

+2580
-456
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+2580
-456
lines changed

.travis/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#!/bin/sh
22
dir="$(dirname "$0")"
3-
test "$TRAVIS_SECURE_ENV_VARS" = true \
3+
if [ "$TRAVIS_SECURE_ENV_VARS" = true \
44
-a "$TRAVIS_PULL_REQUEST" = false \
5-
-a "$TRAVIS_BRANCH" = master &&
6-
mvn -Pdeploy-to-imagej deploy --settings "$dir/settings.xml" ||
5+
-a "$TRAVIS_BRANCH" = master ]
6+
then
7+
mvn -Pdeploy-to-imagej deploy --settings "$dir/settings.xml"
8+
else
79
mvn install
10+
fi

pom.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</parent>
1111

1212
<artifactId>imglib2-algorithm</artifactId>
13-
<version>0.6.4-SNAPSHOT</version>
13+
<version>0.8.2-SNAPSHOT</version>
1414

1515
<name>ImgLib2 Algorithms</name>
1616
<description>Useful image processing algorithms.</description>
@@ -188,13 +188,16 @@ Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner,
188188
Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert,
189189
Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin,
190190
Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>
191+
192+
<imglib2-realtransform.version>2.0.0-beta-38</imglib2-realtransform.version>
193+
<jitk-tps.version>3.0.0</jitk-tps.version>
191194
</properties>
192195

193196
<repositories>
194197
<!-- NB: for SciJava dependencies -->
195198
<repository>
196199
<id>imagej.public</id>
197-
<url>http://maven.imagej.net/content/groups/public</url>
200+
<url>https://maven.imagej.net/content/groups/public</url>
198201
</repository>
199202
</repositories>
200203

@@ -229,6 +232,11 @@ Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>
229232
<artifactId>trove4j</artifactId>
230233
<version>3.0.3</version>
231234
</dependency>
235+
<dependency>
236+
<groupId>org.ojalgo</groupId>
237+
<artifactId>ojalgo</artifactId>
238+
<version>43.0</version>
239+
</dependency>
232240

233241
<!-- Test dependencies -->
234242
<dependency>
@@ -237,4 +245,15 @@ Jean-Yves Tinevez and Michael Zinsmaier.</license.copyrightOwners>
237245
<scope>test</scope>
238246
</dependency>
239247
</dependencies>
248+
249+
<build>
250+
<plugins>
251+
<plugin>
252+
<artifactId>maven-javadoc-plugin</artifactId>
253+
<configuration>
254+
<additionalparam>--allow-script-in-comments -header '&lt;script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;'</additionalparam>
255+
</configuration>
256+
</plugin>
257+
</plugins>
258+
</build>
240259
</project>

src/main/java/net/imglib2/algorithm/OutputAlgorithm.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
package net.imglib2.algorithm;
3636

3737
/**
38-
* TODO This interface should be empty and extend Callable<F>, Algorithm.
38+
* TODO This interface should be empty and extend {@code Callable<F>},
39+
* {@link Algorithm}.
3940
*
4041
* @author Stephan Preibisch
4142
* @author Stephan Saalfeld

src/main/java/net/imglib2/algorithm/binary/Thresholder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ public class Thresholder
6464
* @param threshold
6565
* the threshold.
6666
* @param above
67-
* if <code>true</code>, the target value will be true for source
68-
* values above the threshold, <code>false</code> otherwise.
67+
* if {@code true}, the target value will be true for source
68+
* values above the threshold, {@code false} otherwise.
6969
* @param numThreads
7070
* the number of threads to use for thresholding.
7171
* @return a new {@link Img} of type {@link BitType} and of same dimension

src/main/java/net/imglib2/algorithm/componenttree/BuildComponentTree.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,21 @@
5252

5353
/**
5454
* Build the component tree of an image. This is an implementation of the
55-
* algorithm described by D. Nister and H. Stewenius in
56-
* "Linear Time Maximally Stable Extremal Regions" (ECCV 2008).
57-
*
58-
* The input to the algorithm is a RandomAccessibleInterval< T >. Further, a
59-
* Comparator<T> and a {@link PartialComponent.Generator} to instantiate new
60-
* components are required. Pixel locations are aggregated in
55+
* algorithm described by D. Nister and H. Stewenius in "Linear Time Maximally
56+
* Stable Extremal Regions" (ECCV 2008).
57+
* <p>
58+
* The input to the algorithm is a {@code RandomAccessibleInterval< T >}.
59+
* Further, a {@code Comparator<T>} and a {@link PartialComponent.Generator} to
60+
* instantiate new components are required. Pixel locations are aggregated in
6161
* {@link PartialComponent}s which are passed to a
6262
* {@link PartialComponent.Handler} whenever a connected component for a
6363
* specific threshold is completed.
64-
*
64+
* </p>
65+
* <p>
6566
* Building up a tree structure out of the completed components should happen in
6667
* the {@link PartialComponent.Handler} implementation. See
6768
* {@link PixelListComponentTree} for an example.
68-
*
69+
* </p>
6970
* <p>
7071
* <strong>TODO</strong> Add support for non-zero-min RandomAccessibleIntervals.
7172
* (Currently, we assume that the input image is a <em>zero-min</em> interval.)

src/main/java/net/imglib2/algorithm/componenttree/mser/ComputeDelta.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@
3737
/**
3838
* For a given threshold value compute the threshold value delta steps down the
3939
* component tree. This might mean addition or subtraction, depending on whether
40-
* it's a dark-to-bright or bright-to-dark pass. {@see ComputeDeltaBrightToDark}
41-
* {@see ComputeDeltaDarkToBright}
40+
* it's a dark-to-bright or bright-to-dark pass.
41+
*
42+
* @see ComputeDeltaBrightToDark
43+
* @see ComputeDeltaDarkToBright
4244
*
4345
* @param <T>
4446
* value type of the input image.

src/main/java/net/imglib2/algorithm/componenttree/mser/MserTree.java

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,10 @@
6565
* Maximally Stable Extremal Regions (MSER) are selected from the component tree
6666
* as follows. For each component, an instability score is computed as
6767
* <!-- |R_i - R_{i-\Delta}| / |R_i| -->
68-
* <math style="display:block">
69-
* <mi>s</mi><mfenced><msub><mi>R</mi><mi>i</mi></msub></mfenced>
70-
* <mo>=</mo>
71-
* <mfrac>
72-
* <mfenced open="|" close="|">
73-
* <mrow><msub><mi>R</mi><mi>i</mi></msub>
74-
* <mo lspace=mediummathspace rspace=mediummathspace>\</mo>
75-
* <msub><mi>R</mi><mrow><mi>i</mi><mo>-</mo><mi>&Delta;</mi></mrow></msub>
76-
* </mrow>
77-
* </mfenced>
78-
* <mfenced open="|" close="|">
79-
* <msub><mi>R</mi><mi>i</mi></msub>
80-
* </mfenced>
81-
* </mfrac>
82-
* </math>
8368
* </p>
84-
*
69+
* <blockquote>
70+
* \[\frac{|R_i - R_{i-\Delta}|}{|R_i|}\]
71+
* </blockquote>
8572
* <p>
8673
* Regions whose score is a local minimum are selected as MSER candidates.
8774
* </p>
@@ -96,20 +83,10 @@
9683
* A tree is build of the remaining candidates. Finally, candidates are pruned
9784
* from the tree, if they are too similar to their parent: Let <em>A</em>,
9885
* <em>B</em> be a region and its parent. Then <em>A</em> is discarded if
99-
* <!-- |B - A| / |B| <= minDiversity -->
100-
* <math style="display:block">
101-
* <mfrac>
102-
* <mfenced open="|" close="|"><mrow>
103-
* <mi>B</mi>
104-
* <mo lspace=mediummathspace rspace=mediummathspace>\</mo>
105-
* <mi>A</mi>
106-
* </mrow></mfenced>
107-
* <mfenced open="|" close="|"><mi>B</mi></mfenced>
108-
* </mfrac>
109-
* <mo>&le;</mo><mi>minDiversity</mi>
110-
* </math>
11186
* </p>
112-
*
87+
* <blockquote>
88+
* \[\frac{|B - A|}{|B|} \leq minDiversity\]
89+
* </blockquote>
11390
* <p>
11491
* <strong>TODO</strong> Add support for non-zero-min RandomAccessibleIntervals.
11592
* (Currently, we assume that the input image is a <em>zero-min</em> interval.)

src/main/java/net/imglib2/algorithm/componenttree/pixellist/PixelListComponentTree.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public static < T extends RealType< T > > PixelListComponentTree< T > buildCompo
9797
* @param type
9898
* a variable of the input image type.
9999
* @param imgFactory
100-
* used for creating the {@link PixelList} image {@see
101-
* PixelListComponentGenerator}.
100+
* used for creating the {@link PixelList} image (see
101+
* {@link PixelListPartialComponentGenerator}).
102102
* @param darkToBright
103103
* whether to apply thresholds from dark to bright (true) or
104104
* bright to dark (false)
@@ -146,8 +146,8 @@ public static < T extends Type< T > > PixelListComponentTree< T > buildComponent
146146
* @param comparator
147147
* determines ordering of threshold values.
148148
* @param imgFactory
149-
* used for creating the {@link PixelList} image {@see
150-
* PixelListComponentGenerator}.
149+
* used for creating the {@link PixelList} image
150+
* {@link PixelListPartialComponentGenerator}.
151151
* @return component tree of the image.
152152
*/
153153
public static < T extends Type< T > > PixelListComponentTree< T > buildComponentTree( final RandomAccessibleInterval< T > input, final T maxValue, final Comparator< T > comparator, final ImgFactory< LongType > imgFactory )

src/main/java/net/imglib2/algorithm/dog/DifferenceOfGaussian.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ public class DifferenceOfGaussian
6363
/**
6464
* Compute the difference of Gaussian for the input. Input convolved with
6565
* Gaussian of sigmaSmaller is subtracted from input convolved with Gaussian
66-
* of sigmaLarger (where sigmaLarger > sigmaSmaller).
67-
*
66+
* of sigmaLarger (where {@code sigmaLarger > sigmaSmaller}).
6867
* <p>
6968
* Creates an appropriate temporary image and calls
70-
* {@link #DoG(double[], double[], RandomAccessible, RandomAccessible, RandomAccessibleInterval, int)}.
69+
* {@link #DoG(double[], double[], RandomAccessible, RandomAccessible, RandomAccessibleInterval, ExecutorService)}
70+
* .
71+
* </p>
7172
*
7273
* @param sigmaSmaller
7374
* stddev (in every dimension) of smaller Gaussian.
@@ -99,7 +100,7 @@ public static < I extends NumericType< I >, T extends NumericType< T > & NativeT
99100
/**
100101
* Compute the difference of Gaussian for the input. Input convolved with
101102
* Gaussian of sigmaSmaller is subtracted from input convolved with Gaussian
102-
* of sigmaLarger (where sigmaLarger > sigmaSmaller).
103+
* of sigmaLarger (where sigmaLarger &gt; sigmaSmaller).
103104
*
104105
* @param sigmaSmaller
105106
* stddev (in every dimension) of smaller Gaussian.
@@ -200,7 +201,7 @@ public Void call()
200201

201202
/**
202203
* Helper function to compute per-dimension sigmas in pixel coordinates. The
203-
* parameters <code>sigma1</code> and <code>sigma2</code> specify desired
204+
* parameters {@code sigma1} and {@code sigma2} specify desired
204205
* sigmas (scale) in image coordinates. Taking into account the sigma of the
205206
* input image as well as the image calibration, the resulting sigma arrays
206207
* specifiy the smoothing that has to be applied to achieve the desired
@@ -209,15 +210,15 @@ public Void call()
209210
* @param imageSigma
210211
* estimated sigma of the input image, in pixel coordinates.
211212
* @param minf
212-
* multiple of the <code>imageSigma</code> that smoothing with
213+
* multiple of the {@code imageSigma} that smoothing with
213214
* the resulting sigma must at least achieve.
214215
* @param pixelSize
215216
* calibration. Dimensions of a pixel in image units.
216217
* @param sigma1
217218
* desired sigma in image coordinates.
218219
* @param sigma2
219220
* desired sigma in image coordinates.
220-
* @return <code>double[2][numDimensions]</code>, array of two arrays
221+
* @return {@code double[2][numDimensions]}, array of two arrays
221222
* contains resulting sigmas for sigma1, sigma2.
222223
*/
223224
public static double[][] computeSigmas( final double imageSigma, final double minf, final double[] pixelSize, final double sigma1, final double sigma2 )

src/main/java/net/imglib2/algorithm/fill/FloodFill.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ public class FloodFill
8484
* written into. Returns false if target pixel has been visited
8585
* or source pixel is not part of the same connected component.
8686
* @param <T>
87-
* T implements {@link Type<U>}.
87+
* T implements {@code Type<U>}.
8888
* @param <U>
89-
* U implements {@link Type<U>}.
89+
* U implements {@code Type<U>}.
9090
*/
9191
public static < T extends Type< T >, U extends Type< U > > void fill( final RandomAccessible< T > source, final RandomAccessible< U > target, final Localizable seed, final U fillLabel, final Shape shape, final Filter< Pair< T, U >, Pair< T, U > > filter )
9292
{
@@ -125,7 +125,7 @@ public static < T extends Type< T >, U extends Type< U > > void fill( final Rand
125125
* @param <T>
126126
* No restrictions on {@link T}.
127127
* @param <U>
128-
* {@link U} implements {@link Type<U>}.
128+
* {@link U} implements {@code Type<U>}.
129129
*/
130130
public static < T, U extends Type< U > > void fill( final RandomAccessible< T > source, final RandomAccessible< U > target, final Localizable seed, final T seedLabel, final U fillLabel, final Shape shape, final Filter< Pair< T, U >, Pair< T, U > > filter )
131131
{

0 commit comments

Comments
 (0)