Public Member Functions | |
void | run (short[] pixels, int width, int height) |
void | makeEDM (short[] pixels, int width, int height) |
void | findUltimatePoints (ImageProcessor ip) |
Package Functions | |
void | setValue (int offset, int rowsize, short[] image16) |
void | setEdgeValue (int offset, int rowsize, short[] image16, int x, int y, int xmax, int ymax) |
void | convertToBytes (int width, int height, short[] image16, byte[] image8) |
void | filterEDM (ImageProcessor edm, boolean smooth) |
int | get (int x, int y, byte[] pixels, int width, int height) |
void | makeCoordinateArrays (ImageProcessor edm) |
void | doWatershed (ImageProcessor ip1) |
int[] | makeFateTable () |
void | processLevel (int level, int pass, ImageProcessor ip1, ImageProcessor ip2, int[] table) |
void | postProcess (ImageProcessor ip) |
Package Attributes | |
ImagePlus | imp |
String | arg |
int | maxEDM |
short[] | xCoordinate |
short[] | yCoordinate |
int[] | levelStart |
int[] | levelOffset |
int[] | histogram |
int | slice |
int | count |
boolean | watershed |
ImageWindow | win |
boolean | canceled |
ImageStack | movie |
boolean | debug = IJ.debugMode |
boolean | invertImage |
Static Package Attributes | |
static boolean | whiteBackground = true |
This plugin implements the Euclidean Distance Map (EDM), Ultimate Eroded Points and Watershed commands in the Process/Binary submenu.
Definition at line 13 of file EDM.java.
void theba.core.math.EDM.convertToBytes | ( | int | width, | |
int | height, | |||
short[] | image16, | |||
byte[] | image8 | |||
) | [package] |
Definition at line 309 of file EDM.java.
References theba.core.math.EDM.maxEDM.
void theba.core.math.EDM.doWatershed | ( | ImageProcessor | ip1 | ) | [package] |
Definition at line 533 of file EDM.java.
References theba.core.math.EDM.canceled, theba.core.math.EDM.count, theba.core.math.EDM.debug, theba.core.math.EDM.makeFateTable(), theba.core.math.EDM.maxEDM, theba.core.math.EDM.movie, theba.core.math.EDM.postProcess(), theba.core.math.EDM.processLevel(), and theba.core.math.EDM.win.
void theba.core.math.EDM.filterEDM | ( | ImageProcessor | edm, | |
boolean | smooth | |||
) | [package] |
Definition at line 418 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints().
void theba.core.math.EDM.findUltimatePoints | ( | ImageProcessor | ip | ) |
Finds peaks in the EDM that contain pixels equal to or greater than all of their neighbors.
Definition at line 332 of file EDM.java.
References theba.core.math.EDM.count, theba.core.math.EDM.debug, theba.core.math.EDM.filterEDM(), theba.core.math.EDM.histogram, theba.core.math.EDM.levelStart, theba.core.math.EDM.makeCoordinateArrays(), theba.core.math.EDM.maxEDM, theba.core.math.EDM.movie, theba.core.math.EDM.watershed, theba.core.math.EDM.xCoordinate, and theba.core.math.EDM.yCoordinate.
int theba.core.math.EDM.get | ( | int | x, | |
int | y, | |||
byte[] | pixels, | |||
int | width, | |||
int | height | |||
) | [package] |
void theba.core.math.EDM.makeCoordinateArrays | ( | ImageProcessor | edm | ) | [package] |
Generates the xy coordinate arrays that allow pixels at each level to be accessed directly without searching through the entire image. This method, suggested by Stein Roervik (stein@kjemi.unit.no), greatly speeds up the watershed segmentation routine.
Definition at line 491 of file EDM.java.
References theba.core.math.EDM.histogram, theba.core.math.EDM.levelOffset, theba.core.math.EDM.levelStart, theba.core.math.EDM.maxEDM, theba.core.math.EDM.xCoordinate, and theba.core.math.EDM.yCoordinate.
Referenced by theba.core.math.EDM.findUltimatePoints().
void theba.core.math.EDM.makeEDM | ( | short[] | pixels, | |
int | width, | |||
int | height | |||
) |
Converts a binary image into a grayscale Euclidean Distance Map (EDM). Each foreground (black) pixel in the binary image is assigned a value equal to its distance from the nearest background (white) pixel. Uses the two-pass EDM algorithm from the "Image Processing Handbook" by John Russ.
Definition at line 59 of file EDM.java.
References theba.core.math.EDM.setEdgeValue(), and theba.core.math.EDM.setValue().
Referenced by theba.core.math.EDM.run().
int [] theba.core.math.EDM.makeFateTable | ( | ) | [package] |
Definition at line 564 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed().
void theba.core.math.EDM.postProcess | ( | ImageProcessor | ip | ) | [package] |
Definition at line 662 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed().
void theba.core.math.EDM.processLevel | ( | int | level, | |
int | pass, | |||
ImageProcessor | ip1, | |||
ImageProcessor | ip2, | |||
int[] | table | |||
) | [package] |
Definition at line 594 of file EDM.java.
References theba.core.math.EDM.count, theba.core.math.EDM.histogram, theba.core.math.EDM.levelStart, theba.core.math.EDM.xCoordinate, and theba.core.math.EDM.yCoordinate.
Referenced by theba.core.math.EDM.doWatershed().
void theba.core.math.EDM.run | ( | short[] | pixels, | |
int | width, | |||
int | height | |||
) |
Definition at line 47 of file EDM.java.
References theba.core.math.EDM.makeEDM().
void theba.core.math.EDM.setEdgeValue | ( | int | offset, | |
int | rowsize, | |||
short[] | image16, | |||
int | x, | |||
int | y, | |||
int | xmax, | |||
int | ymax | |||
) | [package] |
Definition at line 179 of file EDM.java.
Referenced by theba.core.math.EDM.makeEDM().
void theba.core.math.EDM.setValue | ( | int | offset, | |
int | rowsize, | |||
short[] | image16 | |||
) | [package] |
Definition at line 112 of file EDM.java.
Referenced by theba.core.math.EDM.makeEDM().
String theba.core.math.EDM.arg [package] |
boolean theba.core.math.EDM.canceled [package] |
Definition at line 37 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed().
int theba.core.math.EDM.count [package] |
Definition at line 31 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed(), theba.core.math.EDM.findUltimatePoints(), and theba.core.math.EDM.processLevel().
boolean theba.core.math.EDM.debug = IJ.debugMode [package] |
Definition at line 41 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed(), and theba.core.math.EDM.findUltimatePoints().
int [] theba.core.math.EDM.histogram [package] |
Definition at line 27 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints(), theba.core.math.EDM.makeCoordinateArrays(), and theba.core.math.EDM.processLevel().
ImagePlus theba.core.math.EDM.imp [package] |
boolean theba.core.math.EDM.invertImage [package] |
int [] theba.core.math.EDM.levelOffset [package] |
Definition at line 25 of file EDM.java.
Referenced by theba.core.math.EDM.makeCoordinateArrays().
int [] theba.core.math.EDM.levelStart [package] |
Definition at line 23 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints(), theba.core.math.EDM.makeCoordinateArrays(), and theba.core.math.EDM.processLevel().
int theba.core.math.EDM.maxEDM [package] |
Definition at line 19 of file EDM.java.
Referenced by theba.core.math.EDM.convertToBytes(), theba.core.math.EDM.doWatershed(), theba.core.math.EDM.findUltimatePoints(), and theba.core.math.EDM.makeCoordinateArrays().
ImageStack theba.core.math.EDM.movie [package] |
Definition at line 39 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed(), and theba.core.math.EDM.findUltimatePoints().
int theba.core.math.EDM.slice [package] |
boolean theba.core.math.EDM.watershed [package] |
Definition at line 33 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints().
boolean theba.core.math.EDM.whiteBackground = true [static, package] |
ImageWindow theba.core.math.EDM.win [package] |
Definition at line 35 of file EDM.java.
Referenced by theba.core.math.EDM.doWatershed().
short [] theba.core.math.EDM.xCoordinate [package] |
Definition at line 21 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints(), theba.core.math.EDM.makeCoordinateArrays(), and theba.core.math.EDM.processLevel().
short [] theba.core.math.EDM.yCoordinate [package] |
Definition at line 21 of file EDM.java.
Referenced by theba.core.math.EDM.findUltimatePoints(), theba.core.math.EDM.makeCoordinateArrays(), and theba.core.math.EDM.processLevel().