public class FindPeaks
extends java.lang.Object
implements ij.plugin.filter.PlugInFilter, ij.gui.DialogListener
Modifier and Type | Field and Description |
---|---|
static boolean |
doFiltering
Octave's findpeak function works in two parts: primary peak detection, and then filtering
according to various criteria to reject local maxima that do not satisfy the quality criteria
This variable indicates whether this filtering step should be done (true) or not (false)
|
protected ij.ImagePlus |
imp
Holds a reference to the primary ImagePlus object associated with this plugin
|
protected ij.process.ImageProcessor |
ip
image processor at the time of starting the analysis
|
static double |
maxW
Maximum width, in pixels, in the z-direction.
|
static double |
minD
Minimal distance, in pixels, in the z-direction.
|
static double |
minH
Minimum height, in intensity units, above the background level.
|
static double |
minW
Minimal width, in pixels, in the z-direction.
|
static double |
peak_fraction
Expected fraction of pixels above the threshold to be set and thus to be
eligible for being a peak
|
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, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
Constructor and Description |
---|
FindPeaks() |
Modifier and Type | Method and Description |
---|---|
boolean |
dialogItemChanged(ij.gui.GenericDialog gd,
java.awt.AWTEvent e)
Read the peak_fraction, minD, doFiltering, minW, maxW and minH parameters
from the dialog
|
boolean |
doDialog()
Displays the dialog with the various findPeaks options
|
int[] |
findPeaksInSection(int x,
int y)
Finds the indexes of the peaks in the z-Profile at a given xy position
|
int[] |
getStackSection(int x,
int y)
Get the pixel values along the z direction in a stack, at a horizontal location
specified by x and y
|
void |
run(ij.process.ImageProcessor theIp)
Displays the dialog for setting the custom options.
|
int |
setup(java.lang.String arg,
ij.ImagePlus imp)
Indicate that we need greyscale images and also
that the original image is not changed ( a new output image is generated instead)
|
protected ij.ImagePlus imp
protected ij.process.ImageProcessor ip
public static double peak_fraction
public static double minD
public static double minW
public static double maxW
public static double minH
public static boolean doFiltering
public boolean dialogItemChanged(ij.gui.GenericDialog gd, java.awt.AWTEvent e)
dialogItemChanged
in interface ij.gui.DialogListener
public int setup(java.lang.String arg, ij.ImagePlus imp)
setup
in interface ij.plugin.filter.PlugInFilter
public int[] getStackSection(int x, int y)
x
- x-position in pixel units, 0-based (ImageJ standard)y
- y-position in pixel units, 0-based (ImageJ standard)public void run(ij.process.ImageProcessor theIp)
run
in interface ij.plugin.filter.PlugInFilter
public int[] findPeaksInSection(int x, int y)
x
- x-position in pixel units, 0-based (ImageJ standard)y
- y-position in pixel units, 0-based (ImageJ standard)public boolean doDialog()