Package inra.ijpb.plugins
Class InteractiveGeodesicDistanceMap
java.lang.Object
inra.ijpb.plugins.InteractiveGeodesicDistanceMap
- All Implemented Interfaces:
ij.gui.DialogListener
,ij.plugin.filter.ExtendedPlugInFilter
,ij.plugin.filter.PlugInFilter
public class InteractiveGeodesicDistanceMap
extends java.lang.Object
implements ij.plugin.filter.ExtendedPlugInFilter, ij.gui.DialogListener
Plugin for computing geodesic distance map from binary images using chamfer
weights. The difference with the regular GeodesicDistanceMapPlugin is that
the marker image is created on demand based on user-defined ROIs.
- Author:
- Ignacio Arganda-Carreras
-
Field Summary
Fields inherited from interface ij.plugin.filter.ExtendedPlugInFilter
KEEP_PREVIEW
Fields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
-
Constructor Summary
Constructors Constructor Description InteractiveGeodesicDistanceMap()
-
Method Summary
Modifier and Type Method Description boolean
dialogItemChanged(ij.gui.GenericDialog gd, java.awt.AWTEvent evt)
Called when a dialog widget has been modified: recomputes option values from dialog content.ij.process.ImageProcessor
process(ij.process.ImageProcessor mask, ij.gui.Roi roi, float[] weights, boolean normalize)
Deprecated.ij.process.ImageProcessor
process(ij.process.ImageProcessor mask, ij.gui.Roi roi, short[] weights, boolean normalize)
Deprecated.ij.process.ImageProcessor
process(ij.process.ImageProcessor mask, ij.gui.Roi roi, ChamferMask2D chamferMask, boolean floatProcess, boolean normalize)
Computes the distance propagated from the boundary of the white particles, within the white phase.void
run(ij.process.ImageProcessor image)
Apply the current filter settings to process the given image.void
setNPasses(int nPasses)
int
setup(java.lang.String arg, ij.ImagePlus imp)
Called at the beginning of the process to know if the plugin can be run with current image, and at the end to finalize.int
showDialog(ij.ImagePlus imp, java.lang.String command, ij.plugin.filter.PlugInFilterRunner pfr)
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
InteractiveGeodesicDistanceMap
public InteractiveGeodesicDistanceMap()
-
-
Method Details
-
setup
public int setup(java.lang.String arg, ij.ImagePlus imp)Called at the beginning of the process to know if the plugin can be run with current image, and at the end to finalize.- Specified by:
setup
in interfaceij.plugin.filter.PlugInFilter
-
showDialog
public int showDialog(ij.ImagePlus imp, java.lang.String command, ij.plugin.filter.PlugInFilterRunner pfr)- Specified by:
showDialog
in interfaceij.plugin.filter.ExtendedPlugInFilter
-
dialogItemChanged
public boolean dialogItemChanged(ij.gui.GenericDialog gd, java.awt.AWTEvent evt)Called when a dialog widget has been modified: recomputes option values from dialog content.- Specified by:
dialogItemChanged
in interfaceij.gui.DialogListener
-
setNPasses
public void setNPasses(int nPasses)- Specified by:
setNPasses
in interfaceij.plugin.filter.ExtendedPlugInFilter
-
run
public void run(ij.process.ImageProcessor image)Apply the current filter settings to process the given image.- Specified by:
run
in interfaceij.plugin.filter.PlugInFilter
-
process
public ij.process.ImageProcessor process(ij.process.ImageProcessor mask, ij.gui.Roi roi, ChamferMask2D chamferMask, boolean floatProcess, boolean normalize)Computes the distance propagated from the boundary of the white particles, within the white phase.- Parameters:
mask
- the binary mask image that will constrain the propagationroi
- the roi to define the marker imagechamferMask
- the chamfer mask used for computing distancesfloatProcess
- specifies whether algorithm should use floating-point or integer computationnormalize
- specifies whether the resulting distance map should be normalized- Returns:
- geodesic distance map image
-
process
@Deprecated public ij.process.ImageProcessor process(ij.process.ImageProcessor mask, ij.gui.Roi roi, float[] weights, boolean normalize)Deprecated.Computes the distance propagated from the boundary of the white particles, within the white phase.- Parameters:
mask
- the binary mask image that will constrain the propagationroi
- the roi to define the marker imageweights
- the set of chamfer weights for computing distancesnormalize
- specifies whether the resulting distance map should be normalized- Returns:
- geodesic distance map image
-
process
@Deprecated public ij.process.ImageProcessor process(ij.process.ImageProcessor mask, ij.gui.Roi roi, short[] weights, boolean normalize)Deprecated.Computes the distance propagated from the boundary of the white particles, within the white phase.- Parameters:
mask
- the binary mask image that will constrain the propagationroi
- the roi to define the marker imageweights
- the set of chamfer weights for computing distancesnormalize
- specifies whether the resulting distance map should be normalized- Returns:
- geodesic distance map image
-