public class Batch_Analyser
extends java.lang.Object
implements ij.plugin.PlugIn
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AREA_HEAD |
static int |
AREAS |
static java.lang.String |
BOX_FRAC_HEAD |
static int |
BOX_FRACTAL_DIMENSION |
static java.lang.String |
BRANCH_HEAD |
static int |
CIRC |
static java.lang.String |
CIRC_HEAD |
static int |
CURVATURE |
static java.lang.String |
CURVE_HEAD |
static java.lang.String |
FOUR_FRAC_HEAD |
static int |
FOURIER_FRACTAL_DIMENSION |
static java.lang.String |
HGU_HEAD |
static int |
HYPHAL_GROWTH_UNIT |
static java.lang.String |
LAC_HEAD |
static int |
LACUNARITY |
static java.lang.String |
LENGTH_HEAD |
static int |
NUMBER_OF_BRANCHES |
static int |
NUMBER_OF_ENDPOINTS |
static java.lang.String |
TIP_HEAD |
java.lang.String |
title |
static java.lang.String |
TOT_AREA_HEAD |
static int |
TOTAL_HYPHAL_LENGTH |
Constructor and Description |
---|
Batch_Analyser() |
Modifier and Type | Method and Description |
---|---|
boolean |
analyseFiles(java.io.File directory,
java.io.File resultsDirectory)
Carries out processing on a batch of images stored in the location
specified by
directory . |
boolean |
analyseImage(ij.process.ByteProcessor objMask,
ij.process.ImageProcessor binProc,
ij.gui.PolygonRoi objRoi,
boolean excludeEdges,
ij.gui.Roi imageRoi) |
boolean |
analyseObject(int[] xPoints,
int[] yPoints,
int points,
ij.process.ImageProcessor binaryProc,
boolean excludeEdges,
ij.gui.Roi imageRoi)
The morphology of an object, the boundary of which is specified by the
points stored in xPoints and yPoints, within the image
represented by image, is analysed, subject to the thresholds
specified in initialise(String, double, double, double, double,
double).
|
ij.process.ImageProcessor |
ensureGreyValues(ij.process.ImageProcessor processor,
boolean inversion)
Ensures that an image has a non-inverted look-up table (LUT) and is
either inverted or non-inverted
|
ij.process.ByteProcessor |
getMaskImage() |
ij.gui.PolygonRoi |
getPolygonRoi(int nPoints,
int[] xPoints,
int[] yPoints)
Constructs a PolygonRoi object from a set of input coordinates.
|
void |
run(java.lang.String arg)
Implementation of
PlugIn 's run method. |
int |
searchImage(ij.process.ImageProcessor binaryProcessor,
boolean excludeEdges,
ij.gui.Roi roi)
Searches the image (represented by
currentImage ) for
objects, traces the outline of each object using Wand
.autoOutline() and sends each detected boundary to
analyseImage() for morphological analysis. |
void |
setOutputData(int outputData) |
boolean |
showGUI()
Displays a dialog to obtain input parameters from a user.
|
public java.lang.String title
public static final java.lang.String CIRC_HEAD
public static final java.lang.String AREA_HEAD
public static final java.lang.String TOT_AREA_HEAD
public static final java.lang.String FOUR_FRAC_HEAD
public static final java.lang.String BOX_FRAC_HEAD
public static final java.lang.String LAC_HEAD
public static final java.lang.String LENGTH_HEAD
public static final java.lang.String TIP_HEAD
public static final java.lang.String HGU_HEAD
public static final java.lang.String BRANCH_HEAD
public static final java.lang.String CURVE_HEAD
public static final int AREAS
public static final int CIRC
public static final int HYPHAL_GROWTH_UNIT
public static final int TOTAL_HYPHAL_LENGTH
public static final int NUMBER_OF_ENDPOINTS
public static final int NUMBER_OF_BRANCHES
public static final int FOURIER_FRACTAL_DIMENSION
public static final int BOX_FRACTAL_DIMENSION
public static final int LACUNARITY
public static final int CURVATURE
public void run(java.lang.String arg)
PlugIn
's run method.run
in interface ij.plugin.PlugIn
arg
- passed by ImageJ.public boolean analyseFiles(java.io.File directory, java.io.File resultsDirectory) throws java.io.IOException
directory
. Each image is converted to
greyscale, Background- subtracted, median filtered and then thresholded
to produce a binary image. Each image is then subjected to a close
operation and sent to analyseObjects()
.java.io.IOException
public boolean showGUI()
public int searchImage(ij.process.ImageProcessor binaryProcessor, boolean excludeEdges, ij.gui.Roi roi)
currentImage
) for
objects, traces the outline of each object using Wand
.autoOutline()
and sends each detected boundary to
analyseImage()
for morphological analysis.public ij.process.ImageProcessor ensureGreyValues(ij.process.ImageProcessor processor, boolean inversion)
processor
- the image to be processedinversion
- true if image is to be inverted, false otherwisepublic boolean analyseObject(int[] xPoints, int[] yPoints, int points, ij.process.ImageProcessor binaryProc, boolean excludeEdges, ij.gui.Roi imageRoi)
public boolean analyseImage(ij.process.ByteProcessor objMask, ij.process.ImageProcessor binProc, ij.gui.PolygonRoi objRoi, boolean excludeEdges, ij.gui.Roi imageRoi)
public ij.gui.PolygonRoi getPolygonRoi(int nPoints, int[] xPoints, int[] yPoints)
nPoints
- the total number of pointsxPoints
- the x-coordinatesyPoints
- the y-coordinatespublic void setOutputData(int outputData)
public ij.process.ByteProcessor getMaskImage()