|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.beans.masks.results.ParticleAnalyzer2
public class ParticleAnalyzer2
Implements ImageJ's Analyze Particles command.
for each line do for each pixel in this line do if the pixel value is "inside" the threshold range then trace the edge to mark the object do the measurement fill the object with a color outside the threshold range else continue the scan
Field Summary | |
---|---|
static int |
ADD_TO_MANAGER
Add particles to ROI Manager. |
protected boolean |
addToManager
|
protected Analyzer2 |
analyzer
|
(package private) static int |
BYTE
|
static int |
CLEAR_WORKSHEET
Clear ImageJ console before starting. |
(package private) int |
counter
|
(package private) static double |
DEFAULT_MAX_SIZE
|
(package private) static double |
DEFAULT_MIN_SIZE
|
static int |
DISPLAY_SUMMARY
Display a summary. |
protected boolean |
displaySummary
|
protected static int |
ELLIPSES
|
static int |
EXCLUDE_EDGE_PARTICLES
Do not measure particles touching edge of image. |
protected boolean |
excludeEdgeParticles
|
(package private) static int |
FLOAT
|
protected boolean |
floodFill
|
static int |
FOUR_CONNECTED
Use 4-connected particle tracing. |
protected ij.ImagePlus |
imp
|
static int |
INCLUDE_HOLES
Flood fill to ignore interior holes. |
protected static int |
MASKS
|
protected static int |
NOTHING
|
(package private) static java.lang.String |
OPTIONS
|
protected static int |
OUTLINES
|
protected boolean |
processStack
|
static int |
RECORD_STARTS
Record starting coordinates so outline can be recreated later using doWand(x,y). |
protected boolean |
recordStarts
|
protected boolean |
resetCounter
|
(package private) static int |
RGB
|
protected static int |
ROI_MASKS
|
protected ij.measure.ResultsTable |
rt
|
(package private) static int |
SHORT
|
static int |
SHOW_MASKS
Display image containing binary masks of measured particles. |
static int |
SHOW_NONE
Do not display particle outline image. |
static int |
SHOW_OUTLINES
Display image containing outlines of measured particles. |
static int |
SHOW_PROGRESS
Display a progress bar. |
static int |
SHOW_RESULTS
Display results in the ImageJ console. |
static int |
SHOW_ROI_MASKS
Display image containing grayscales masks that identify measured particles. |
static int |
SHOW_SUMMARY
Obsolete |
protected static int |
showChoice
|
protected boolean |
showProgress
|
protected boolean |
showResults
|
protected boolean |
showSizeDistribution
|
protected int |
slice
|
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, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING |
Fields inherited from interface ij.measure.Measurements |
---|
AREA, AREA_FRACTION, CENTER_OF_MASS, CENTROID, CIRCULARITY, ELLIPSE, FERET, INTEGRATED_DENSITY, INVERT_Y, KURTOSIS, LABELS, LIMIT, MAX_STANDARDS, MEAN, MEDIAN, MIN_MAX, MODE, PERIMETER, RECT, SCIENTIFIC_NOTATION, SHAPE_DESCRIPTORS, SKEWNESS, SLICE, STACK_POSITION, STD_DEV |
Constructor Summary | |
---|---|
ParticleAnalyzer2()
Default constructor |
|
ParticleAnalyzer2(int options,
int measurements,
ij.measure.ResultsTable rt,
double minSize,
double maxSize)
Constructs a ParticleAnalyzer using the default min and max circularity values (0 and 1). |
|
ParticleAnalyzer2(int options,
int measurements,
ij.measure.ResultsTable rt,
double minSize,
double maxSize,
double minCirc,
double maxCirc)
Constructs a ParticleAnalyzer. |
Method Summary | |
---|---|
(package private) java.lang.String |
addMeans(java.lang.String line,
int start)
|
boolean |
analyze(ij.ImagePlus imp)
Performs particle analysis on the specified image. |
boolean |
analyze(ij.ImagePlus imp,
ij.process.ImageProcessor ip)
Performs particle analysis on the specified ImagePlus and ImageProcessor. |
(package private) void |
analyzeParticle(int x,
int y,
ij.ImagePlus imp,
ij.process.ImageProcessor ip)
|
(package private) void |
drawEllipse(ij.process.ImageProcessor ip,
ij.process.ImageStatistics stats,
int count)
|
(package private) void |
drawFilledParticle(ij.process.ImageProcessor ip,
ij.gui.Roi roi,
ij.process.ImageProcessor mask)
|
(package private) void |
drawOutline(ij.process.ImageProcessor ip,
ij.gui.Roi roi,
int count)
|
protected void |
drawParticle(ij.process.ImageProcessor drawIP,
ij.gui.Roi roi,
ij.process.ImageStatistics stats,
ij.process.ImageProcessor mask)
Draws a selected particle in a separate image. |
(package private) void |
drawRoiFilledParticle(ij.process.ImageProcessor ip,
ij.gui.Roi roi,
ij.process.ImageProcessor mask,
int count)
|
(package private) boolean |
eraseOutsideRoi(ij.process.ImageProcessor ip,
java.awt.Rectangle r,
ij.process.ImageProcessor mask)
|
(package private) int |
getColumnID(java.lang.String name)
|
ij.ImagePlus |
getOutputImage()
Returns the "Outlines", "Masks", "Elipses" or "Count Masks" image, or null if "Nothing" is selected in the "Show:" menu. |
(package private) ij.process.ImageStatistics |
getStatistics(ij.process.ImageProcessor ip,
int mOptions,
ij.measure.Calibration cal)
|
(package private) void |
makeCustomLut()
|
(package private) java.lang.String |
n(double n)
|
void |
run(ij.process.ImageProcessor ip)
|
static void |
savePreferences(java.util.Properties prefs)
Called once when ImageJ quits. |
protected void |
saveResults(ij.process.ImageStatistics stats,
ij.gui.Roi roi)
Saves statistics for one particle in a results table. |
void |
setHideOutputImage(boolean hideOutputImage)
Set 'hideOutputImage' true to not display the "Show:" image. |
(package private) boolean |
setThresholdLevels(ij.ImagePlus imp,
ij.process.ImageProcessor ip)
|
int |
setup(java.lang.String arg,
ij.ImagePlus imp)
|
boolean |
showDialog()
Displays a modal options dialog. |
(package private) void |
showResults()
|
(package private) boolean |
updateMacroOptions()
|
(package private) void |
updateSliceSummary()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SHOW_RESULTS
public static final int SHOW_SUMMARY
public static final int SHOW_OUTLINES
public static final int EXCLUDE_EDGE_PARTICLES
public static final int SHOW_ROI_MASKS
public static final int SHOW_PROGRESS
public static final int CLEAR_WORKSHEET
public static final int RECORD_STARTS
public static final int DISPLAY_SUMMARY
public static final int SHOW_NONE
public static final int INCLUDE_HOLES
public static final int ADD_TO_MANAGER
public static final int SHOW_MASKS
public static final int FOUR_CONNECTED
static final java.lang.String OPTIONS
static final int BYTE
static final int SHORT
static final int FLOAT
static final int RGB
static final double DEFAULT_MIN_SIZE
static final double DEFAULT_MAX_SIZE
protected static final int NOTHING
protected static final int OUTLINES
protected static final int MASKS
protected static final int ELLIPSES
protected static final int ROI_MASKS
protected static int showChoice
protected ij.ImagePlus imp
protected ij.measure.ResultsTable rt
protected Analyzer2 analyzer
protected int slice
protected boolean processStack
protected boolean showResults
protected boolean excludeEdgeParticles
protected boolean showSizeDistribution
protected boolean resetCounter
protected boolean showProgress
protected boolean recordStarts
protected boolean displaySummary
protected boolean floodFill
protected boolean addToManager
int counter
Constructor Detail |
---|
public ParticleAnalyzer2(int options, int measurements, ij.measure.ResultsTable rt, double minSize, double maxSize, double minCirc, double maxCirc)
options
- a flag word created by Oring SHOW_RESULTS, EXCLUDE_EDGE_PARTICLES, etc.measurements
- a flag word created by ORing constants defined in the Measurements interfacert
- a ResultsTable where the measurements will be storedminSize
- the smallest particle size in pixelsmaxSize
- the largest particle size in pixelsminCirc
- minimum circularitymaxCirc
- maximum circularitypublic ParticleAnalyzer2(int options, int measurements, ij.measure.ResultsTable rt, double minSize, double maxSize)
public ParticleAnalyzer2()
Method Detail |
---|
public int setup(java.lang.String arg, ij.ImagePlus imp)
setup
in interface ij.plugin.filter.PlugInFilter
public void run(ij.process.ImageProcessor ip)
run
in interface ij.plugin.filter.PlugInFilter
public boolean showDialog()
boolean updateMacroOptions()
public boolean analyze(ij.ImagePlus imp)
public boolean analyze(ij.ImagePlus imp, ij.process.ImageProcessor ip)
void updateSliceSummary()
java.lang.String addMeans(java.lang.String line, int start)
java.lang.String n(double n)
boolean eraseOutsideRoi(ij.process.ImageProcessor ip, java.awt.Rectangle r, ij.process.ImageProcessor mask)
boolean setThresholdLevels(ij.ImagePlus imp, ij.process.ImageProcessor ip)
void analyzeParticle(int x, int y, ij.ImagePlus imp, ij.process.ImageProcessor ip)
ij.process.ImageStatistics getStatistics(ij.process.ImageProcessor ip, int mOptions, ij.measure.Calibration cal)
protected void saveResults(ij.process.ImageStatistics stats, ij.gui.Roi roi)
protected void drawParticle(ij.process.ImageProcessor drawIP, ij.gui.Roi roi, ij.process.ImageStatistics stats, ij.process.ImageProcessor mask)
void drawFilledParticle(ij.process.ImageProcessor ip, ij.gui.Roi roi, ij.process.ImageProcessor mask)
void drawOutline(ij.process.ImageProcessor ip, ij.gui.Roi roi, int count)
void drawEllipse(ij.process.ImageProcessor ip, ij.process.ImageStatistics stats, int count)
void drawRoiFilledParticle(ij.process.ImageProcessor ip, ij.gui.Roi roi, ij.process.ImageProcessor mask, int count)
void showResults()
public ij.ImagePlus getOutputImage()
public void setHideOutputImage(boolean hideOutputImage)
int getColumnID(java.lang.String name)
void makeCustomLut()
public static void savePreferences(java.util.Properties prefs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |