diff --git a/pom.xml b/pom.xml index c85889c0d..02a9d9cec 100644 --- a/pom.xml +++ b/pom.xml @@ -206,6 +206,21 @@ Jean-Yves Tinevez and Michael Zinsmaier. 0.15.0 1.0.0-beta-18 10.4.16 + + + [11.0.17,) + 8 true @@ -292,7 +307,7 @@ Jean-Yves Tinevez and Michael Zinsmaier. org.scijava scijava-ops-indexer - 1.0.1-SNAPSHOT + 1.0.0 true diff --git a/src/main/java/net/imglib2/algorithm/binary/Thresholder.java b/src/main/java/net/imglib2/algorithm/binary/Thresholder.java index 4c3e1fad6..2bee0ba57 100644 --- a/src/main/java/net/imglib2/algorithm/binary/Thresholder.java +++ b/src/main/java/net/imglib2/algorithm/binary/Thresholder.java @@ -70,7 +70,7 @@ public class Thresholder * the number of threads to use for thresholding. * @return a new {@link Img} of type {@link BitType} and of same dimension * that the source image. - * @implNote op name='threshold.value' + * @implNote op name='threshold.apply' */ public static final < T extends Type< T > & Comparable< T >> Img< BitType > threshold( final Img< T > source, final T threshold, final boolean above, final int numThreads ) { diff --git a/src/main/java/net/imglib2/algorithm/componenttree/BuildComponentTree.java b/src/main/java/net/imglib2/algorithm/componenttree/BuildComponentTree.java index 098c50b41..1ba40797a 100644 --- a/src/main/java/net/imglib2/algorithm/componenttree/BuildComponentTree.java +++ b/src/main/java/net/imglib2/algorithm/componenttree/BuildComponentTree.java @@ -87,7 +87,6 @@ public final class BuildComponentTree< T extends Type< T >, C extends PartialCom * tree structure. An implementations of {@link PartialComponent.Handler} is * provided for example by {@link PixelListComponentTree}. * - * @implNote op name='componenttree.buildComponentTree',type=Function * @param input * input image. * @param componentGenerator @@ -111,8 +110,7 @@ public static < T extends Type< T >, C extends PartialComponent< T, C > > void b * {@link PartialComponent.Handler} which is responsible for building up the * tree structure. An implementations of {@link PartialComponent.Handler} is * provided for example by {@link PixelListComponentTree}. - * - * @implNote op name='componenttree.buildComponentTree',type=Function + * * @param input * input image of a comparable value type. * @param componentGenerator diff --git a/src/main/java/net/imglib2/algorithm/componenttree/mser/MserTree.java b/src/main/java/net/imglib2/algorithm/componenttree/mser/MserTree.java index 8ba8abf22..f1d24aed8 100644 --- a/src/main/java/net/imglib2/algorithm/componenttree/mser/MserTree.java +++ b/src/main/java/net/imglib2/algorithm/componenttree/mser/MserTree.java @@ -106,7 +106,7 @@ public final class MserTree< T extends Type< T > > implements ComponentForest< M * using an {@link ArrayImgFactory} or {@link CellImgFactory} depending on * input image size. * - * @implNote op name='componenttree.buildMserTree',type=Function + * @implNote op name='create.mserTree',type=Function * @param input * the input image. * @param delta @@ -135,7 +135,7 @@ public static < T extends RealType< T > > MserTree< T > buildMserTree( final Ran * using an {@link ArrayImgFactory} or {@link CellImgFactory} depending on * input image size. * - * @implNote op name='componenttree.buildMserTree',type=Function + * @implNote op name='create.mserTree',type=Function * @param input * the input image. * @param delta @@ -162,7 +162,7 @@ public static < T extends RealType< T > > MserTree< T > buildMserTree( final Ran /** * Build a MSER tree from an input image. * - * @implNote op name='componenttree.buildMserTree',type=Function + * @implNote op name='create.mserTree',type=Function * @param input * the input image. * @param delta @@ -202,7 +202,7 @@ public static < T extends RealType< T > > MserTree< T > buildMserTree( final Ran * using an {@link ArrayImgFactory} or {@link CellImgFactory} depending on * input image size. * - * @implNote op name='componenttree.buildMserTree',type=Function + * @implNote op name='create.mserTree',type=Function * @param input * the input image. * @param computeDelta @@ -231,7 +231,7 @@ public static < T extends Type< T > > MserTree< T > buildMserTree( final RandomA /** * Build a MSER tree from an input image. * - * @implNote op name='componenttree.buildMserTree',type=Function + * @implNote op name='create.mserTree',type=Function * @param input * the input image. * @param computeDelta diff --git a/src/main/java/net/imglib2/algorithm/fill/FloodFill.java b/src/main/java/net/imglib2/algorithm/fill/FloodFill.java index 7df9371dd..e9c0e44b6 100644 --- a/src/main/java/net/imglib2/algorithm/fill/FloodFill.java +++ b/src/main/java/net/imglib2/algorithm/fill/FloodFill.java @@ -90,6 +90,7 @@ public class FloodFill * input pixel type * @param * fill label type + * @implNote op name='image.floodFill', type=Computer2 */ public static < T extends Type< T >, U extends Type< U > > void fill( final RandomAccessible< T > source, @@ -105,53 +106,6 @@ public static < T extends Type< T >, U extends Type< U > > void fill( fill( source, target, seed, fillLabel, shape, filter ); } - /** - * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting - * at seed location, write fillLabel into target at current location and - * continue for each pixel in neighborhood defined by shape if neighborhood - * pixel is in the same connected component and fillLabel has not been - * written into that location yet. - * - * Convenience call to - * {@link #fill(RandomAccessible, RandomAccessible, Localizable, Type, Shape, BiPredicate)}. - * seedLabel is extracted from source at seed location. - *

- * This method differs from - * {@link #fill(RandomAccessible, RandomAccessible, Localizable, Type, Shape)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.floodFill', type=Computer - * @param source - * input - * @param seed - * Start flood fill at this location. - * @param fillLabel - * Immutable. Value to be written into valid flood fill - * locations. - * @param shape - * Defines neighborhood that is considered for connected - * components, e.g. - * {@link net.imglib2.algorithm.neighborhood.DiamondShape} - * @param target - * {@link RandomAccessible} to be written into. May be the same - * as input. - * @param - * input pixel type - * @param - * fill label type - */ - public static < T extends Type< T >, U extends Type< U > > void fill( - final RandomAccessible< T > source, - final Localizable seed, - final U fillLabel, - final Shape shape, - final RandomAccessible< U > target) - { - fill(source, target, seed, fillLabel, shape); - } - /** * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting * at seed location, write fillLabel into target at current location and @@ -185,6 +139,7 @@ public static < T extends Type< T >, U extends Type< U > > void fill( * input pixel type * @param * fill label type + * @implNote op name='image.floodFill', type=Computer2 */ public static < T, U extends Type< U > > void fill( final RandomAccessible< T > source, @@ -197,58 +152,6 @@ public static < T, U extends Type< U > > void fill( fill( source, target, seed, shape, filter, targetPixel -> targetPixel.set( fillLabel ) ); } - /** - * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting - * at seed location, write fillLabel into target at current location and - * continue for each pixel in neighborhood defined by shape if neighborhood - * pixel is in the same connected component and fillLabel has not been - * written into that location yet. - * - * Convenience call to - * {@link FloodFill#fill(RandomAccessible, RandomAccessible, Localizable, Shape, BiPredicate, Consumer)} - * with {@link Type#set} as writer. - *

- * This method differs from - * {@link #fill(RandomAccessible, RandomAccessible, Localizable, Type, Shape, BiPredicate)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.floodFill', type=Computer - * @param source - * input - * @param seed - * Start flood fill at this location. - * @param fillLabel - * Immutable. Value to be written into valid flood fill - * locations. - * @param shape - * Defines neighborhood that is considered for connected - * components, e.g. - * {@link net.imglib2.algorithm.neighborhood.DiamondShape} - * @param filter - * Returns true if pixel has not been visited yet and should be - * written into. Returns false if target pixel has been visited - * or source pixel is not part of the same connected component. - * @param target - * {@link RandomAccessible} to be written into. May be the same - * as input. - * @param - * input pixel type - * @param - * fill label type - */ - public static < T, U extends Type< U > > void fill( - final RandomAccessible< T > source, - final Localizable seed, - final U fillLabel, - final Shape shape, - final BiPredicate< T, U > filter, - final RandomAccessible< U > target) - { - fill( source, target, seed, shape, filter, targetPixel -> targetPixel.set( fillLabel ) ); - } - /** * * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting @@ -279,6 +182,7 @@ public static < T, U extends Type< U > > void fill( * input pixel type * @param * fill label type + * @implNote op name='image.floodFill', type=Computer2 */ public static < T, U > void fill( final RandomAccessible< T > source, @@ -335,54 +239,6 @@ public static < T, U > void fill( } } - /** - * - * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting - * at seed location, write fillLabel into target at current location and - * continue for each pixel in neighborhood defined by shape if neighborhood - * pixel is in the same connected component and fillLabel has not been - * written into that location yet. - *

- * This method differs from - * {@link #fill(RandomAccessible, RandomAccessible, Localizable, Shape, BiPredicate, Consumer)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.floodFill', type=Computer - * @param source - * input - * @param seed - * Start flood fill at this location. - * @param shape - * Defines neighborhood that is considered for connected - * components, e.g. - * {@link net.imglib2.algorithm.neighborhood.DiamondShape} - * @param filter - * Returns true if pixel has not been visited yet and should be - * written into. Returns false if target pixel has been visited - * or source pixel is not part of the same connected component. - * @param writer - * Defines how fill label is written into target at current - * location. - * @param target - * {@link RandomAccessible} to be written into. May be the same - * as input. - * @param - * input pixel type - * @param - * fill label type - */ - public static < T, U > void fill( - final RandomAccessible< T > source, - final Localizable seed, - final Shape shape, - final BiPredicate< T, U > filter, - final Consumer< U > writer, - final RandomAccessible< U > target ) - { - fill(source, target, seed, shape, filter, writer); - } /** * Iterative n-dimensional flood fill for arbitrary neighborhoods: Starting diff --git a/src/main/java/net/imglib2/algorithm/gradient/PartialDerivative.java b/src/main/java/net/imglib2/algorithm/gradient/PartialDerivative.java index d01f6b449..1eee30ada 100644 --- a/src/main/java/net/imglib2/algorithm/gradient/PartialDerivative.java +++ b/src/main/java/net/imglib2/algorithm/gradient/PartialDerivative.java @@ -88,32 +88,6 @@ public static < T extends NumericType< T > > void gradientCentralDifference2( fi } } - /** - * Compute the partial derivative (central difference approximation) of source - * in a particular dimension: - * {@code d_f( x ) = ( f( x + e ) - f( x - e ) ) / 2}, - * where {@code e} is the unit vector along that dimension. - *

- * This method differs from - * {@link #gradientCentralDifference2(RandomAccessible, RandomAccessibleInterval, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.gradientCentralDifference2', type=Computer - * @param source - * source image, has to provide valid data in the interval of the - * gradient image plus a one pixel border in dimension. - * @param dimension - * along which dimension the partial derivatives are computed - * @param gradient - * output image - */ - public static < T extends NumericType< T > > void gradientCentralDifference2( final RandomAccessible< T > source, final int dimension, final RandomAccessibleInterval< T > gradient) - { - gradientCentralDifference2( source, gradient, dimension ); - } - // parallel version... /** * Compute the partial derivative (central difference approximation) of source @@ -133,6 +107,7 @@ public static < T extends NumericType< T > > void gradientCentralDifference2( fi * @param es * {@link ExecutorService} providing workers for gradient * computation. Service is managed (created, shutdown) by caller. + * @implNote op name='filter.partialDerivative, filter.gradientCentralDifference', type=Computer2, priority='-1000.' */ public static < T extends NumericType< T > > void gradientCentralDifferenceParallel( final RandomAccessible< T > source, @@ -189,42 +164,6 @@ public static < T extends NumericType< T > > void gradientCentralDifferenceParal f.get(); } - /** - * Compute the partial derivative (central difference approximation) of source - * in a particular dimension: - * {@code d_f( x ) = ( f( x + e ) - f( x - e ) ) / 2}, - * where {@code e} is the unit vector along that dimension. - *

- * This method differs from - * {@link #gradientCentralDifferenceParallel(RandomAccessible, RandomAccessibleInterval, int, int, ExecutorService)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.gradientCentralDifferenceParallel', type=Computer - * @param source - * source image, has to provide valid data in the interval of the - * gradient image plus a one pixel border in dimension. - * @param dimension - * along which dimension the partial derivatives are computed - * @param nTasks - * Number of tasks for gradient computation. - * @param es - * {@link ExecutorService} providing workers for gradient - * computation. Service is managed (created, shutdown) by caller. - * @param gradient - * output image - */ - public static < T extends NumericType< T > > void gradientCentralDifferenceParallel( - final RandomAccessible< T > source, - final int dimension, - final int nTasks, - final ExecutorService es, - final RandomAccessibleInterval< T > gradient ) throws InterruptedException, ExecutionException - { - gradientCentralDifferenceParallel( source, gradient, dimension, nTasks, es ); - } - // fast version /** * Compute the partial derivative (central difference approximation) of source @@ -239,6 +178,7 @@ public static < T extends NumericType< T > > void gradientCentralDifferenceParal * output image * @param dimension * along which dimension the partial derivatives are computed + * @implNote op name='filter.partialDerivative, filter.gradientCentralDifference', type=Computer2, priority='-1000.' */ public static < T extends NumericType< T > > void gradientCentralDifference( final RandomAccessible< T > source, final RandomAccessibleInterval< T > result, final int dimension ) @@ -253,33 +193,6 @@ public static < T extends NumericType< T > > void gradientCentralDifference( fin } ); } - /** - * Compute the partial derivative (central difference approximation) of source - * in a particular dimension: - * {@code d_f( x ) = ( f( x + e ) - f( x - e ) ) / 2}, - * where {@code e} is the unit vector along that dimension. - *

- * This method differs from - * {@link #gradientCentralDifference(RandomAccessible, RandomAccessibleInterval, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.gradientCentralDifference', type=Computer - * @param source - * source image, has to provide valid data in the interval of the - * gradient image plus a one pixel border in dimension. - * @param dimension - * along which dimension the partial derivatives are computed - * @param result - * output image - */ - public static < T extends NumericType< T > > void gradientCentralDifference( final RandomAccessible< T > source, - final int dimension, final RandomAccessibleInterval< T > result) - { - gradientCentralDifference( source, result, dimension ); - } - /** * Compute the backward difference of source in a particular dimension: * {@code d_f( x ) = ( f( x ) - f( x - e ) )} @@ -289,6 +202,7 @@ public static < T extends NumericType< T > > void gradientCentralDifference( fin * the gradient image plus a one pixel border in dimension. * @param result output image * @param dimension along which dimension the partial derivatives are computed + * @implNote op name='filter.gradientBackwardDifference', type=Computer2 */ public static < T extends NumericType< T > > void gradientBackwardDifference( final RandomAccessible< T > source, final RandomAccessibleInterval< T > result, final int dimension ) @@ -302,29 +216,6 @@ public static < T extends NumericType< T > > void gradientBackwardDifference( fi } ); } - /** - * Compute the backward difference of source in a particular dimension: - * {@code d_f( x ) = ( f( x ) - f( x - e ) )} - * where {@code e} is the unit vector along that dimension - *

- * This method differs from - * {@link #gradientBackwardDifference(RandomAccessible, RandomAccessibleInterval, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.gradientBackwardDifference', type=Computer - * @param source source image, has to provide valid data in the interval of - * the gradient image plus a one pixel border in dimension. - * @param dimension along which dimension the partial derivatives are computed - * @param result output image - */ - public static < T extends NumericType< T > > void gradientBackwardDifference( final RandomAccessible< T > source, - final int dimension, final RandomAccessibleInterval< T > result) - { - gradientBackwardDifference( source, result, dimension ); - } - /** * Compute the forward difference of source in a particular dimension: * {@code d_f( x ) = ( f( x + e ) - f( x ) )} @@ -334,6 +225,7 @@ public static < T extends NumericType< T > > void gradientBackwardDifference( fi * the gradient image plus a one pixel border in dimension. * @param result output image * @param dimension along which dimension the partial derivatives are computed + * @implNote op name='filter.gradientForwardDifference', type=Computer2 */ public static < T extends NumericType< T > > void gradientForwardDifference( final RandomAccessible< T > source, final RandomAccessibleInterval< T > result, final int dimension ) @@ -347,26 +239,4 @@ public static < T extends NumericType< T > > void gradientForwardDifference( fin } ); } - /** - * Compute the forward difference of source in a particular dimension: - * {@code d_f( x ) = ( f( x + e ) - f( x ) )} - * where {@code e} is the unit vector along that dimension - *

- * This method differs from - * {@link #gradientForwardDifference(RandomAccessible, RandomAccessibleInterval, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.gradientForwardDifference', type=Computer - * @param source source image, has to provide valid data in the interval of - * the gradient image plus a one pixel border in dimension. - * @param dimension along which dimension the partial derivatives are computed - * @param result output image - */ - public static < T extends NumericType< T > > void gradientForwardDifference( final RandomAccessible< T > source, - final int dimension, final RandomAccessibleInterval< T > result) - { - gradientForwardDifference( source, result, dimension ); - } } diff --git a/src/main/java/net/imglib2/algorithm/hough/HoughTransforms.java b/src/main/java/net/imglib2/algorithm/hough/HoughTransforms.java index 1557a7a2b..7d73d157f 100644 --- a/src/main/java/net/imglib2/algorithm/hough/HoughTransforms.java +++ b/src/main/java/net/imglib2/algorithm/hough/HoughTransforms.java @@ -106,7 +106,7 @@ private static int defaultRho( final Dimensions dimensions ) * Returns the size of the vote space output image given an input * {@link RandomAccessibleInterval}. * - * @implNote op names='filter.hough.getVotespaceSize', type=Function + * @implNote op names='features.hough.getVotespaceSize', type=Function * @param dimensions * - the {@link Dimensions} over which the Hough Line Transform * will be run @@ -121,7 +121,7 @@ public static long[] getVotespaceSize( final Dimensions dimensions ) * Returns the size of the vote space output image given an input * {@link RandomAccessibleInterval}. * - * @implNote op names='filter.hough.getVotespaceSize', type=Function + * @implNote op names='features.hough.getVotespaceSize', type=Function * @param dimensions * - the {@link Dimensions} over which the Hough Line Transform * will be run @@ -138,7 +138,7 @@ public static long[] getVotespaceSize( final Dimensions dimensions, final int nT * Returns the size of the voteSpace output image given desired {@code nRho} * and {@code nTheta} values. * - * @implNote op names='filter.hough.getVotespaceSize', type=Function + * @implNote op names='features.hough.getVotespaceSize', type=Function * @param nRho * - the number of bins for rho resolution * @param nTheta @@ -153,7 +153,7 @@ public static long[] getVotespaceSize( final int nRho, final int nTheta ) /** * Pick vote space peaks with a {@link LocalExtrema}. * - * @implNote op names='filter.hough.pickLinePeaks', type=Function + * @implNote op names='features.hough.pickPeaks', type=Function * @param voteSpace * - the {@link RandomAccessibleInterval} containing the output * of a Hough Transform vote @@ -175,7 +175,7 @@ public static < T extends IntegerType< T > > List< Point > pickLinePeaks( /** * Pick vote space peaks with a {@link LocalExtrema}. * - * @implNote op names='filter.hough.pickLinePeaks', type=Function + * @implNote op names='features.hough.pickPeaks', type=Function * @param voteSpace * - the {@link RandomAccessibleInterval} containing the output * of a Hough Transform vote @@ -207,7 +207,7 @@ public static < T extends Comparable< T > > List< Point > pickLinePeaks( * Runs a Hough Line Tranform on an image and populates the vote space * parameter with the results. * - * @implNote op names='filter.hough.voteLines', + * @implNote op names='features.hough.voteLines', * type=Computer * @param input * - the {@link RandomAccessibleInterval} to run the Hough Line @@ -235,6 +235,7 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot * are stored * @param nTheta * - the number of bins for theta resolution + * @implNote op name='features.hough.voteLines', type=Computer2 */ public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( final RandomAccessibleInterval< T > input, @@ -265,34 +266,6 @@ private static T getTypeFromInterval( RandomAccessibleInterval< T > rai ) return rai.randomAccess().get(); } - /** - * Runs a Hough Line Tranform on an image and populates the vote space - * parameter with the results. - *

- * This method differs from - * {@link #voteLines(RandomAccessibleInterval, RandomAccessibleInterval, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.hough.voteLines', type=Computer - * @param input - * - the {@link RandomAccessibleInterval} to run the Hough Line - * Transform over - * @param nTheta - * - the number of bins for theta resolution - * @param votespace - * - the {@link RandomAccessibleInterval} in which the results - * are stored - */ - public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( - final RandomAccessibleInterval< T > input, - final int nTheta, - final RandomAccessibleInterval< U > votespace) - { - voteLines( input, votespace, nTheta); - } - /** * Runs a Hough Line Tranform on an image and populates the vote space * parameter with the results. @@ -307,6 +280,7 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot * - the number of bins for theta resolution * @param nRho * - the number of bins for rho resolution + * @implNote op names='features.hough.voteLines', type=Computer2 */ public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( final RandomAccessibleInterval< T > input, @@ -317,37 +291,6 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot voteLines( input, votespace, nTheta, nRho, getTypeFromInterval( input ) ); } - /** - * Runs a Hough Line Tranform on an image and populates the vote space - * parameter with the results. - *

- * This method differs from - * {@link #voteLines(RandomAccessibleInterval, RandomAccessibleInterval, int, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op names='filter.hough.voteLines', type=Computer - * @param input - * - the {@link RandomAccessibleInterval} to run the Hough Line - * Transform over - * @param votespace - * - the {@link RandomAccessibleInterval} in which the results - * are stored - * @param nTheta - * - the number of bins for theta resolution - * @param nRho - * - the number of bins for rho resolution - */ - public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( - final RandomAccessibleInterval< T > input, - final int nTheta, - final int nRho, - final RandomAccessibleInterval< U > votespace) - { - voteLines(input, votespace, nTheta, nRho); - } - /** * Runs a Hough Line Tranform on an image and populates the vote space * parameter with the results. @@ -365,6 +308,7 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot * @param threshold * - the minimum value allowed by the populator. Any input less * than this value will be disregarded by the populator. + * @implNote op name='features.hough.voteLines', type=Computer2 */ public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( final RandomAccessibleInterval< T > input, @@ -378,42 +322,6 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot voteLines( input, votespace, nTheta, nRho, p ); } - /** - * Runs a Hough Line Tranform on an image and populates the vote space - * parameter with the results. - *

- * This method differs from - * {@link #voteLines(RandomAccessibleInterval, RandomAccessibleInterval, int, int, Comparable)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.hough.voteLines', type=Computer - * @param input - * - the {@link RandomAccessibleInterval} to run the Hough Line - * Transform over - * @param nTheta - * - the number of bins for theta resolution - * @param nRho - * - the number of bins for rho resolution - * @param threshold - * - the minimum value allowed by the populator. Any input less - * than this value will be disregarded by the populator. - * @param votespace - * - the {@link RandomAccessibleInterval} in which the results - * are stored - */ - public static < T extends Comparable< T >, U extends IntegerType< U > > void voteLines( - final RandomAccessibleInterval< T > input, - final int nTheta, - final int nRho, - final T threshold, - final RandomAccessibleInterval< U > votespace) - - { - voteLines(input, votespace, nTheta, nRho, threshold); - } - /** * * Runs a Hough Line Tranform on an image and populates the vote space @@ -468,6 +376,7 @@ public static < T extends Comparable< T >, U extends IntegerType< U > > void vot * above the minimum value allowed by the populator. Any input * less than or equal to this value will be disregarded by the * populator. + * @implNote op name='features.hough.voteLines', type=Computer2 */ public static < T, U extends IntegerType< U > > void voteLines( final RandomAccessibleInterval< T > input, @@ -527,85 +436,13 @@ public static < T, U extends IntegerType< U > > void voteLines( } } - /** - * - * Runs a Hough Line Tranform on an image and populates the vote space - * parameter with the results. - *

- * Vote space here has two dimensions: {@code rho} and {@code theta}. - * {@code theta} is measured in radians {@code [-pi/2 pi/2)}, {@code rho} is - * measured in {@code [-rhoMax, rhoMax)}. - *

- *

- * Lines are modeled as - *

- * - *
-	 * l(t) = | x | = rho * |  cos(theta) | + t * | sin(theta) |
-	 *        | y |         | -sin(theta) |       | cos(theta) |
-	 * 
- *

- * In other words, {@code rho} represents the signed minimum distance from - * the image origin to the line, and {@code theta} indicates the angle - * between the row-axis and the minimum offset vector. - *

- *

- * For a given point, then, votes are placed along the curve - *

- * - *
-	 * rho = y * sin( theta ) + x * cos( theta )
-	 * 
- *

- * It is important to note that the interval of the first dimension of the - * vote space image is NOT {@code [-maxRho, maxRho)} but instead - * {@code [0, maxRho * 2)}; the same applies to the second dimension of the - * vote space as well. Thus if {@link HoughTransforms#pickLinePeaks} is not - * used to retrieve the maxima from the vote space, the vote space will have - * to be translated by {@code -maxRho} in dimension 0 to get the correct - * {@code rho} and {@code theta} values from the vote space. - *

- *

- * This method differs from - * {@link #voteLines(RandomAccessibleInterval, RandomAccessibleInterval, int, int, Predicate)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='filter.hough.voteLines', type=Computer - * @param input - * - the {@link RandomAccessibleInterval} to run the Hough Line - * Transform over - * @param nTheta - * - the number of bins for theta resolution - * @param nRho - * - the number of bins for rho resolution - * @param filter - * - a {@link Predicate} judging whether or not the a value is - * above the minimum value allowed by the populator. Any input - * less than or equal to this value will be disregarded by the - * populator. - * @param votespace - * - the {@link RandomAccessibleInterval} in which the results - * are stored - */ - public static < T, U extends IntegerType< U > > void voteLines( - final RandomAccessibleInterval< T > input, - final int nTheta, - final int nRho, - final Predicate< T > filter, - final RandomAccessibleInterval< U > votespace) - { - voteLines(input, votespace, nTheta, nRho, filter); - } - /** * Method used to convert the {rho, theta} output of the * {@link HoughTransforms#voteLines} algorithm into a more useful * y-intercept value. Used with {@link HoughTransforms#getSlope} to create * line equations. * - * @implNote op name='filter.hough.getIntercept', type=Function + * @implNote op name='features.hough.intercept', type=Function * @param rho * - the {@code rho} of the line * @param theta @@ -624,7 +461,7 @@ public static double getIntercept( final long rho, final long theta ) * value. Used with {@link HoughTransforms#getIntercept} to create line * equations. * - * @implNote op name='filter.hough.getSlope', type=Function + * @implNote op name='features.hough.slope', type=Function * @param theta * - the {@code theta} of the line * @return {@code double} - the y-intercept of the line diff --git a/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponentAnalysis.java b/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponentAnalysis.java index 7d76fbe32..0a08f7bd6 100644 --- a/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponentAnalysis.java +++ b/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponentAnalysis.java @@ -117,7 +117,7 @@ public static < T > ToLongBiFunction< Localizable, T > idFromIntervalIndexer( fi * generalization for higher dimenions over a binary mask. {@code mask} and * {@code labeling} are expected to have equal min and max. * - * @implNote op name='labeling.connectedComponents', type=Computer + * @implNote op name='labeling.cca', type=Computer * @param mask * Boolean mask to distinguish foreground ({@code true}) from * background ({@code false}). @@ -155,6 +155,7 @@ public static < B extends BooleanType< B >, L extends IntegerType< L > > void co * ({@link DiamondShape}), 8-neighborhood * ({@link RectangleNeighborhood}) and their generalisations for * higher dimensions. + * @implNote op name='labeling.cca', type=Computer2 */ public static < B extends BooleanType< B >, L extends IntegerType< L > > void connectedComponents( final RandomAccessibleInterval< B > mask, @@ -171,44 +172,6 @@ public static < B extends BooleanType< B >, L extends IntegerType< L > > void co new StartAtOneIdForNextSet() ); } - /** - * - * Implementation of connected component analysis that uses - * {@link IntArrayRankedUnionFind} to find sets of pixels that are connected - * with respect to a neighborhood ({@code shape}) over a binary mask. - * {@code mask} - * and {@code labeling} are expected to have equal min and max. - *

- * This method differs from - * {@link #connectedComponents(RandomAccessibleInterval, RandomAccessibleInterval, Shape)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='labeling.connectedComponents', type=Computer - * @param mask - * Boolean mask to distinguish foreground ({@code true}) from - * background ({@code false}). - * @param shape - * Connectivity of connected components, e.g. 4-neighborhood - * ({@link DiamondShape}), 8-neighborhood - * ({@link RectangleNeighborhood}) and their generalisations for - * higher dimensions. - * @param labeling - * Output parameter to store labeling: background pixels are - * labeled zero, foreground pixels are greater than zero: 1, 2, - * ..., N. Note that initially all pixels are expected to be zero - * as background values will not be written. - */ - public static < B extends BooleanType< B >, L extends IntegerType< L > > void connectedComponents( - final RandomAccessibleInterval< B > mask, - final Shape shape, - final RandomAccessibleInterval< L > labeling) - { - connectedComponents(mask, labeling, shape); - } - - /** * * Implementation of connected component analysis that uses @@ -239,6 +202,7 @@ public static < B extends BooleanType< B >, L extends IntegerType< L > > void co * @param idForSet * Create id for a set from the root id of a set. Multiple calls * with the same argument should always return the same result. + * @implNote op name='labeling.cca', type=Computer2 */ public static < B extends BooleanType< B >, L extends IntegerType< L > > void connectedComponents( final RandomAccessibleInterval< B > mask, @@ -255,55 +219,6 @@ public static < B extends BooleanType< B >, L extends IntegerType< L > > void co UnionFind.relabel( mask, labeling, uf, idForPixel, idForSet ); } - /** - * - * Implementation of connected component analysis that uses - * {@link UnionFind} to find sets of pixels that are connected with respect - * to a neighborhood ({@code shape}) over a binary mask. {@code mask} and - * {@code labeling} are expected to have equal min and max. - *

- * This method differs from - * {@link #connectedComponents(RandomAccessibleInterval, RandomAccessibleInterval, Shape, LongFunction, ToLongBiFunction, LongUnaryOperator)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='labeling.connectedComponents', type=Computer - * @param mask - * Boolean mask to distinguish foreground ({@code true}) from - * background ({@code false}). - * @param shape - * Connectivity of connected components, e.g. 4-neighborhood - * ({@link DiamondShape}), 8-neighborhood - * ({@link RectangleNeighborhood}) and their generalisations for - * higher dimensions. - * @param unionFindFactory - * Creates appropriate {@link UnionFind} data structure for size - * of {@code labeling}, e.g. {@link IntArrayRankedUnionFind} of - * appropriate size. - * @param idForPixel - * Create id from pixel location and value. Multiple calls with - * the same argument should always return the same result. - * @param idForSet - * Create id for a set from the root id of a set. Multiple calls - * with the same argument should always return the same result. - * @param labeling - * Output parameter to store labeling: background pixels are - * labeled zero, foreground pixels are greater than zero: 1, 2, - * ..., N. Note that this is expected to be zero as background - * values will not be written. - */ - public static < B extends BooleanType< B >, L extends IntegerType< L > > void connectedComponents( - final RandomAccessibleInterval< B > mask, - final Shape shape, - final LongFunction< UnionFind > unionFindFactory, - final ToLongBiFunction< Localizable, L > idForPixel, - final LongUnaryOperator idForSet, - final RandomAccessibleInterval< L > labeling) - { - connectedComponents( mask, labeling, shape, unionFindFactory, idForPixel, idForSet ); - } - private static < B extends BooleanType< B >, L extends IntegerType< L > > UnionFind makeUnion( final RandomAccessibleInterval< B > mask, final RandomAccessibleInterval< L > labeling, diff --git a/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponents.java b/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponents.java index 531dc0b56..d6873f8b3 100644 --- a/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponents.java +++ b/src/main/java/net/imglib2/algorithm/labeling/ConnectedComponents.java @@ -99,6 +99,7 @@ public CollectNeighborLabelsFactory getFactory() * @param se * structuring element to use. 8-connected or 4-connected * (respectively n-dimensional analog) + * @implNote op name='labeling.cca', type=Computer2 */ public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void labelAllConnectedComponents( final RandomAccessible< T > input, @@ -112,41 +113,6 @@ public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void service.shutdown(); } - /** - * Label all connected components in the given input image. In the output - * image, all background pixels will be labeled to {} and foreground - * components labeled as {1}, {2}, {3}, etc. where 1, 2, 3 are labels - * returned by {@code labelGenerator.next()}. {@code labelGenerator.next()} - * is called exactly n times if the input contains - * n connected components. - *

- * This method differs from - * {@link #labelAllConnectedComponents(RandomAccessible, ImgLabeling, Iterator, StructuringElement)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='labeling.connectedComponents', type=Computer - * @param input - * input image with pixels != 0 belonging to foreground. - * @param labelGenerator - * produces labels for the connected components. - * @param se - * structuring element to use. 8-connected or 4-connected - * (respectively n-dimensional analog) - * @param labeling - * output labeling in which the connected components will be - * labeled. - */ - public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void labelAllConnectedComponents( - final RandomAccessible< T > input, - final Iterator< L > labelGenerator, - final StructuringElement se, - final ImgLabeling< L, I > labeling) - { - labelAllConnectedComponents( input, labeling, labelGenerator, se ); - } - /** * Label all connected components in the given input image. In the output * image, all background pixels will be labeled to {} and foreground @@ -167,6 +133,7 @@ public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void * (respectively n-dimensional analog) * @param service * service providing threads for multi-threading + * @implNote op name='labeling.cca', type=Computer2 */ public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void labelAllConnectedComponents( final RandomAccessible< T > input, @@ -189,44 +156,6 @@ public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void labeling.getMapping().setLabelSets( labelSets ); } - /** - * Label all connected components in the given input image. In the output - * image, all background pixels will be labeled to {} and foreground - * components labeled as {1}, {2}, {3}, etc. where 1, 2, 3 are labels - * returned by {@code labelGenerator.next()}. {@code labelGenerator.next()} - * is called exactly n times if the input contains - * n connected components. - *

- * This method differs from - * {@link #labelAllConnectedComponents(RandomAccessible, ImgLabeling, Iterator, StructuringElement, ExecutorService)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='labeling.connectedComponents', type=Computer - * @param input - * input image with pixels != 0 belonging to foreground. - * @param labelGenerator - * produces labels for the connected components. - * @param se - * structuring element to use. 8-connected or 4-connected - * (respectively n-dimensional analog) - * @param service - * service providing threads for multi-threading - * @param labeling - * output labeling in which the connected components will be - * labeled. - */ - public static < T extends IntegerType< T >, L, I extends IntegerType< I > > void labelAllConnectedComponents( - final RandomAccessible< T > input, - final Iterator< L > labelGenerator, - final StructuringElement se, - final ExecutorService service, - final ImgLabeling< L, I > labeling) - { - labelAllConnectedComponents( input, labeling, labelGenerator, se, service ); - } - /** * "Label" all connected components in the given input image. In the output * image, all background pixels will be set to 0 and foreground components diff --git a/src/main/java/net/imglib2/algorithm/lazy/Lazy.java b/src/main/java/net/imglib2/algorithm/lazy/Lazy.java index ff64ed53b..eee487136 100644 --- a/src/main/java/net/imglib2/algorithm/lazy/Lazy.java +++ b/src/main/java/net/imglib2/algorithm/lazy/Lazy.java @@ -157,7 +157,7 @@ else if ( DoubleType.class.isInstance( type ) ) * Create a memory {@link CachedCellImg} with a cell generator * {@link Consumer}. * - * @implNote op name='create.cellImg, create', type=Function + * @implNote op name='create.img, engine.create', type=Function * @param targetInterval * @param blockSize * @param type diff --git a/src/main/java/net/imglib2/algorithm/morphology/BlackTopHat.java b/src/main/java/net/imglib2/algorithm/morphology/BlackTopHat.java index aabca07f8..e04715855 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/BlackTopHat.java +++ b/src/main/java/net/imglib2/algorithm/morphology/BlackTopHat.java @@ -265,6 +265,7 @@ public static < T extends Type< T > & Comparable< T > & Sub< T > > Img< T > blac * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.blackTopHat', type=Computer2 */ public static < T extends RealType< T > > void blackTopHat( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final int numThreads ) { @@ -272,57 +273,6 @@ public static < T extends RealType< T > > void blackTopHat( final RandomAccessib MorphologyUtils.subAAB2( target, source, numThreads ); } - /** - * Performs the black top-hat (or bottom-hat) morphological operation on a - * {@link RealType} source {@link RandomAccessible}, using a list of - * {@link Shape}s as a structuring element, and writes the result on a - * specified target which must be an {@link IterableInterval}. - * - * See Top-hat - * transform. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target receives a copy of the source. - *

- * This method differs from - * {@link #blackTopHat(RandomAccessible, IterableInterval, List, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.blackTopHat', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the list of {@link Shape}s that serves as a structuring - * element. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T > > void blackTopHat( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads , final IterableInterval target) - { - blackTopHat( source, target, strels, numThreads ); - } - /** * Performs the black top-hat (or bottom-hat) morphological operation on a * source {@link RandomAccessible}, using a list of {@link Shape}s as a diff --git a/src/main/java/net/imglib2/algorithm/morphology/Closing.java b/src/main/java/net/imglib2/algorithm/morphology/Closing.java index 2b91234c3..2333aeaba 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/Closing.java +++ b/src/main/java/net/imglib2/algorithm/morphology/Closing.java @@ -242,6 +242,7 @@ public static final < T extends Type< T > & Comparable< T > > Img< T > close( fi * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.close', type=Computer2 */ public static < T extends RealType< T > > void close( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final int numThreads ) { @@ -252,57 +253,6 @@ public static < T extends RealType< T > > void close( final RandomAccessible< T close( source, target, strels, minVal, maxVal, numThreads ); } - /** - * Performs the morphological closing operation on a {@link RealType} source - * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring - * element, and writes the result on a specified target which must be an - * {@link IterableInterval}. See Closing_(morphology). - *

- * The closing operation is simply a dilation followed by an erosion. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method differs from - * {@link #close(RandomAccessible, IterableInterval, List, int) - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.close', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T > > void close( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads, final IterableInterval< T > target) - { - close(source, target, strels, numThreads); - } - /** * Performs the morphological closing operation on a source * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring @@ -355,6 +305,7 @@ public static < T extends RealType< T > > void close( final RandomAccessible< T * @param * the type of the source and the result. Must extends * {@code Compparable}. + * @implNote op name='morphology.close', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void close( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads ) { @@ -371,71 +322,6 @@ public static < T extends Type< T > & Comparable< T > > void close( final Random Erosion.erode( extended, target, strels, maxVal, numThreads ); } - /** - * Performs the morphological closing operation on a source - * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring - * element, and writes the result on a specified target which must be an - * {@link IterableInterval}. See Closing_(morphology). - *

- * The closing operation is simply a dilation followed by an erosion. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform closing, it is sufficient that the specified max value is larger - * (against {@link Comparable}) than any of the value found in the source - * image, and conversely for the min value. These normally unseen parameters - * are required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #close(RandomAccessible, IterableInterval, Shape, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.close', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}. - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@code Compparable}. - */ - public static < T extends Type< T > & Comparable< T > > void close( final RandomAccessible< T > source, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ) - { - close(source, target, strels, minVal, maxVal, numThreads); - } - /** * Performs the morphological closing operation on a {@link RealType} source * {@link RandomAccessible}, using a {@link Shape} as a structuring element, @@ -469,6 +355,7 @@ public static < T extends Type< T > & Comparable< T > > void close( final Random * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.close', type=Computer */ public static < T extends RealType< T > > void close( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final int numThreads ) { @@ -479,52 +366,6 @@ public static < T extends RealType< T > > void close( final RandomAccessible< T close( source, target, strel, minVal, maxVal, numThreads ); } - /** - * Performs the morphological closing operation on a {@link RealType} source - * {@link RandomAccessible}, using a {@link Shape} as a structuring element, - * and writes the result on a specified target which must be an - * {@link IterableInterval}. See Closing_(morphology). - *

- * The closing operation is simply a dilation followed by an erosion. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method differs from - * {@link #close(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.close', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T > > void close( final RandomAccessible< T > source, final Shape strel, final int numThreads, final IterableInterval< T > target ) - { - close(source, target, strel, numThreads); - } - /** * Performs the morphological closing operation on a source * {@link RandomAccessible}, using a {@link Shape} as a structuring element, @@ -572,6 +413,7 @@ public static < T extends RealType< T > > void close( final RandomAccessible< T * @param * the type of the source and the result. Must extends * {@code Comparable}. + * @implNote op name='morphology.close', type=Computer */ public static < T extends Type< T > & Comparable< T > > void close( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final T minVal, final T maxVal, final int numThreads ) { @@ -588,66 +430,6 @@ public static < T extends Type< T > & Comparable< T > > void close( final Random Erosion.erode( extended, target, strel, maxVal, numThreads ); } - /** - * Performs the morphological closing operation on a source - * {@link RandomAccessible}, using a {@link Shape} as a structuring element, - * and writes the result on a specified target which must be an - * {@link IterableInterval}. See Closing_(morphology). - *

- * The closing operation is simply a dilation followed by an erosion. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform closing, it is sufficient that the specified max value is larger - * (against {@link Comparable}) than any of the value found in the source - * image, and conversely for the min value. These normally unseen parameters - * are required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #close(RandomAccessible, IterableInterval, Shape, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.close', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}. - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@code Comparable}. - */ - public static < T extends Type< T > & Comparable< T > > void close( final RandomAccessible< T > source, final Shape strel, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ) - { - close(source, target, strel, minVal, maxVal, numThreads); - } - /** * Performs the closing morphological operation, on a source * {@link RandomAccessibleInterval} using a list of {@link Shape}s as a flat diff --git a/src/main/java/net/imglib2/algorithm/morphology/Dilation.java b/src/main/java/net/imglib2/algorithm/morphology/Dilation.java index da271f98b..6b0f888aa 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/Dilation.java +++ b/src/main/java/net/imglib2/algorithm/morphology/Dilation.java @@ -263,6 +263,7 @@ public static < T extends Type< T > & Comparable< T > > Img< T > dilate( final I * the structuring element, as a list of {@link Shape}s. * @param numThreads * the number of threads to use for the calculation. + * @implNote op name='morphology.dilate', type=Computer2 */ public static < T extends RealType< T >> void dilate( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final int numThreads ) { @@ -271,53 +272,6 @@ public static < T extends RealType< T >> void dilate( final RandomAccessible< T dilate( source, target, strels, minVal, numThreads ); } - /** - * Performs the dilation morphological operation, on a {@link RealType} - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Dilation_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method differs from - * {@link #dilate(RandomAccessible, IterableInterval, List, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.dilate', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - */ - public static < T extends RealType< T >> void dilate( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads, final IterableInterval< T > target ) - { - dilate( source, target, strels, numThreads ); - } - /** * Performs the dilation morphological operation, using a * {@link RandomAccessible} as a source and writing results in an @@ -367,6 +321,7 @@ public static < T extends RealType< T >> void dilate( final RandomAccessible< T * @param * the type of the source image and the dilation result. Must be * a sub-type of {@code T extends Comparable & Type}. + * @implNote op name='morphology.dilate', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void dilate( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final T minVal, final int numThreads ) { @@ -416,68 +371,6 @@ public static < T extends Type< T > & Comparable< T > > void dilate( final Rando MorphologyUtils.copy2( Views.translate( temp, offset ), target, numThreads ); } - /** - * Performs the dilation morphological operation, using a - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Dilation_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method relies on a specified minimal value to start comparing to - * other pixels in the neighborhood. For this code to properly perform - * dilation, it is sufficient that the specified min value is smaller - * (against {@link Comparable}) than any of the value found in the source - * image. This normally unseen parameter is required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #dilate(RandomAccessible, IterableInterval, List, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.dilate', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}. This is required to - * perform a proper mathematical dilation. Because we operate on - * a generic {@link Type}, it has to be provided manually. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - * @param - * the type of the source image and the dilation result. Must be - * a sub-type of {@code T extends Comparable & Type}. - */ - public static < T extends Type< T > & Comparable< T > > void dilate( final RandomAccessible< T > source, final List< ? extends Shape > strels, final T minVal, final int numThreads, final IterableInterval< T > target ) - { - dilate(source, target, strels, minVal, numThreads); - } - /** * Performs the dilation morphological operation, on a {@link RealType} * {@link RandomAccessible} as a source and writing results in an @@ -507,6 +400,7 @@ public static < T extends Type< T > & Comparable< T > > void dilate( final Rando * the structuring element, as a {@link Shape}. * @param numThreads * the number of threads to use for the calculation. + * @implNote op name='morphology.dilate', type=Computer2 */ public static < T extends RealType< T >> void dilate( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final int numThreads ) { @@ -515,48 +409,6 @@ public static < T extends RealType< T >> void dilate( final RandomAccessible< T dilate( source, target, strel, minVal, numThreads ); } - /** - * Performs the dilation morphological operation, on a {@link RealType} - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Dilation_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method differs from - * {@link #dilate(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.dilate', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strel - * the structuring element, as a {@link Shape}. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - */ - public static < T extends RealType< T >> void dilate( final RandomAccessible< T > source, final Shape strel, final int numThreads, final IterableInterval< T > target ) - { - dilate( source, target, strel, numThreads ); - } - /** * Performs the dilation morphological operation, using a * {@link RandomAccessible} as a source and writing results in an @@ -601,6 +453,7 @@ public static < T extends RealType< T >> void dilate( final RandomAccessible< T * @param * the type of the source image and the dilation result. Must be * a sub-type of {@code T extends Comparable & Type}. + * @implNote op name='morphology.dilate', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void dilate( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final T minVal, int numThreads ) { @@ -722,63 +575,6 @@ public void run() SimpleMultiThreading.startAndJoin( threads ); } - /** - * Performs the dilation morphological operation, using a - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Dilation_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method relies on a specified minimal value to start comparing to - * other pixels in the neighborhood. For this code to properly perform - * dilation, it is sufficient that the specified min value is smaller - * (against {@link Comparable}) than any of the value found in the source - * image. This normally unseen parameter is required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #dilate(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.dilate', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strel - * the structuring element, as a {@link Shape}. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}. This is required to - * perform a proper mathematical dilation. Because we operate on - * a generic {@link Type}, it has to be provided manually. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - * @param - * the type of the source image and the dilation result. Must be - * a sub-type of {@code T extends Comparable & Type}. - */ - public static < T extends Type< T > & Comparable< T > > void dilate( final RandomAccessible< T > source, final Shape strel, final T minVal, int numThreads, final IterableInterval< T > target ) - { - dilate(source, target, strel, minVal, numThreads); - } - /** * Performs the dilation morphological operation, on a {@link RealType} * {@link Img} using a list of {@link Shape}s as a flat structuring element. @@ -809,7 +605,7 @@ public static < T extends Type< T > & Comparable< T > > void dilate( final Rando * dimensions equals to the maximum of the number of dimension of both * source and structuring element. * - * @implNote op name='morphology.dilateFull', type=Function + * @implNote op name='morphology.dilate', type=Function * @param source * the source image. * @param strels @@ -868,7 +664,7 @@ public static < T extends RealType< T > > Img< T > dilateFull( final Img< T > so * dimensions equals to the maximum of the number of dimension of both * source and structuring element. * - * @implNote op name='morphology.dilateFull', type=Function + * @implNote op name='morphology.dilate', type=Function * @param source * the source image. * @param strels @@ -921,7 +717,7 @@ public static < T extends Type< T > & Comparable< T > > Img< T > dilateFull( fin * dimensions equals to the maximum of the number of dimension of both * source and structuring element. * - * @implNote op name='morphology.dilateFull', type=Function + * @implNote op name='morphology.dilate', type=Function * @param source * the source image. * @param strel @@ -982,7 +778,7 @@ public static < T extends RealType< T >> Img< T > dilateFull( final Img< T > sou * dimensions equals to the maximum of the number of dimension of both * source and structuring element. * - * @implNote op name='morphology.dilateFull', type=Function + * @implNote op name='morphology.dilate', type=Function * @param source * the source image. * @param strel diff --git a/src/main/java/net/imglib2/algorithm/morphology/Erosion.java b/src/main/java/net/imglib2/algorithm/morphology/Erosion.java index cab0a3888..1dd519c20 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/Erosion.java +++ b/src/main/java/net/imglib2/algorithm/morphology/Erosion.java @@ -271,52 +271,6 @@ public static < T extends RealType< T >> void erode( final RandomAccessible< T > erode( source, target, strels, maxVal, numThreads ); } - /** - * Performs the erosion morphological operation, on a {@link RealType} - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Erosion_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method differs from - * {@link #erode(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param target - * the target image. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param numThreads - * the number of threads to use for the calculation. - */ - public static < T extends RealType< T >> void erode( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads, final IterableInterval< T > target ){ - erode(source, target, strels, numThreads); - } - /** * Performs the erosion morphological operation, using a * {@link RandomAccessible} as a source and writing results in an @@ -366,6 +320,7 @@ public static < T extends RealType< T >> void erode( final RandomAccessible< T > * @param * the type of the source image and the erosion result. Must be a * sub-type of {@code T extends Comparable & Type}. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void erode( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final T maxVal, final int numThreads ) { @@ -415,67 +370,6 @@ public static < T extends Type< T > & Comparable< T > > void erode( final Random MorphologyUtils.copy2( Views.translate( temp, offset ), target, numThreads ); } - /** - * Performs the erosion morphological operation, using a - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Erosion_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method relies on a specified maximal value to start comparing to - * other pixels in the neighborhood. For this code to properly perform - * erosion, it is sufficient that the specified max value is larger (against - * {@link Comparable}) than any of the value found in the source image. This - * normally unseen parameter is required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #erode(RandomAccessible, IterableInterval, List, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}. This is required to - * perform a proper mathematical erosion. Because we operate on a - * generic {@link Type}, it has to be provided manually. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - * @param - * the type of the source image and the erosion result. Must be a - * sub-type of {@code T extends Comparable & Type}. - */ - public static < T extends Type< T > & Comparable< T > > void erode( final RandomAccessible< T > source, final List< ? extends Shape > strels, final T maxVal, final int numThreads, final IterableInterval< T > target ){ - erode(source, target, strels, maxVal, numThreads); - } - /** * Performs the erosion morphological operation, on a {@link RealType} * {@link RandomAccessible} as a source and writing results in an @@ -505,6 +399,7 @@ public static < T extends Type< T > & Comparable< T > > void erode( final Random * the structuring element, as a {@link Shape}. * @param numThreads * the number of threads to use for the calculation. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends RealType< T >> void erode( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final int numThreads ) { @@ -513,47 +408,6 @@ public static < T extends RealType< T >> void erode( final RandomAccessible< T > erode( source, target, strel, maxVal, numThreads ); } - /** - * Performs the erosion morphological operation, on a {@link RealType} - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Erosion_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method differs from - * {@link #erode(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strel - * the structuring element, as a {@link Shape}. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - */ - public static < T extends RealType< T >> void erode( final RandomAccessible< T > source, final Shape strel, final int numThreads, final IterableInterval< T > target ){ - erode(source, target, strel, numThreads); - } - /** * Performs the erosion morphological operation, using a * {@link RandomAccessible} as a source and writing results in an @@ -598,6 +452,7 @@ public static < T extends RealType< T >> void erode( final RandomAccessible< T > * @param * the type of the source image and the erosion result. Must be a * sub-type of {@code T extends Comparable & Type}. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void erode( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final T maxVal, int numThreads ) { @@ -719,62 +574,6 @@ public void run() SimpleMultiThreading.startAndJoin( threads ); } - /** - * Performs the erosion morphological operation, using a - * {@link RandomAccessible} as a source and writing results in an - * {@link IterableInterval}. - * - * See - * Erosion_(morphology). - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method relies on a specified maximal value to start comparing to - * other pixels in the neighborhood. For this code to properly perform - * erosion, it is sufficient that the specified max value is larger (against - * {@link Comparable}) than any of the value found in the source image. This - * normally unseen parameter is required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #erode(RandomAccessible, IterableInterval, Shape, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the source {@link RandomAccessible}, must be sufficiently - * padded. - * @param strel - * the structuring element, as a {@link Shape}. - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}. This is required to - * perform a proper mathematical erosion. Because we operate on a - * generic {@link Type}, it has to be provided manually. - * @param numThreads - * the number of threads to use for the calculation. - * @param target - * the target image. - * @param - * the type of the source image and the erosion result. Must be a - * sub-type of {@code T extends Comparable & Type}. - */ - public static < T extends Type< T > & Comparable< T > > void erode( final RandomAccessible< T > source, final Shape strel, final T maxVal, int numThreads, final IterableInterval< T > target ){ - erode(source, target, strel, maxVal, numThreads); - } - /** * Performs the erosion morphological operation, on a {@link RealType} * {@link Img} using a list of {@link Shape}s as a flat structuring element. diff --git a/src/main/java/net/imglib2/algorithm/morphology/Opening.java b/src/main/java/net/imglib2/algorithm/morphology/Opening.java index 61163ee4c..6d6ad0718 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/Opening.java +++ b/src/main/java/net/imglib2/algorithm/morphology/Opening.java @@ -249,6 +249,7 @@ public static final < T extends Type< T > & Comparable< T > > Img< T > open( fin * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends RealType< T > > void open( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final int numThreads ) { @@ -259,56 +260,6 @@ public static < T extends RealType< T > > void open( final RandomAccessible< T > open( source, target, strels, minVal, maxVal, numThreads ); } - /** - * Performs the morphological opening operation on a {@link RealType} source - * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring - * element, and writes the result on a specified target which must be an - * {@link IterableInterval}. See Opening_(morphology). - *

- * The opening operation is simply an erosion followed by a dilation. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method differs from - * {@link #open(RandomAccessible, IterableInterval, List, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T > > void open( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads, final IterableInterval< T > target ){ - open(source, target, strels, numThreads); - } - /** * Performs the morphological opening operation on a source * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring @@ -361,6 +312,7 @@ public static < T extends RealType< T > > void open( final RandomAccessible< T > * @param * the type of the source and the result. Must extends * {@code Compparable}. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void open( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads ) { @@ -377,70 +329,6 @@ public static < T extends Type< T > & Comparable< T > > void open( final RandomA Dilation.dilate( extended, target, strels, minVal, numThreads ); } - /** - * Performs the morphological opening operation on a source - * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring - * element, and writes the result on a specified target which must be an - * {@link IterableInterval}. See Opening_(morphology). - *

- * The opening operation is simply an erosion followed by a dilation. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target is left untouched. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform opening, it is sufficient that the specified max value is larger - * (against {@link Comparable}) than any of the value found in the source - * image, and conversely for the min value. These normally unseen parameters - * are required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #open(RandomAccessible, IterableInterval, List, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the structuring element, as a list of {@link Shape}s. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}). - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}). - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@code Compparable}. - */ - public static < T extends Type< T > & Comparable< T > > void open( final RandomAccessible< T > source, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ){ - open(source, target, strels, minVal, maxVal, numThreads); - } - /** * Performs the morphological opening operation on a {@link RealType} source * {@link RandomAccessible}, using a {@link Shape} as a structuring element, @@ -474,6 +362,7 @@ public static < T extends Type< T > & Comparable< T > > void open( final RandomA * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.open', type=Computer2 */ public static < T extends RealType< T > > void open( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final int numThreads ) { @@ -484,51 +373,6 @@ public static < T extends RealType< T > > void open( final RandomAccessible< T > open( source, target, strel, minVal, maxVal, numThreads ); } - /** - * Performs the morphological opening operation on a {@link RealType} source - * {@link RandomAccessible}, using a {@link Shape} as a structuring element, - * and writes the result on a specified target which must be an - * {@link IterableInterval}. See Opening_(morphology). - *

- * The opening operation is simply an erosion followed by a dilation. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method differs from - * {@link #open(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.open', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T > > void open( final RandomAccessible< T > source, final Shape strel, final int numThreads, final IterableInterval< T > target ){ - open(source, target, strel, numThreads); - } - /** * Performs the morphological opening operation on a source * {@link RandomAccessible}, using a {@link Shape} as a structuring element, @@ -576,6 +420,7 @@ public static < T extends RealType< T > > void open( final RandomAccessible< T > * @param * the type of the source and the result. Must extends * {@code Comparable}. + * @implNote op name='morphology.erode', type=Computer2 */ public static < T extends Type< T > & Comparable< T > > void open( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final T minVal, final T maxVal, final int numThreads ) { @@ -592,65 +437,6 @@ public static < T extends Type< T > & Comparable< T > > void open( final RandomA Dilation.dilate( extended, target, strel, minVal, numThreads ); } - /** - * Performs the morphological opening operation on a source - * {@link RandomAccessible}, using a {@link Shape} as a structuring element, - * and writes the result on a specified target which must be an - * {@link IterableInterval}. See Opening_(morphology). - *

- * The opening operation is simply an erosion followed by a dilation. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform opening, it is sufficient that the specified max value is larger - * (against {@link Comparable}) than any of the value found in the source - * image, and conversely for the min value. These normally unseen parameters - * are required to operate on - * {@code T extends Comparable & Type}. - *

- * This method differs from - * {@link #open(RandomAccessible, IterableInterval, Shape, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.erode', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}). - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}). - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@code Comparable}. - */ - public static < T extends Type< T > & Comparable< T > > void open( final RandomAccessible< T > source, final Shape strel, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ){ - open(source, target, strel, minVal, maxVal, numThreads); - } - /** * Performs the opening morphological operation, on a source * {@link RandomAccessibleInterval} using a list of {@link Shape}s as a flat diff --git a/src/main/java/net/imglib2/algorithm/morphology/TopHat.java b/src/main/java/net/imglib2/algorithm/morphology/TopHat.java index 0955f6ad7..85744155e 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/TopHat.java +++ b/src/main/java/net/imglib2/algorithm/morphology/TopHat.java @@ -268,6 +268,7 @@ public static < T extends Type< T > & Comparable< T > & Sub< T > > Img< T > topH * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer2 */ public static < T extends RealType< T >> void topHat( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final int numThreads ) { @@ -275,56 +276,6 @@ public static < T extends RealType< T >> void topHat( final RandomAccessible< T MorphologyUtils.subBAB( source, target, numThreads ); } - /** - * Performs the top-hat (white top-hat) morphological operation on a - * {@link RealType} source {@link RandomAccessible}, using a list of - * {@link Shape}s as a structuring element, and writes the result on a - * specified target which must be an {@link IterableInterval}. - * - * See Top-hat - * transform. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target receives a copy of the source. - *

- * This method differs from - * {@link #topHat(RandomAccessible, IterableInterval, List, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the list of {@link Shape}s that serves as a structuring - * element. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T >> void topHat( final RandomAccessible< T > source, final List< ? extends Shape > strels, final int numThreads, final IterableInterval< T > target ){ - topHat(source, target, strels, numThreads); - } - /** * Performs the top-hat (white top-hat) morphological operation on a source * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring @@ -379,6 +330,7 @@ public static < T extends RealType< T >> void topHat( final RandomAccessible< T * sub-type of {@code T extends Comparable & Sub}, * because we want to be able to compare pixels between * themselves and to subtract them. + * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer2 */ public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( final RandomAccessible< T > source, final IterableInterval< T > target, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads ) { @@ -386,72 +338,6 @@ public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( f MorphologyUtils.subBAB( source, target, numThreads ); } - /** - * Performs the top-hat (white top-hat) morphological operation on a source - * {@link RandomAccessible}, using a list of {@link Shape}s as a structuring - * element, and writes the result on a specified target which must be an - * {@link IterableInterval}. - * - * See Top-hat - * transform. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * The structuring element is specified through a list of {@link Shape}s, to - * allow for performance optimization through structuring element - * decomposition. Each shape is processed in order as given in the list. If - * the list is empty, the target receives a copy of the source. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform, it is sufficient that the specified max value is larger (against - * {@link Comparable}) than any of the value found in the source image, and - * conversely for the min value. These normally unseen parameters are - * required to operate on - * {@code T extends Comparable & Sub}. - *

- * This method differs from - * {@link #topHat(RandomAccessible, IterableInterval, List, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strels - * the list of {@link Shape}s that serves as a structuring - * element. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}). - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}). - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source image and the top-hat result. Must be a - * sub-type of {@code T extends Comparable & Sub}, - * because we want to be able to compare pixels between - * themselves and to subtract them. - */ - public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( final RandomAccessible< T > source, final List< ? extends Shape > strels, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ){ - topHat(source, target, strels, minVal, maxVal, numThreads); - } - /** * Performs the top-hat (white top-hat) morphological operation on a * {@link RealType} source {@link RandomAccessible}, using a {@link Shape} @@ -484,6 +370,7 @@ public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( f * @param * the type of the source and the result. Must extends * {@link RealType}. + * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer2 */ public static < T extends RealType< T >> void topHat( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final int numThreads ) { @@ -491,50 +378,6 @@ public static < T extends RealType< T >> void topHat( final RandomAccessible< T MorphologyUtils.subBAB( source, target, numThreads ); } - /** - * Performs the top-hat (white top-hat) morphological operation on a - * {@link RealType} source {@link RandomAccessible}, using a {@link Shape} - * as a structuring element, and writes the result on a specified target - * which must be an {@link IterableInterval}. - * - * See Top-hat - * transform. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method differs from - * {@link #topHat(RandomAccessible, IterableInterval, Shape, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source and the result. Must extends - * {@link RealType}. - */ - public static < T extends RealType< T >> void topHat( final RandomAccessible< T > source, final Shape strel, final int numThreads, final IterableInterval< T > target ){ - topHat(source, target, strel, numThreads); - } - /** * Performs the top-hat (white top-hat) morphological operation on a source * {@link RandomAccessible}, using a {@link Shape} as a structuring element, @@ -583,6 +426,7 @@ public static < T extends RealType< T >> void topHat( final RandomAccessible< T * sub-type of {@code T extends Comparable & Sub}, * because we want to be able to compare pixels between * themselves and to subtract them. + * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer2 */ public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( final RandomAccessible< T > source, final IterableInterval< T > target, final Shape strel, final T minVal, final T maxVal, final int numThreads ) { @@ -590,66 +434,6 @@ public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( f MorphologyUtils.subBAB( source, target, numThreads ); } - /** - * Performs the top-hat (white top-hat) morphological operation on a source - * {@link RandomAccessible}, using a {@link Shape} as a structuring element, - * and writes the result on a specified target which must be an - * {@link IterableInterval}. - * - * See Top-hat - * transform. - *

- * Careful: Target must point to a different structure than source. - * In place operation will not work but will not generate an error. - *

- * It is the caller responsibility to ensure that the source is sufficiently - * padded to properly cover the target range plus the shape size. See - * e.g. {@link Views#extendValue(RandomAccessibleInterval, Type)} - *

- * It is limited to flat structuring elements, only having - * {@code on/off} pixels, contrary to grayscale structuring elements. - * This allows to simply use a {@link Shape} as a type for these structuring - * elements. - *

- * This method relies on specified minimal and maximal values to start - * comparing to other pixels in the neighborhood. For this code to properly - * perform, it is sufficient that the specified max value is larger (against - * {@link Comparable}) than any of the value found in the source image, and - * conversely for the min value. These normally unseen parameters are - * required to operate on - * {@code T extends Comparable & Sub}. - *

- * This method differs from - * {@link #topHat(RandomAccessible, IterableInterval, Shape, Type, Type, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='morphology.topHat, morphology.whiteTopHat', type=Computer - * @param source - * the {@link RandomAccessible} to operate on. - * @param strel - * the {@link Shape} that serves as a structuring element. - * @param minVal - * a T containing set to a value smaller than any of the values - * in the source (against {@link Comparable}). - * @param maxVal - * a T containing set to a value larger than any of the values in - * the source (against {@link Comparable}). - * @param numThreads - * the number of threads to use for calculation. - * @param target - * the {@link IterableInterval} to write the results on. - * @param - * the type of the source image and the top-hat result. Must be a - * sub-type of {@code T extends Comparable & Sub}, - * because we want to be able to compare pixels between - * themselves and to subtract them. - */ - public static < T extends Type< T > & Comparable< T > & Sub< T >> void topHat( final RandomAccessible< T > source, final Shape strel, final T minVal, final T maxVal, final int numThreads, final IterableInterval< T > target ){ - topHat(source, target, strel, minVal, maxVal, numThreads); - } - /** * Performs the top-hat (white top-hat) morphological operation, on a * {@link RealType} {@link Img} using a list of {@link Shape}s as a flat diff --git a/src/main/java/net/imglib2/algorithm/morphology/distance/DistanceTransform.java b/src/main/java/net/imglib2/algorithm/morphology/distance/DistanceTransform.java index b78c09b93..156847619 100644 --- a/src/main/java/net/imglib2/algorithm/morphology/distance/DistanceTransform.java +++ b/src/main/java/net/imglib2/algorithm/morphology/distance/DistanceTransform.java @@ -112,7 +112,6 @@ public static enum DISTANCE_TYPE * can be weighted (individually for each dimension, if desired) against the * image values via the weights parameter. * - * @implNote op name='image.distanceTransform', type=Inplace1 * @param source * Input function on which distance transform should be computed. * @param distanceType @@ -123,6 +122,7 @@ public static enum DISTANCE_TYPE * should be squared, too). * @param * {@link RealType} input + * @implNote op name='image.distanceTransform', type=Inplace1 */ public static < T extends RealType< T > > void transform( final RandomAccessibleInterval< T > source, @@ -141,7 +141,6 @@ public static < T extends RealType< T > > void transform( * can be weighted (individually for each dimension, if desired) against the * image values via the weights parameter. * - * @implNote op name='image.distanceTransform', type=Inplace1 * @param source * Input function on which distance transform should be computed. * @param distanceType @@ -163,6 +162,7 @@ public static < T extends RealType< T > > void transform( * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', type=Inplace1 */ public static < T extends RealType< T > > void transform( final RandomAccessibleInterval< T > source, @@ -197,6 +197,7 @@ public static < T extends RealType< T > > void transform( * {@link RealType} input * @param * {@link RealType} intermediate results + * @implNote op name='image.distanceTransform', type=Computer2 */ public static < T extends RealType< T >, U extends RealType< U > > void transform( final RandomAccessible< T > source, @@ -207,46 +208,6 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor transform( source, target, target, distanceType, weights ); } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code target} ({@link DoubleType} recommended). The distance can be - * weighted (individually for each dimension, if desired) against the image - * values via the weights parameter. - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, DISTANCE_TYPE, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.distanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Intermediate and final results of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - */ - public static < T extends RealType< T >, U extends RealType< U > > void transform( - final RandomAccessible< T > source, - final DISTANCE_TYPE distanceType, - final double[] weights, - final RandomAccessibleInterval< U > target) - { - transform( source, target, target, distanceType, weights ); - } - /** * Create * distance @@ -281,6 +242,7 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', type=Computer2 */ public static < T extends RealType< T >, U extends RealType< U > > void transform( final RandomAccessible< T > source, @@ -292,52 +254,6 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor { transform( source, target, target, distanceType, es, nTasks, weights ); } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code target} ({@link DoubleType} recommended). The distance can be - * weighted (individually for each dimension, if desired) against the image - * values via the weights parameter. - * - * @implNote op name='image.distanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Intermediate and final results of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < T extends RealType< T >, U extends RealType< U > > void transform( - final RandomAccessible< T > source, - final DISTANCE_TYPE distanceType, - final ExecutorService es, - final int nTasks, - final double[] weights, - final RandomAccessibleInterval< U > target) throws InterruptedException, ExecutionException - { - transform(source, target, distanceType, es, nTasks, weights); - } /** * Create @@ -367,6 +283,7 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor * {@link RealType} intermediate results * @param * {@link RealType} output + * @implNote op name='image.distanceTransform', type=Computer3 */ public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( final RandomAccessible< T > source, @@ -392,52 +309,6 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real } } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code tmp} ({@link DoubleType} recommended). The output will be written - * into {@code target}. The distance can be weighted (individually for each - * dimension, if desired) against the image values via the weights - * parameter. - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, DISTANCE_TYPE, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.distanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Final result of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - */ - public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( - final RandomAccessible< T > source, - final RandomAccessibleInterval< U > tmp, - final DISTANCE_TYPE distanceType, - final double[] weights, - final RandomAccessibleInterval< V > target) - { - transform(source, target, tmp, distanceType, weights); - } - /** * Create * distance @@ -477,6 +348,7 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', type=Computer3 */ public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( final RandomAccessible< T > source, @@ -504,64 +376,6 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real } } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code tmp} ({@link DoubleType} recommended). The output will be written - * into {@code target}. The distance can be weighted (individually for each - * dimension, if desired) against the image values via the weights - * parameter. - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, DISTANCE_TYPE, ExecutorService, int, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Final result of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( - final RandomAccessible< T > source, - final RandomAccessibleInterval< U > tmp, - final DISTANCE_TYPE distanceType, - final ExecutorService es, - final int nTasks, - final double[] weights, - final RandomAccessibleInterval target) throws InterruptedException, ExecutionException - { - transform(source, tmp, target, distanceType, es, nTasks, weights); - } - /** * Create * distance @@ -569,13 +383,13 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real * {@link Distance} d. Intermediate and final results will be stored in * {@code source} ({@link DoubleType} recommended). * - * @implNote op name='image.distanceTransform', type=Inplace1 * @param source * Input function on which distance transform should be computed. * @param d * {@link Distance} between two points. * @param * {@link RealType} input + * @implNote op name='image.distanceTransform', type=Inplace1 */ public static < T extends RealType< T > > void transform( final RandomAccessibleInterval< T > source, @@ -591,7 +405,6 @@ public static < T extends RealType< T > > void transform( * {@link Distance} d. Intermediate and final results will be stored in * {@code source} ({@link DoubleType} recommended). * - * @implNote op name='image.distanceTransform', type=Inplace1 * @param source * Input function on which distance transform should be computed. * @param d @@ -609,6 +422,7 @@ public static < T extends RealType< T > > void transform( * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', type=Inplace1 */ public static < T extends RealType< T > > void transform( final RandomAccessibleInterval< T > source, @@ -636,6 +450,7 @@ public static < T extends RealType< T > > void transform( * {@link RealType} input * @param * {@link RealType} intermediate results + * @implNote op name='image.distanceTransform', type=Computer2 */ public static < T extends RealType< T >, U extends RealType< U > > void transform( final RandomAccessible< T > source, @@ -645,38 +460,6 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor transform( source, target, target, d ); } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using arbitrary - * {@link Distance} d. Intermediate and final results will be stored in - * {@code target} ({@link DoubleType} recommended). - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, Distance)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @param source - * Input function on which distance transform should be computed. - * @param d - * {@link Distance} between two points. - * @param target - * Final result of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - */ - public static < T extends RealType< T >, U extends RealType< U > > void transform( - final RandomAccessible< T > source, - final Distance d, - final RandomAccessibleInterval< U > target) - { - transform( source, target, d ); - } - /** * Create * distance @@ -705,6 +488,7 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', type=Computer2 */ public static < T extends RealType< T >, U extends RealType< U > > void transform( final RandomAccessible< T > source, @@ -716,52 +500,6 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor transform( source, target, target, d, es, nTasks ); } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using arbitrary - * {@link Distance} d. Intermediate and final results will be stored in - * {@code target} ({@link DoubleType} recommended). - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, Distance, ExecutorService, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.distanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param d - * {@link Distance} between two points. - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param target - * Final result of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < T extends RealType< T >, U extends RealType< U > > void transform( - final RandomAccessible< T > source, - final Distance d, - final ExecutorService es, - final int nTasks, - final RandomAccessibleInterval< U > target ) throws InterruptedException, ExecutionException - { - transform(source, target, d, es, nTasks); - } - /** * Create * distance @@ -784,6 +522,7 @@ public static < T extends RealType< T >, U extends RealType< U > > void transfor * {@link RealType} intermediate results * @param * {@link RealType} output + * @implNote op name='image.distanceTransform', type=Computer2 */ public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( final RandomAccessible< T > source, @@ -829,79 +568,41 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real * {@link Distance} d. Intermediate results will be stored in {@code tmp} * ({@link DoubleType} recommended). The output will be written into * {@code target}. - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, Distance)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

* - * @implNote op name='image.distanceTransform', type=Computer * @param source * Input function on which distance transform should be computed. * @param tmp * Storage for intermediate results. - * @param d - * {@link Distance} between two points. * @param target * Final result of distance transform. + * @param d + * {@link Distance} between two points. + * @param es + * {@link ExecutorService} for parallel execution. + * @param nTasks + * Number of tasks/parallelism * @param * {@link RealType} input * @param * {@link RealType} intermediate results * @param * {@link RealType} output + * @throws InterruptedException + * if interrupted while waiting, in which case unfinished tasks + * are cancelled (distance transform may be computed only + * partially) + * @throws ExecutionException + * if the computation threw an exception (distance transform may + * be computed only partially) + * @implNote op name='image.distanceTransform', type=Computer3 */ public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( final RandomAccessible< T > source, final RandomAccessibleInterval< U > tmp, + final RandomAccessibleInterval< V > target, final Distance d, - final RandomAccessibleInterval< V > target ) - { - transform(source, tmp, target, d); - } - - /** - * Create - *
distance - * transforms of sampled functions on {@code source} using arbitrary - * {@link Distance} d. Intermediate results will be stored in {@code tmp} - * ({@link DoubleType} recommended). The output will be written into - * {@code target}. - * - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param target - * Final result of distance transform. - * @param d - * {@link Distance} between two points. - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( - final RandomAccessible< T > source, - final RandomAccessibleInterval< U > tmp, - final RandomAccessibleInterval< V > target, - final Distance d, - final ExecutorService es, - final int nTasks ) throws InterruptedException, ExecutionException + final ExecutorService es, + final int nTasks ) throws InterruptedException, ExecutionException { assert source.numDimensions() == target.numDimensions(): "Dimension mismatch"; @@ -936,57 +637,6 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real } } - /** - * Create - * distance - * transforms of sampled functions on {@code source} using arbitrary - * {@link Distance} d. Intermediate results will be stored in {@code tmp} - * ({@link DoubleType} recommended). The output will be written into - * {@code target}. - *

- * This method differs from - * {@link #transform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, Distance, ExecutorService, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param d - * {@link Distance} between two points. - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param target - * Final result of distance transform. - * @param - * {@link RealType} input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < T extends RealType< T >, U extends RealType< U >, V extends RealType< V > > void transform( - final RandomAccessible< T > source, - final RandomAccessibleInterval< U > tmp, - final Distance d, - final ExecutorService es, - final int nTasks, - final RandomAccessibleInterval< V > target ) throws InterruptedException, ExecutionException - { - transform(source, tmp, target, d, es, nTasks); - } - /** * Create binary distance transform on {@code source} using squared * Euclidian (L2) or L1 distance. Intermediate results will be stored in @@ -1008,6 +658,7 @@ public static < T extends RealType< T >, U extends RealType< U >, V extends Real * {@link BooleanType} binary mask input * @param * {@link RealType} intermediate results + * @implNote op name='image.distanceTransform', priority='100', type=Computer2 */ public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( final RandomAccessible< B > source, @@ -1018,44 +669,6 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar binaryTransform( source, target, target, distanceType, weights ); } - /** - * Create binary distance transform on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code target} ({@link DoubleType} recommended). The distance can be - * weighted (individually for each dimension, if desired) against the image - * values via the weights parameter. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, DISTANCE_TYPE, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Intermediate and final results of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - */ - public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( - final RandomAccessible< B > source, - final DISTANCE_TYPE distanceType, - final double[] weights, - final RandomAccessibleInterval< U > target ) - { - binaryTransform( source, target, distanceType, weights ); - } - /** * Create binary distance transform on {@code source} using squared * Euclidian (L2) or L1 distance. Intermediate results will be stored in @@ -1088,6 +701,7 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', priority='100', type=Computer2 */ public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( final RandomAccessible< B > source, @@ -1100,57 +714,6 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar binaryTransform( source, target, target, distanceType, es, nTasks, weights ); } - /** - * Create binary distance transform on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code target} ({@link DoubleType} recommended). The distance can be - * weighted (individually for each dimension, if desired) against the image - * values via the weights parameter. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, DISTANCE_TYPE, ExecutorService, int, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Intermediate and final results of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( - final RandomAccessible< B > source, - final DISTANCE_TYPE distanceType, - final ExecutorService es, - final int nTasks, - final double[] weights, - final RandomAccessibleInterval< U > target ) throws InterruptedException, ExecutionException - { - binaryTransform( source, target, distanceType, es, nTasks, weights ); - } - /** * Create binary distance transform on {@code source} using squared * Euclidian (L2) or L1 distance. Intermediate results will be stored in @@ -1177,6 +740,7 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar * {@link RealType} intermediate results * @param * {@link RealType} output + * @implNote op name='image.distanceTransform', priority='100', type=Computer3 */ public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( final RandomAccessible< B > source, @@ -1193,50 +757,6 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R transform( converted, tmp, target, distanceType, weights ); } - /** - * Create binary distance transform on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code tmp} ({@link DoubleType} recommended). The output will be written - * into {@code target}. The distance can be weighted (individually for each - * dimension, if desired) against the image values via the weights - * parameter. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, DISTANCE_TYPE, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Final result of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - */ - public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( - final RandomAccessible< B > source, - final RandomAccessibleInterval< U > tmp, - final DISTANCE_TYPE distanceType, - final double[] weights, - final RandomAccessibleInterval< V > target) - { - binaryTransform(source, tmp, target, distanceType, weights); - } - /** * Create binary distance transform on {@code source} using squared * Euclidian (L2) or L1 distance. Intermediate results will be stored in @@ -1274,6 +794,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', priority='100', type=Computer3 */ public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( final RandomAccessible< B > source, @@ -1291,69 +812,11 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R transform( converted, tmp, target, distanceType, es, nTasks, weights ); } - /** - * Create binary distance transform on {@code source} using squared - * Euclidian (L2) or L1 distance. Intermediate results will be stored in - * {@code tmp} ({@link DoubleType} recommended). The output will be written - * into {@code target}. The distance can be weighted (individually for each - * dimension, if desired) against the image values via the weights - * parameter. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, DISTANCE_TYPE, ExecutorService, int, double...)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param distanceType - * Defines distance to be used: squared Euclidian or L1 - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param weights - * Individual weights for each dimension, balancing image values - * and distance (when using squared Euclidian distance, weights - * should be squared, too). - * @param target - * Final result of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( - final RandomAccessible< B > source, - final RandomAccessibleInterval< U > tmp, - final DISTANCE_TYPE distanceType, - final ExecutorService es, - final int nTasks, - final double[] weights, - final RandomAccessibleInterval< V > target ) throws InterruptedException, ExecutionException - { - binaryTransform(source, tmp, target, distanceType, es, nTasks, weights); - } - /** * Create binary distance transform on {@code source} using arbitrary * {@link Distance} d. Intermediate and final results will be stored in * source ({@link DoubleType} recommended). * - * @implNote op name='image.binaryDistanceTransform', type=Inplace1 * @param source * Input function on which distance transform should be computed. * @param d @@ -1371,6 +834,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', priority='100', type=Inplace1 */ public static < B extends BooleanType< B > > void binaryTransform( final RandomAccessibleInterval< B > source, @@ -1396,6 +860,7 @@ public static < B extends BooleanType< B > > void binaryTransform( * {@link BooleanType} binary mask input * @param * {@link RealType} intermediate results + * @implNote op name='image.distanceTransform', priority='100', type=Computer2 */ public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( final RandomAccessible< B > source, @@ -1405,37 +870,6 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar binaryTransform( source, target, target, d ); } - /** - * Create binary distance transform on {@code source} using arbitrary - * {@link Distance} d. Intermediate and final results will be stored in - * {@code target} ({@link DoubleType} recommended). - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, Distance) - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param d - * {@link Distance} between two points. - * @param target - * Final result of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - */ - public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( - final RandomAccessible< B > source, - final Distance d, - final RandomAccessibleInterval< U > target ) - { - binaryTransform( source, target, d ); - } - /** * Create binary distance transform on {@code source} using arbitrary * {@link Distance} d. Intermediate and final results will be stored in @@ -1462,6 +896,7 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', priority='100', type=Computer2 */ public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( final RandomAccessible< B > source, @@ -1473,50 +908,6 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar binaryTransform( source, target, target, d, es, nTasks ); } - /** - * Create binary distance transform on {@code source} using arbitrary - * {@link Distance} d. Intermediate and final results will be stored in - * {@code target} ({@link DoubleType} recommended). - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, Distance, ExecutorService, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param target - * Final result of distance transform. - * @param d - * {@link Distance} between two points. - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < B extends BooleanType< B >, U extends RealType< U > > void binaryTransform( - final RandomAccessible< B > source, - final Distance d, - final ExecutorService es, - final int nTasks, - final RandomAccessibleInterval< U > target) throws InterruptedException, ExecutionException - { - binaryTransform( source, target, d, es, nTasks ); - } - /** * Create binary distance transform on {@code source} using arbitrary * {@link Distance} d. Intermediate results will be stored in {@code tmp} @@ -1537,6 +928,7 @@ public static < B extends BooleanType< B >, U extends RealType< U > > void binar * {@link RealType} intermediate results * @param * {@link RealType} output + * @implNote op name='image.distanceTransform', priority='100', type=Computer3 */ public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( final RandomAccessible< B > source, @@ -1551,43 +943,6 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R transform( converted, tmp, target, d ); } - /** - * Create binary distance transform on {@code source} using arbitrary - * {@link Distance} d. Intermediate results will be stored in {@code tmp} - * ({@link DoubleType} recommended). The output will be written into - * {@code target}. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, Distance)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param target - * Final result of distance transform. - * @param d - * {@link Distance} between two points. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - */ - public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( - final RandomAccessible< B > source, - final RandomAccessibleInterval< U > tmp, - final Distance d, - final RandomAccessibleInterval< V > target ) - { - transform( source, tmp, target, d ); - } - /** * Create binary distance transform on {@code source} using arbitrary * {@link Distance} d. Intermediate results will be stored in {@code tmp} @@ -1619,6 +974,7 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R * @throws ExecutionException * if the computation threw an exception (distance transform may * be computed only partially) + * @implNote op name='image.distanceTransform', priority='100', type=Computer3 */ public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( final RandomAccessible< B > source, @@ -1635,56 +991,6 @@ public static < B extends BooleanType< B >, U extends RealType< U >, V extends R transform( converted, tmp, target, d, es, nTasks ); } - /** - * Create binary distance transform on {@code source} using arbitrary - * {@link Distance} d. Intermediate results will be stored in {@code tmp} - * ({@link DoubleType} recommended). The output will be written into - * {@code target}. - *

- * This method differs from - * {@link #binaryTransform(RandomAccessible, RandomAccessibleInterval, RandomAccessibleInterval, Distance, ExecutorService, int)} - * only in that its parameter order is tailored to an Op. The output comes - * last, and the primary input (the input image) comes first. - *

- * - * @implNote op name='image.binaryDistanceTransform', type=Computer - * @param source - * Input function on which distance transform should be computed. - * @param tmp - * Storage for intermediate results. - * @param d - * {@link Distance} between two points. - * @param es - * {@link ExecutorService} for parallel execution. - * @param nTasks - * Number of tasks/parallelism - * @param target - * Final result of distance transform. - * @param - * {@link BooleanType} binary mask input - * @param - * {@link RealType} intermediate results - * @param - * {@link RealType} output - * @throws InterruptedException - * if interrupted while waiting, in which case unfinished tasks - * are cancelled (distance transform may be computed only - * partially) - * @throws ExecutionException - * if the computation threw an exception (distance transform may - * be computed only partially) - */ - public static < B extends BooleanType< B >, U extends RealType< U >, V extends RealType< V > > void binaryTransform( - final RandomAccessible< B > source, - final RandomAccessibleInterval< U > tmp, - final Distance d, - final ExecutorService es, - final int nTasks, - final RandomAccessibleInterval target) throws InterruptedException, ExecutionException - { - transform( source, tmp, target, d, es, nTasks ); - } - /** * Create binary distance transform on {@code source} using L1 distance. * Intermediate results will be stored in {@code tmp} ({@link DoubleType} diff --git a/src/main/java/net/imglib2/algorithm/stats/Max.java b/src/main/java/net/imglib2/algorithm/stats/Max.java index 6c97ee811..c988e15d2 100644 --- a/src/main/java/net/imglib2/algorithm/stats/Max.java +++ b/src/main/java/net/imglib2/algorithm/stats/Max.java @@ -47,7 +47,6 @@ public class Max /** * Find the maximum value and its position in an {@link IterableInterval}. * - * @implNote op name='stats.max', type=Function * @param iterable * input interval. * @return a cursor positioned on the global maximum. If several maxima with diff --git a/src/main/java/net/imglib2/algorithm/stats/Normalize.java b/src/main/java/net/imglib2/algorithm/stats/Normalize.java index 7def138e2..912ca505d 100644 --- a/src/main/java/net/imglib2/algorithm/stats/Normalize.java +++ b/src/main/java/net/imglib2/algorithm/stats/Normalize.java @@ -43,7 +43,7 @@ public class Normalize /** * Normalize values of an {@link IterableInterval} to the range [min, max]. * - * @implNote op name='stats.normalize', type=Inplace1 + * @implNote op name='image.normalize', type=Inplace1 * @param iterable * the interval to be normalized. * @param min diff --git a/src/main/java/net/imglib2/algorithm/tree/TreeUtils.java b/src/main/java/net/imglib2/algorithm/tree/TreeUtils.java index 50bda1fb2..ca20eb6c2 100644 --- a/src/main/java/net/imglib2/algorithm/tree/TreeUtils.java +++ b/src/main/java/net/imglib2/algorithm/tree/TreeUtils.java @@ -42,7 +42,6 @@ public class TreeUtils /** * Find all leaf nodes of a forest. * - * @implNote op name='tree.getLeafs', type=Function * @param forest * the forest * @return set of leaf nodes. @@ -71,7 +70,6 @@ public static interface Consumer< T > /** * Call {@link Consumer#accept(Object)} on op for every node in the forest. * - * @implNote op name='tree.forEach', type=Inplace1 * @param forest * the forest * @param op