Package gov.nih.mipav.model.structures
Class HQueue
java.lang.Object
gov.nih.mipav.model.structures.HQueue
This class is used specifically for the watershed algorithm. It is a version of Hierarcial Queue that greatly
increases the speed of the watershed process.
- Version:
- 0.1 Mar, 1998
- Author:
- Matthew J. McAuliffe, Ph.D., Ray Lert
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidadd(int imgIndex, float GradImIn) add - adds a value to the queue.cloneElementsAt(int i, int j) cloneElementsAt();voiddispose()dispose - cleans up memory.final intfirst()first - returns the last value in the first queue location that has image indexes in it.intfirstAt(int index) firstAt - removes and returns last element at a specific queue index.booleanisEmpty()isEmpty - returns a flag indicating if the entire hierarcial queue is empty.booleanisEmptyAt(int index) isEmptyAt - returns a flag indicating if a specific queue is empty.
-
Field Details
-
hmin
private final float hminDOCUMENT ME! -
intVect
DOCUMENT ME! -
MAX
private final int MAXDOCUMENT ME! -
ptr
private int ptrDOCUMENT ME! -
slope
private final float slopeDOCUMENT ME!
-
-
Constructor Details
-
HQueue
public HQueue(float hmin, float hmax, int MAX, int queueSize) Hierarcial Queue - constructor.- Parameters:
hmin- minimum value of data to be mapped into the queuehmax- maximum value of the queue to be mapped into the queueMAX- number of queue locationsqueueSize- used to initialize individual queue sizes.
-
HQueue
public HQueue(float hmin, float hmax, int MAX, int[] imageHisto) Hierarcial Queue - constructor.- Parameters:
hmin- minimum value of data to be mapped into the queuehmax- maximum value of the queue to be mapped into the queueMAX- number of queue locationsimageHisto- histogram of image used to set queue sizes
-
-
Method Details
-
add
public final void add(int imgIndex, float GradImIn) add - adds a value to the queue.- Parameters:
imgIndex- an index to a location in the imageGradImIn- float value (gradient magnitude of the image at the location imgIndex;
-
cloneElementsAt
cloneElementsAt();- Parameters:
i- start indexj- end index- Returns:
- cloned integer vector beginning at i and ending at j
-
dispose
public void dispose()dispose - cleans up memory. -
first
public final int first()first - returns the last value in the first queue location that has image indexes in it. (LIFO)- Returns:
- DOCUMENT ME!
-
firstAt
public int firstAt(int index) firstAt - removes and returns last element at a specific queue index.- Parameters:
index- indicates a specific location in the queue return last value (image index) at a specific queue location- Returns:
- DOCUMENT ME!
-
isEmpty
public boolean isEmpty()isEmpty - returns a flag indicating if the entire hierarcial queue is empty.- Returns:
- flag indicating if the entire queue structure is empty
-
isEmptyAt
public boolean isEmptyAt(int index) isEmptyAt - returns a flag indicating if a specific queue is empty.- Parameters:
index- location in the queue- Returns:
- flag indicating if a queue location is empty
-