BioImager  3.9.1
A .NET microscopy imaging library. Supports various microscopes by using imported libraries & GUI automation. Supported libraries include PriorĀ® & ZeissĀ® & all devices supported by Micromanager 2.0 and python-microscope.
Loading...
Searching...
No Matches
BioImager.FloodFillRangeQueue Class Reference

A queue of FloodFillRanges. More...

Public Member Functions

 FloodFillRangeQueue (int initialSize)
 
void Enqueue (ref FloodFillRange r)
 Adds a FloodFillRange to the end of the queue. More...
 
FloodFillRange Dequeue ()
 Removes and returns the FloodFillRange at the beginning of the queue. More...
 

Properties

int Count [get]
 Returns the number of items currently in the queue. More...
 
FloodFillRange First [get]
 Gets the FloodFillRange at the beginning of the queue. More...
 

Detailed Description

A queue of FloodFillRanges.

Definition at line 4 of file FloodFillRangeQueue.cs.

Constructor & Destructor Documentation

◆ FloodFillRangeQueue() [1/2]

BioImager.FloodFillRangeQueue.FloodFillRangeQueue ( )

Definition at line 18 of file FloodFillRangeQueue.cs.

18 : this(10000)
19 {
20
21 }

◆ FloodFillRangeQueue() [2/2]

BioImager.FloodFillRangeQueue.FloodFillRangeQueue ( int  initialSize)

Definition at line 23 of file FloodFillRangeQueue.cs.

24 {
25 array = new FloodFillRange[initialSize];
26 head = 0;
27 size = 0;
28 }

Member Function Documentation

◆ Dequeue()

FloodFillRange BioImager.FloodFillRangeQueue.Dequeue ( )

Removes and returns the FloodFillRange at the beginning of the queue.

Definition at line 50 of file FloodFillRangeQueue.cs.

51 {
52 FloodFillRange range = new FloodFillRange();
53 if (size > 0)
54 {
55 range = array[head];
56 array[head] = new FloodFillRange();
57 head++;//advance head position
58 size--;//update size to exclude dequeued item
59 }
60 return range;
61 }

Referenced by BioImager.QueueLinearFloodFiller.FloodFill().

◆ Enqueue()

void BioImager.FloodFillRangeQueue.Enqueue ( ref FloodFillRange  r)

Adds a FloodFillRange to the end of the queue.

Definition at line 37 of file FloodFillRangeQueue.cs.

38 {
39 if (size + head == array.Length)
40 {
41 FloodFillRange[] newArray = new FloodFillRange[2 * array.Length];
42 Array.Copy(array, head, newArray, 0, size);
43 array = newArray;
44 head = 0;
45 }
46 array[head + (size++)] = r;
47 }

Property Documentation

◆ Count

int BioImager.FloodFillRangeQueue.Count
get

Returns the number of items currently in the queue.

Definition at line 13 of file FloodFillRangeQueue.cs.

14 {
15 get { return size; }
16 }

Referenced by BioImager.QueueLinearFloodFiller.FloodFill().

◆ First

FloodFillRange BioImager.FloodFillRangeQueue.First
get

Gets the FloodFillRange at the beginning of the queue.

Definition at line 31 of file FloodFillRangeQueue.cs.

32 {
33 get { return array[head]; }
34 }

The documentation for this class was generated from the following file: