public class LocalExtrema extends Object
findLocalExtrema(net.imglib2.RandomAccessibleInterval<T>, net.imglib2.algorithm.localextrema.LocalExtrema.LocalNeighborhoodCheck<P, T>, java.util.concurrent.ExecutorService) to find pixels that are extrema in their
local neighborhood.| Modifier and Type | Class and Description |
|---|---|
static interface |
LocalExtrema.LocalNeighborhoodCheck<P,T>
A local extremum check.
|
static class |
LocalExtrema.MaximumCheck<T extends Comparable<T>>
A
LocalExtrema.LocalNeighborhoodCheck to test whether a pixel is a local
maximum. |
static class |
LocalExtrema.MinimumCheck<T extends Comparable<T>>
A
LocalExtrema.LocalNeighborhoodCheck to test whether a pixel is a local
minimum. |
| Constructor and Description |
|---|
LocalExtrema() |
| Modifier and Type | Method and Description |
|---|---|
static <P,T> List<P> |
findLocalExtrema(RandomAccessible<T> source,
Interval interval,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessible<T> source,
Interval interval,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessible<T> source,
Interval interval,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape,
ExecutorService service,
int numTasks)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessible<T> source,
Interval interval,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape,
ExecutorService service,
int numTasks,
int splitDim)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessibleInterval<T> source,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> ArrayList<P> |
findLocalExtrema(RandomAccessibleInterval<T> source,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
ExecutorService service)
Deprecated.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessibleInterval<T> source,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessibleInterval<T> source,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape,
ExecutorService service,
int numTasks)
Find pixels that are extrema in their local neighborhood.
|
static <P,T> List<P> |
findLocalExtrema(RandomAccessibleInterval<T> source,
LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck,
Shape shape,
ExecutorService service,
int numTasks,
int splitDim)
Find pixels that are extrema in their local neighborhood.
|
static int |
getBiggestDimension(Interval interval) |
static long[] |
getRequiredBorderSize(Shape shape,
int nDim)
Get the required border size based on the bounding box of the
neighborhood specified by
shape. |
static <T> IntervalView<T> |
shrink(RandomAccessibleInterval<T> source,
long[] margin)
Shrink a
RandomAccessibleInterval symmetrically, i.e. |
@Deprecated public static <P,T> ArrayList<P> findLocalExtrema(RandomAccessibleInterval<T> source, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, ExecutorService service)
LocalExtrema.LocalNeighborhoodCheck interface.
The task is parallelized along the last dimension of source.
The number of tasks for parallelization is determined as:
Math.max( Math.min( maxSizeDim, numThreads * 20 ), 1 )
where maxSizeDim is the longest dimension of
img after adjusting for the bounding box of a
RectangleShape with span 1, and numThreads is
Runtime.getRuntime().availableProcessors()
RectangleShape is used as local neighborhood.
Note: Pixels within 1 point of the source border will be
ignored as local extrema candidates because the complete neighborhood
would not be included in source. To include those pixel,
expand source accordingly. The returned coordinate list is
valid for the original source.source - Find local extrema within this
RandomAccessibleIntervallocalNeighborhoodCheck - Check if current pixel qualifies as local maximum.service - ExecutorService handles parallel tasksArrayList of extremapublic static <P,T> List<P> findLocalExtrema(RandomAccessibleInterval<T> source, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape, ExecutorService service, int numTasks) throws InterruptedException, ExecutionException
LocalExtrema.LocalNeighborhoodCheck interface.
The task is parallelized along the longest dimension of
source after adjusting for size based on shape.
Note: Pixels within a margin of source border as determined
by getRequiredBorderSize(Shape, int) will be ignored as local
extrema candidates because the complete neighborhood would not be
included in source. To include those pixel, expand
source accordingly. The returned coordinate list is valid
for the original source.source - Find local extrema within this
RandomAccessibleIntervallocalNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhood.service - ExecutorService handles parallel tasksnumTasks - Number of tasks for parallel executionList of extremaExecutionExceptionInterruptedExceptionpublic static <P,T> List<P> findLocalExtrema(RandomAccessibleInterval<T> source, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape, ExecutorService service, int numTasks, int splitDim) throws InterruptedException, ExecutionException
LocalExtrema.LocalNeighborhoodCheck interface.
Note: Pixels within a margin of source border as determined
by getRequiredBorderSize(Shape, int) will be ignored as local
extrema candidates because the complete neighborhood would not be
included in source. To include those pixel, expand
source accordingly. The returned coordinate list is valid
for the original source.source - Find local extrema within this
RandomAccessibleIntervallocalNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhood.service - ExecutorService handles parallel tasksnumTasks - Number of tasks for parallel executionsplitDim - Dimension along which input should be split for parallizationList of extremaExecutionExceptionInterruptedExceptionpublic static <P,T> List<P> findLocalExtrema(RandomAccessible<T> source, Interval interval, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape, ExecutorService service, int numTasks) throws InterruptedException, ExecutionException
LocalExtrema.LocalNeighborhoodCheck interface.
The task is parallelized along the longest dimension of
intervalsource - Find local extrema of the function defined by this
RandomAccessibleinterval - Domain in which to look for local extrema. It is the callers
responsibility to ensure that source is defined
in all neighborhoods of interval.localNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhood.service - ExecutorService handles parallel tasksnumTasks - Number of tasks for parallel executionList of extremaExecutionExceptionInterruptedExceptionpublic static <P,T> List<P> findLocalExtrema(RandomAccessible<T> source, Interval interval, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape, ExecutorService service, int numTasks, int splitDim) throws InterruptedException, ExecutionException
LocalExtrema.LocalNeighborhoodCheck interface.source - Find local extrema of the function defined by this
RandomAccessibleinterval - Domain in which to look for local extrema. It is the callers
responsibility to ensure that source is defined
in all neighborhoods of {code interval}.localNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhood.service - ExecutorService handles parallel tasksnumTasks - Number of tasks for parallel executionsplitDim - Dimension along which input should be split for parallizationList of extremaExecutionExceptionInterruptedExceptionpublic static <P,T> List<P> findLocalExtrema(RandomAccessibleInterval<T> source, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck)
LocalExtrema.LocalNeighborhoodCheck interface.
RectangleShape is used as local neighborhood.
Note: Pixels within 1 point of the source border will be
ignored as local extrema candidates because the complete neighborhood
would not be included in source. To include those pixel,
expand source accordingly. The returned coordinate list is
valid for the original source.source - Find local extrema within this
RandomAccessibleIntervallocalNeighborhoodCheck - Check if current pixel qualifies as local maximum.List of extremapublic static <P,T> List<P> findLocalExtrema(RandomAccessibleInterval<T> source, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape)
LocalExtrema.LocalNeighborhoodCheck interface.
Note: Pixels within a margin of source border as determined
by getRequiredBorderSize(Shape, int) will be ignored as local
extrema candidates because the complete neighborhood would not be
included in source. To include those pixel, expand
source accordingly. The returned coordinate list is valid
for the original source.source - Find local extrema within this
RandomAccessibleIntervallocalNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhoodList of extremapublic static <P,T> List<P> findLocalExtrema(RandomAccessible<T> source, Interval interval, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck)
LocalExtrema.LocalNeighborhoodCheck interface.
The local neighborhood is defined as RectangleShape with span 1.source - Find local extrema within this RandomAccessibleinterval - Specifies the domain within which to look for extremalocalNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.List of extremapublic static <P,T> List<P> findLocalExtrema(RandomAccessible<T> source, Interval interval, LocalExtrema.LocalNeighborhoodCheck<P,T> localNeighborhoodCheck, Shape shape)
LocalExtrema.LocalNeighborhoodCheck interface.source - Find local extrema within this RandomAccessibleinterval - Specifies the domain within which to look for extremalocalNeighborhoodCheck - Check if current pixel qualifies as local maximum. It is the
callers responsibility to pass a
LocalExtrema.LocalNeighborhoodCheck that avoids the center pixel if
shape does not skip the center pixel.shape - Defines the local neighborhoodList of extremapublic static long[] getRequiredBorderSize(Shape shape, int nDim)
shape. This is useful for
determining by how much a RandomAccessibleInterval should be
expanded to include min and max positions in the local extrema search.shape - Defines the local neighborhoodnDim - Number of dimensions.shapepublic static <T> IntervalView<T> shrink(RandomAccessibleInterval<T> source, long[] margin)
RandomAccessibleInterval symmetrically, i.e. the margin
is applied both to min and max.source - margin - public static int getBiggestDimension(Interval interval)
interval - Copyright © 2015–2022 ImgLib2. All rights reserved.