Package inra.ijpb.morphology.extrema
Class RegionalExtrema3DAlgo
java.lang.Object
inra.ijpb.algo.AlgoStub
inra.ijpb.morphology.extrema.RegionalExtrema3DAlgo
- All Implemented Interfaces:
Algo
- Direct Known Subclasses:
RegionalExtrema3DByFlooding
public abstract class RegionalExtrema3DAlgo extends AlgoStub
Interface for computing regional extrema (regional minima and regional maxima).
Example of use:
ImageStack image = IJ.getImage().getStack();
RegionalExtrema3DAlgo algo = new RegionalExtrema3DFlooding();
algo.setConnectivity(6);
algo.setExtremaType(ExtremaType.MAXIMA);
ImageStack result = algo.applyTo(image);
ImagePlus resPlus = new ImagePlus("Regional Extrema", result);
resPlus.show();
- Author:
- David Legland
- See Also:
RegionalExtrema3DByFlooding
-
Constructor Summary
Constructors Constructor Description RegionalExtrema3DAlgo()
Creates a new algorithm for computing regional extrema, that computes regional minima with connectivity 6.RegionalExtrema3DAlgo(ExtremaType extremaType, int connectivity)
Creates a new algorithm for computing regional extrema, by choosing type of minima and connectivity. -
Method Summary
Modifier and Type Method Description abstract ij.ImageStack
applyTo(ij.ImageStack inputImage)
Applies this regional extrema algorithm on the 3D image given as argument, and returns the result as a binary image stack.abstract ij.ImageStack
applyTo(ij.ImageStack inputImage, ij.ImageStack maskImage)
Applies this regional extrema algorithm on the 3D image given as argument and using the given mask, and returns the result as a binary image stack.int
getConnectivity()
Returns the connectivity value.ExtremaType
getExtremaType()
Returns the type of extrema.boolean
isProgressVisible()
Returns the value of progress visibility option.void
setConnectivity(int conn)
Sets the connectivity value.void
setExtremaType(ExtremaType extremaType)
Sets the type of extrema.void
setProgressVisible(boolean progressVisible)
Sets the value of progress visibility option.Methods inherited from class inra.ijpb.algo.AlgoStub
addAlgoListener, removeAlgoListener
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
RegionalExtrema3DAlgo
public RegionalExtrema3DAlgo()Creates a new algorithm for computing regional extrema, that computes regional minima with connectivity 6. -
RegionalExtrema3DAlgo
Creates a new algorithm for computing regional extrema, by choosing type of minima and connectivity.- Parameters:
extremaType
- the type of extrema (minima or maxima)connectivity
- should be 6 or 26
-
-
Method Details
-
getExtremaType
Returns the type of extrema.- Returns:
- the type of extrema.
-
setExtremaType
Sets the type of extrema.- Parameters:
extremaType
- the type of extrema.
-
getConnectivity
public int getConnectivity()Returns the connectivity value.- Returns:
- the connectivity value.
-
setConnectivity
public void setConnectivity(int conn)Sets the connectivity value.- Parameters:
conn
- the connectivity value (either 6 or 26).
-
isProgressVisible
public boolean isProgressVisible()Returns the value of progress visibility option.- Returns:
- the value of progress visibility option.
-
setProgressVisible
public void setProgressVisible(boolean progressVisible)Sets the value of progress visibility option.- Parameters:
progressVisible
- the new value of progress visibility option.
-
applyTo
public abstract ij.ImageStack applyTo(ij.ImageStack inputImage)Applies this regional extrema algorithm on the 3D image given as argument, and returns the result as a binary image stack.- Parameters:
inputImage
- the 3D image to process- Returns:
- the result of regional extrema detection
-
applyTo
public abstract ij.ImageStack applyTo(ij.ImageStack inputImage, ij.ImageStack maskImage)Applies this regional extrema algorithm on the 3D image given as argument and using the given mask, and returns the result as a binary image stack.- Parameters:
inputImage
- the 3D image to processmaskImage
- a binary mask- Returns:
- the result of regional extrema detection
-