Package jhd.FloodFill
Class ExactEuclideanMap
java.lang.Object
jhd.FloodFill.ExactEuclideanMap
public class ExactEuclideanMap
extends java.lang.Object
Functions for computing the exact 2D and 3D Euclidean distance using Danielsson's algorithm.
 A port of my original C to Java. It's not pretty Java but it's fast and somewhat readable.
- 
Constructor Summary
Constructors Constructor Description ExactEuclideanMap()Default constructor - 
Method Summary
Modifier and Type Method Description voidedm2D(float[] image, int imageWidth, int imageHeight, float pixWidth, float pixHeight, java.lang.String floodChoice)In Place 2D exact Euclidean distance map of a 2D image using Danielsson's algorithmvoidedm2D(java.lang.Object oImage, int imageWidth, int imageHeight, float pixWidth, float pixHeight, java.lang.String floodChoice)In Place 2D exact Euclidean distance map of a 2D image using Danielsson's algorithmvoidedm3D(float[] image, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In place 3D Euclidean distance map of a 3D image using Danielsson's algorithmvoidedm3D(java.lang.Object[] oImageArr, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In Place 3D exact Euclidean distance of a 3D image using Danielsson's algorithmvoidedm3D(java.lang.Object oImage, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In place 3D Euclidean distance map of a 3D image using Danielsson's algorithmjava.lang.String[]getMapChoices()Used to make dialogs.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Constructor Details
- 
ExactEuclideanMap
public ExactEuclideanMap()Default constructor 
 - 
 - 
Method Details
- 
edm2D
public void edm2D(float[] image, int imageWidth, int imageHeight, float pixWidth, float pixHeight, java.lang.String floodChoice)In Place 2D exact Euclidean distance map of a 2D image using Danielsson's algorithm- Parameters:
 image- A row major 1D float array containing a 2D imageimageWidth- The image width in pixelsimageHeight- The height width in pixelspixWidth- The pixel width in user units, set to 1 for classic EDMpixHeight- The pixel height in user units, set to 1 for classic EDMfloodChoice- A string selecting the region to map; "Map 0" or "Map !0"
 - 
edm2D
public void edm2D(java.lang.Object oImage, int imageWidth, int imageHeight, float pixWidth, float pixHeight, java.lang.String floodChoice)In Place 2D exact Euclidean distance map of a 2D image using Danielsson's algorithm- Parameters:
 oImage- An Object (must be instanceof float[]) containing a row major 1D array of a 2D image as returned by ImageJ ImageProcessor ip.getPixels();imageWidth- The image width in pixelsimageHeight- The height width in pixelspixWidth- The pixel width in user units, set to 1 for classic EDMpixHeight- The pixel height in user units, set to 1 for classic EDMfloodChoice- A string selecting the region to map; "Map 0" or "Map !0"
 - 
edm3D
public void edm3D(float[] image, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In place 3D Euclidean distance map of a 3D image using Danielsson's algorithm- Parameters:
 image- A row major 1D float array containing a 3D imageimageWidth- The image width in pixelsimageHeight- The height width in pixelsimageDepth- The depth or number of slices in the 3D imagepixWidth- The pixel width in user units, set to 1 for classic EDMpixHeight- The pixel height in user units, set to 1 for classic EDMpixDepth- The pixel depth in user units, set to 1 for classic EDMfloodChoice- A string selecting the region to map; "Map 0" or "Map !0"showProgress- true = Display a progress bar during execution.
 - 
edm3D
public void edm3D(java.lang.Object oImage, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In place 3D Euclidean distance map of a 3D image using Danielsson's algorithm- Parameters:
 oImage- An object containing a 1D float array from a row major 3D imageimageWidth- The image width in pixelsimageHeight- The height width in pixelsimageDepth- The depth or number of slices in the 3D imagepixWidth- The pixel width in user units, set to 1 for classic EDMpixHeight- The pixel height in user units, set to 1 for classic EDMpixDepth- The pixel depth in user units, set to 1 for classic EDMfloodChoice- A string selecting the region to map; "Map 0" or "Map !0"showProgress- true = Display a progress bar during execution.
 - 
edm3D
public void edm3D(java.lang.Object[] oImageArr, int imageWidth, int imageHeight, int imageDepth, float pixWidth, float pixHeight, float pixDepth, java.lang.String floodChoice, boolean showProgress)In Place 3D exact Euclidean distance of a 3D image using Danielsson's algorithm- Parameters:
 oImageArr- An Object[] (must be float data) as returned by ImageJ ImagePlus imp.getStack().getImageArray();imageWidth- The image width in pixelsimageHeight- The height width in pixelsimageDepth- The depth or number of slices in the 3D imagepixWidth- The pixel width in user units, set to 1 for classic EDMpixHeight- The pixel height in user units, set to 1 for classic EDMpixDepth- The pixel depth in user units, set to 1 for classic EDMfloodChoice- A string selecting the region to map; "Map 0" or "Map !0"showProgress- true = Display a progress bar during execution.
 - 
getMapChoices
public java.lang.String[] getMapChoices()Used to make dialogs. User selects to map 0 or 255 in a binarized image- Returns:
 - A list of map choices: "Map 0","Map !0"
 
 
 -