Package gov.nih.mipav.model.algorithms
Class AlgorithmGrayScaleMorphology2D
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.AlgorithmGrayScaleMorphology2D
-
- All Implemented Interfaces:
java.awt.event.ActionListener,java.awt.event.WindowListener,java.lang.Runnable,java.util.EventListener
public class AlgorithmGrayScaleMorphology2D extends AlgorithmBase
Two-Dimensional mathematical morphology class applied to Gray scale images. Kernels of 3x3 (4 or 8 connected) and 5x5 (12 connected) are available or user defined kernels can be supplied.- Version:
- 1.0 March 15, 1998
- Author:
- Matthew J. McAuliffe, Ph.D.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classAlgorithmGrayScaleMorphology2D.intObjectSimple class to temporarily store the object's size, ID and seed index value.
-
Field Summary
Fields Modifier and Type Field Description private intalgorithmalgorithm type (i.e. erode, dilate)static intBG_DISTANCE_MAPDOCUMENT ME!static intBOTTOM_HATprivate floatcircleDiameterkernel diameter.private floatcircleDiameterErodeErosion kernel diameter.static intCLOSEDOCUMENT ME!static intCLOSING_BY_RECONSTRUCTIONstatic intCONNECTED12DOCUMENT ME!static intCONNECTED4DOCUMENT ME!static intCONNECTED8DOCUMENT ME!static intDELETE_OBJECTSDOCUMENT ME!static intDILATEDOCUMENT ME!static intDISTANCE_MAPDOCUMENT ME!static intDISTANCE_MAP_FOR_SHAPE_INTERPOLATIONDOCUMENT ME!private intedgingTypeEdge type.private booleanentireImageif true, indicates that the VOIs should NOT be used and that entire image should be processed.static intERODEDOCUMENT ME!static intFILL_HOLESDOCUMENT ME!static intFIND_EDGESDOCUMENT ME!static intGEODESIC_DILATIONstatic intGEODESIC_EROSIONprivate intgeodesicSizeSize of geodesic erosions and dilationsstatic intID_OBJECTSDOCUMENT ME!private double[]imgBufferimgBuffer that hold pixel value for the 2D slice.private double[]imgBuffer2static intINNER_EDGINGDOCUMENT ME!private intiterationsDDilation iteration times.private intiterationsEErosion iteration times.private intiterationsOpenprivate intkDimKernel dimension.private java.util.BitSetkernelKernel for both erosion and dilation.private intkernelTypekernel size (i.e. connectedness)private intkernelTypeErodeErosion kernel type.private double[]maskBufferprivate ModelImagemaskImageUsed in geodesic dilation, geodesic erosion, morphological reconstruction by dilation, and morphological reconstruction by erosion Not used in opening by reconstruction and closing by reconstructionprivate intmaxmaximum, minimum size of objects.private intminmaximum, minimum size of objects.static intMORPHOLOGICAL_GRADIENTstatic intMORPHOLOGICAL_LAPLACIANstatic intMORPHOLOGICAL_RECONSTRUCTION_BY_DILATIONstatic intMORPHOLOGICAL_RECONSTRUCTION_BY_EROSIONprivate intnumPruningPixelsNumber pixels to prune.private java.util.Vector<AlgorithmGrayScaleMorphology2D.intObject>objectsVector that holding the current available objects in the 2D image.static intOPENDOCUMENT ME!static intOPENING_BY_RECONSTRUCTIONstatic intOUTER_EDGINGDOCUMENT ME!static intPARTICLE_ANALYSISDOCUMENT ME!static intPARTICLE_ANALYSIS_NEWDOCUMENT ME!private floatpixDistprivate double[]processBufferintermediate processing buffer, same size with imgBuffer.private booleanshowFrameFlag to show frame during each algorithm method call.static intSIZED_CIRCLEDOCUMENT ME!static intSKELETONIZEDOCUMENT ME!static intTOP_HATprivate java.awt.Point[]ultErodeObjectsDOCUMENT ME!static intULTIMATE_ERODEDOCUMENT ME!-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description AlgorithmGrayScaleMorphology2D(ModelImage srcImg, int kernelType, float circleDiameter, int kernelTypeErode, float circleDiameterErode, int method, int iterOpen, int iterE, int pruningPix, int edType, boolean entireImage, boolean _showFrame)Creates a new AlgorithmGrayScaleMorphology2D object.AlgorithmGrayScaleMorphology2D(ModelImage srcImg, int kernelType, float circleDiameter, int method, int iterD, int iterE, int pruningPix, int edType, boolean entireImage)Creates a new AlgorithmMorphology2D object.AlgorithmGrayScaleMorphology2D(ModelImage srcImg, ModelImage maskImage, int kernelType, float circleDiameter, int method, int geodesicSize, int iterD, int iterE, boolean entireImage, boolean _showFrame)Creates a new AlgorithmGrayScaleMorphology2D object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voiddilate(boolean returnFlag, int iters)Dilates an image using the indicated kernel and the indicated number of executions.private voiderode(boolean returnFlag, int iters)Erodes an image using the indicated kernel and the indicated number of executions.voidfinalize()Prepares this class for destruction.private intfloodFill(short[] idBuffer, int stIndex, short floodValue, short objValue)2D flood fill that forms a short mask.static java.awt.PolygongenContour(int xDimE, int yDimE, java.awt.Point startPt, java.util.BitSet maskA)Static method that generates a boundary of a general object.static java.awt.PolygongenContour(short[] image, int xDim, int yDim, java.awt.Point startPt, short objectValue)Static method that generates a boundary of a general object.static java.awt.PolygongenContour(ModelImage image, int xDim, int yDim, java.awt.Point startPt)Static method that generates a boundary of a binary object.static java.awt.PolygongenContour(java.util.BitSet image, int xDim, int yDim, java.awt.Point startPt)Static method that generates a boundary of a binary object.private voidgeodesicDilation(boolean returnFlag, int geodesicSize)geodesic dilation of a boolean, unsigned byte or unsigned short image using the indicated kernel and the indicated number of executions.private voidgeodesicErosion(boolean returnFlag, int geodesicSize)geodesic erosion of a boolean, unsigned byte or unsigned short image using the indicated kernel and the indicated number of executions.private booleanisEndpoint(int pix, short[] tmpBuffer)This method returns whether or not pix is the index of an endpoint in tmpBuffer (it is assumed that location pix is not the intensity of the background in tmpBuffer).private booleanisNeighbor(int index, int pixNeighbor)Check the neighbor pix.private booleanisSinglePoint(int index, short[] tmpBuffer)Check if the given pix is a single point or not.private voidmakeCircularKernel(float circDiameter)Generates a cicular kernel of a specific diameter.private voidmakeKernel(int kernelType)Generates a kernel of the indicated type.private booleanonePixel(short[] buffer, int index, int xDim)Used by ultimate erode to simplify code a little.voidrunAlgorithm()Starts the program.voidsetAlgorithm(int method)Sets the algorithm type (i.e. erode, dilate)voidsetImage(ModelImage img)Sets the algorithm to new image of boolean type.voidsetIterations(int itersD, int itersE)Sets number of iterations for closing or opening.voidsetKernel(java.util.BitSet kernel, int dim)Sets user defined square kernels.voidsetMinMax(int _min, int _max)Sets bounds of object size used to delete objects.voidsetPixDistance(float dist)Used in the ultimate erode function to remove all eroded points less than the distance specified in pixel units.voidsetShowFrame(boolean showFrame)DOCUMENT ME!voidshowKernel()display kernel as 1 or 0 in the debug window.-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
ERODE
public static final int ERODE
DOCUMENT ME!- See Also:
- Constant Field Values
-
DILATE
public static final int DILATE
DOCUMENT ME!- See Also:
- Constant Field Values
-
CLOSE
public static final int CLOSE
DOCUMENT ME!- See Also:
- Constant Field Values
-
OPEN
public static final int OPEN
DOCUMENT ME!- See Also:
- Constant Field Values
-
ID_OBJECTS
public static final int ID_OBJECTS
DOCUMENT ME!- See Also:
- Constant Field Values
-
DELETE_OBJECTS
public static final int DELETE_OBJECTS
DOCUMENT ME!- See Also:
- Constant Field Values
-
DISTANCE_MAP
public static final int DISTANCE_MAP
DOCUMENT ME!- See Also:
- Constant Field Values
-
BG_DISTANCE_MAP
public static final int BG_DISTANCE_MAP
DOCUMENT ME!- See Also:
- Constant Field Values
-
ULTIMATE_ERODE
public static final int ULTIMATE_ERODE
DOCUMENT ME!- See Also:
- Constant Field Values
-
PARTICLE_ANALYSIS
public static final int PARTICLE_ANALYSIS
DOCUMENT ME!- See Also:
- Constant Field Values
-
SKELETONIZE
public static final int SKELETONIZE
DOCUMENT ME!- See Also:
- Constant Field Values
-
FIND_EDGES
public static final int FIND_EDGES
DOCUMENT ME!- See Also:
- Constant Field Values
-
PARTICLE_ANALYSIS_NEW
public static final int PARTICLE_ANALYSIS_NEW
DOCUMENT ME!- See Also:
- Constant Field Values
-
FILL_HOLES
public static final int FILL_HOLES
DOCUMENT ME!- See Also:
- Constant Field Values
-
DISTANCE_MAP_FOR_SHAPE_INTERPOLATION
public static final int DISTANCE_MAP_FOR_SHAPE_INTERPOLATION
DOCUMENT ME!- See Also:
- Constant Field Values
-
MORPHOLOGICAL_GRADIENT
public static final int MORPHOLOGICAL_GRADIENT
- See Also:
- Constant Field Values
-
TOP_HAT
public static final int TOP_HAT
- See Also:
- Constant Field Values
-
BOTTOM_HAT
public static final int BOTTOM_HAT
- See Also:
- Constant Field Values
-
MORPHOLOGICAL_LAPLACIAN
public static final int MORPHOLOGICAL_LAPLACIAN
- See Also:
- Constant Field Values
-
GEODESIC_DILATION
public static final int GEODESIC_DILATION
- See Also:
- Constant Field Values
-
GEODESIC_EROSION
public static final int GEODESIC_EROSION
- See Also:
- Constant Field Values
-
MORPHOLOGICAL_RECONSTRUCTION_BY_DILATION
public static final int MORPHOLOGICAL_RECONSTRUCTION_BY_DILATION
- See Also:
- Constant Field Values
-
MORPHOLOGICAL_RECONSTRUCTION_BY_EROSION
public static final int MORPHOLOGICAL_RECONSTRUCTION_BY_EROSION
- See Also:
- Constant Field Values
-
OPENING_BY_RECONSTRUCTION
public static final int OPENING_BY_RECONSTRUCTION
- See Also:
- Constant Field Values
-
CLOSING_BY_RECONSTRUCTION
public static final int CLOSING_BY_RECONSTRUCTION
- See Also:
- Constant Field Values
-
SIZED_CIRCLE
public static final int SIZED_CIRCLE
DOCUMENT ME!- See Also:
- Constant Field Values
-
CONNECTED4
public static final int CONNECTED4
DOCUMENT ME!- See Also:
- Constant Field Values
-
CONNECTED8
public static final int CONNECTED8
DOCUMENT ME!- See Also:
- Constant Field Values
-
CONNECTED12
public static final int CONNECTED12
DOCUMENT ME!- See Also:
- Constant Field Values
-
OUTER_EDGING
public static final int OUTER_EDGING
DOCUMENT ME!- See Also:
- Constant Field Values
-
INNER_EDGING
public static final int INNER_EDGING
DOCUMENT ME!- See Also:
- Constant Field Values
-
algorithm
private int algorithm
algorithm type (i.e. erode, dilate)
-
circleDiameter
private float circleDiameter
kernel diameter.
-
circleDiameterErode
private float circleDiameterErode
Erosion kernel diameter.
-
edgingType
private int edgingType
Edge type.
-
entireImage
private boolean entireImage
if true, indicates that the VOIs should NOT be used and that entire image should be processed.
-
imgBuffer
private double[] imgBuffer
imgBuffer that hold pixel value for the 2D slice.
-
imgBuffer2
private double[] imgBuffer2
-
maskBuffer
private double[] maskBuffer
-
iterationsD
private int iterationsD
Dilation iteration times.
-
iterationsE
private int iterationsE
Erosion iteration times.
-
iterationsOpen
private int iterationsOpen
-
kDim
private int kDim
Kernel dimension.
-
kernel
private java.util.BitSet kernel
Kernel for both erosion and dilation.
-
kernelType
private int kernelType
kernel size (i.e. connectedness)
-
kernelTypeErode
private int kernelTypeErode
Erosion kernel type.
-
min
private int min
maximum, minimum size of objects.
-
max
private int max
maximum, minimum size of objects.
-
numPruningPixels
private int numPruningPixels
Number pixels to prune.
-
objects
private java.util.Vector<AlgorithmGrayScaleMorphology2D.intObject> objects
Vector that holding the current available objects in the 2D image.
-
pixDist
private float pixDist
-
processBuffer
private double[] processBuffer
intermediate processing buffer, same size with imgBuffer.
-
showFrame
private boolean showFrame
Flag to show frame during each algorithm method call.
-
ultErodeObjects
private java.awt.Point[] ultErodeObjects
DOCUMENT ME!
-
maskImage
private ModelImage maskImage
Used in geodesic dilation, geodesic erosion, morphological reconstruction by dilation, and morphological reconstruction by erosion Not used in opening by reconstruction and closing by reconstruction
-
geodesicSize
private int geodesicSize
Size of geodesic erosions and dilations
-
-
Constructor Detail
-
AlgorithmGrayScaleMorphology2D
public AlgorithmGrayScaleMorphology2D(ModelImage srcImg, int kernelType, float circleDiameter, int method, int iterD, int iterE, int pruningPix, int edType, boolean entireImage)
Creates a new AlgorithmMorphology2D object.- Parameters:
srcImg- source image modelkernelType- kernel size (i.e. connectedness)circleDiameter- only valid if kernelType == SIZED_CIRCLE and represents the width of a circle in the resolution of the imagemethod- setup the algorithm method (i.e. erode, dilate)iterD- number of times to dilateiterE- number of times to erodepruningPix- the number of pixels to pruneedType- the type of edging to perform (inner or outer)entireImage- if true, indicates that the VOIs should NOT be used and that entire image should be processed
-
AlgorithmGrayScaleMorphology2D
public AlgorithmGrayScaleMorphology2D(ModelImage srcImg, int kernelType, float circleDiameter, int kernelTypeErode, float circleDiameterErode, int method, int iterOpen, int iterE, int pruningPix, int edType, boolean entireImage, boolean _showFrame)
Creates a new AlgorithmGrayScaleMorphology2D object.- Parameters:
srcImg- source image modelkernelType- dilation kernel size (i.e. connectedness)circleDiameter- dilation only valid if kernelType == SIZED_CIRCLE and represents the width of a circle in the resolution of the imagekernelTypeErode- kernel size (i.e. connectedness) of erosioncircleDiameterErode- Erosion only valid if kernelType == SIZED_CIRCLE and represents the width of a circle in the resolution of the imagemethod- setup the algorithm method (i.e. erode, dilate)iterOpen- number of times to dilateiterE- number of times to erodepruningPix- the number of pixels to pruneedType- the type of edging to perform (inner or outer)entireImage- if true, indicates that the VOIs should NOT be used and that entire image should be processed_showFrame- if true, indicates that show image frame after each algorithm be processed
-
AlgorithmGrayScaleMorphology2D
public AlgorithmGrayScaleMorphology2D(ModelImage srcImg, ModelImage maskImage, int kernelType, float circleDiameter, int method, int geodesicSize, int iterD, int iterE, boolean entireImage, boolean _showFrame)
Creates a new AlgorithmGrayScaleMorphology2D object.- Parameters:
srcImg- source image modelkernelType- dilation kernel size (i.e. connectedness)circleDiameter- dilation only valid if kernelType == SIZED_CIRCLE and represents the width of a circle in the resolution of the imagemethod- setup the algorithm method (i.e. erode, dilate)geodesicSize-iterD- number of times to dilateiterE- number of times to erodeentireImage- if true, indicates that the VOIs should NOT be used and that entire image should be processed_showFrame- if true, indicates that show image frame after each algorithm be processed
-
-
Method Detail
-
genContour
public static final java.awt.Polygon genContour(java.util.BitSet image, int xDim, int yDim, java.awt.Point startPt)Static method that generates a boundary of a binary object. (aka. turtle algorithm: if 1 turn left, step if 0 turn right, step)- Parameters:
image- input image where binary object is located.xDim- the x dimension of the imageyDim- the y dimension of the imagestartPt- starting point- Returns:
- returns boundary of the object as Polygon
-
genContour
public static final java.awt.Polygon genContour(ModelImage image, int xDim, int yDim, java.awt.Point startPt)
Static method that generates a boundary of a binary object. (aka. turtle algorithm: if 1 turn left, step if 0 turn right, step)- Parameters:
image- input image (Boolean) where binary object is located.xDim- the x dimension of the imageyDim- the y dimension of the imagestartPt- starting point- Returns:
- returns boundary of the object as Polygon
-
genContour
public static final java.awt.Polygon genContour(int xDimE, int yDimE, java.awt.Point startPt, java.util.BitSet maskA)Static method that generates a boundary of a general object. (aka. turtle algorithm: if 1 turn left, step if 0 turn right, step)- Parameters:
xDimE- the x dimension of the imageyDimE- the y dimension of the imagestartPt- starting pointmaskA- mask of the object- Returns:
- returns boundary of the object as Polygon
-
genContour
public static final java.awt.Polygon genContour(short[] image, int xDim, int yDim, java.awt.Point startPt, short objectValue)Static method that generates a boundary of a general object. (aka. turtle algorithm: if 1 turn left, step if 0 turn right, step)- Parameters:
image- input image where <> object is located. xDim- the x dimension of the imageyDim- the y dimension of the imagestartPt- starting pointobjectValue- value of the object- Returns:
- returns boundary of the object as Polygon
-
finalize
public void finalize()
Prepares this class for destruction.- Overrides:
finalizein classAlgorithmBase
-
runAlgorithm
public void runAlgorithm()
Starts the program.- Specified by:
runAlgorithmin classAlgorithmBase
-
setAlgorithm
public void setAlgorithm(int method)
Sets the algorithm type (i.e. erode, dilate)- Parameters:
method- algorithm type
-
setImage
public void setImage(ModelImage img)
Sets the algorithm to new image of boolean type.- Parameters:
img- image model of boolean type
-
setIterations
public void setIterations(int itersD, int itersE)Sets number of iterations for closing or opening.- Parameters:
itersD- number of dilationsitersE- number of erosions
-
setKernel
public void setKernel(java.util.BitSet kernel, int dim)Sets user defined square kernels.- Parameters:
kernel- user defined kerneldim- length of one dimension (kernel should be square)
-
setMinMax
public void setMinMax(int _min, int _max)Sets bounds of object size used to delete objects.- Parameters:
_min- minimum size of objects_max- maximum size of objects
-
setPixDistance
public void setPixDistance(float dist)
Used in the ultimate erode function to remove all eroded points less than the distance specified in pixel units.- Parameters:
dist- distance in pixels. Default = 0 (i.e. do not remove any points)
-
setShowFrame
public void setShowFrame(boolean showFrame)
DOCUMENT ME!- Parameters:
showFrame- DOCUMENT ME!
-
showKernel
public void showKernel()
display kernel as 1 or 0 in the debug window.
-
dilate
private void dilate(boolean returnFlag, int iters)Dilates an image using the indicated kernel and the indicated number of executions. The grayscale dilation is the maximum value over the reflected kernel region. For symmetric kernels the reflected kernel is the same as the kernel.- Parameters:
returnFlag- if true then this operation is a step in the morph process (i.e. close)iters- number of dilations
-
geodesicDilation
private void geodesicDilation(boolean returnFlag, int geodesicSize)geodesic dilation of a boolean, unsigned byte or unsigned short image using the indicated kernel and the indicated number of executions.- Parameters:
returnFlag- if true then this operation is a step in the morph process (i.e. close)geodesicSize-
-
geodesicErosion
private void geodesicErosion(boolean returnFlag, int geodesicSize)geodesic erosion of a boolean, unsigned byte or unsigned short image using the indicated kernel and the indicated number of executions.- Parameters:
returnFlag- if true then this operation is a step in the morph process (i.e. close)geodesicSize-
-
erode
private void erode(boolean returnFlag, int iters)Erodes an image using the indicated kernel and the indicated number of executions. The grayscale erosion is the minimum value over the kernel region.- Parameters:
returnFlag- if true then this operation is a step in the morph process (i.e. open)iters- number of erosion iterations.
-
floodFill
private int floodFill(short[] idBuffer, int stIndex, short floodValue, short objValue)2D flood fill that forms a short mask.- Parameters:
idBuffer- buffer used to hold flood valuestIndex- the starting index of the seed pointfloodValue- the value to flood the region withobjValue- object ID value that idenditifies the flood region.- Returns:
- DOCUMENT ME!
-
isEndpoint
private boolean isEndpoint(int pix, short[] tmpBuffer)This method returns whether or not pix is the index of an endpoint in tmpBuffer (it is assumed that location pix is not the intensity of the background in tmpBuffer).- Parameters:
pix- the index of a non-zero pixel in tmpBuffertmpBuffer- the image- Returns:
- DOCUMENT ME!
-
isNeighbor
private boolean isNeighbor(int index, int pixNeighbor)Check the neighbor pix.- Parameters:
index- pixel in centerpixNeighbor- neighbor pix- Returns:
- boolean is connected neighbor or not
-
isSinglePoint
private boolean isSinglePoint(int index, short[] tmpBuffer)Check if the given pix is a single point or not.- Parameters:
index- indextmpBuffer- short[]- Returns:
- boolean
-
makeCircularKernel
private void makeCircularKernel(float circDiameter)
Generates a cicular kernel of a specific diameter.- Parameters:
circDiameter- represents the width of a circle in the resolution of the image
-
makeKernel
private void makeKernel(int kernelType)
Generates a kernel of the indicated type.- Parameters:
kernelType- type of kernel to be generated.
-
onePixel
private boolean onePixel(short[] buffer, int index, int xDim)Used by ultimate erode to simplify code a little.- Parameters:
buffer- reference to the mask dataindex- pointer into the arrayxDim- the width of image- Returns:
- DOCUMENT ME!
-
-