BioImager  4.9.0
A .NET microscopy imaging application based on Bio library. Supports various microscopes by using imported libraries & GUI automation. Supports XInput game controllers to move stage, take images, run ImageJ macros on images or Bio C# scripts.
Loading...
Searching...
No Matches
BioImager.AbstractFloodFiller Class Referenceabstract

The base class that the flood fill algorithms inherit from. Implements the basic flood filler functionality that is the same across all algorithms. More...

Inheritance diagram for BioImager.AbstractFloodFiller:
BioImager.QueueLinearFloodFiller

Public Member Functions

 AbstractFloodFiller (AbstractFloodFiller configSource)
 
void FloodFill (Point pt)
 

Protected Member Functions

void PrepareForFloodFill (Point pt)
 

Protected Attributes

Bitmap bitmap
 
ColorS tolerance = new ColorS(25, 25, 25)
 
ColorS fillColor = ColorS.FromColor(Color.Black)
 
bool fillDiagonally = false
 
bool slow = false
 
int bitmapWidth = 0
 
int bitmapHeight = 0
 
int bitmapStride = 0
 
int bitmapPixelFormatSize = 0
 
byte[] bitmapBits = null
 
PixelFormat pixelFormat
 
bool[] pixelsChecked
 
ColorS byteFillColor
 
ColorS startColor
 

Properties

ColorS FillColor [get, set]
 
bool FillDiagonally [get, set]
 
ColorS Tolerance [get, set]
 
Bitmap Bitmap [get, set]
 

Detailed Description

The base class that the flood fill algorithms inherit from. Implements the basic flood filler functionality that is the same across all algorithms.

Definition at line 16 of file AbstractFloodFiller.cs.

Constructor & Destructor Documentation

◆ AbstractFloodFiller() [1/2]

BioImager.AbstractFloodFiller.AbstractFloodFiller ( )

Definition at line 43 of file AbstractFloodFiller.cs.

44 {
45
46 }

◆ AbstractFloodFiller() [2/2]

BioImager.AbstractFloodFiller.AbstractFloodFiller ( AbstractFloodFiller configSource)

Definition at line 48 of file AbstractFloodFiller.cs.

49 {
50 if (configSource != null)
51 {
52 this.Bitmap = configSource.Bitmap;
53 this.FillColor = configSource.FillColor;
54 this.FillDiagonally = configSource.FillDiagonally; ;
55 this.Tolerance = configSource.Tolerance;
56 }
57 }

Member Function Documentation

◆ PrepareForFloodFill()

void BioImager.AbstractFloodFiller.PrepareForFloodFill ( Point pt)
protected

Definition at line 87 of file AbstractFloodFiller.cs.

88 {
89 startColor = bitmap.GetPixel((int)pt.X, (int)pt.Y);
90 byteFillColor = new ColorS(fillColor.B, fillColor.G, fillColor.R);
91 bitmapStride = bitmap.Stride;
92 bitmapPixelFormatSize = bitmap.PixelFormatSize;
93 pixelFormat = bitmap.PixelFormat;
94 bitmapBits = bitmap.Bytes;
95 bitmapWidth = bitmap.SizeX;
96 bitmapHeight = bitmap.SizeY;
97 pixelsChecked = new bool[bitmapBits.Length / bitmapPixelFormatSize];
98 }

Member Data Documentation

◆ bitmap

Bitmap BioImager.AbstractFloodFiller.bitmap
protected

Definition at line 19 of file AbstractFloodFiller.cs.

◆ bitmapBits

byte [] BioImager.AbstractFloodFiller.bitmapBits = null
protected

Definition at line 30 of file AbstractFloodFiller.cs.

◆ bitmapHeight

int BioImager.AbstractFloodFiller.bitmapHeight = 0
protected

Definition at line 27 of file AbstractFloodFiller.cs.

◆ bitmapPixelFormatSize

int BioImager.AbstractFloodFiller.bitmapPixelFormatSize = 0
protected

Definition at line 29 of file AbstractFloodFiller.cs.

◆ bitmapStride

int BioImager.AbstractFloodFiller.bitmapStride = 0
protected

Definition at line 28 of file AbstractFloodFiller.cs.

◆ bitmapWidth

int BioImager.AbstractFloodFiller.bitmapWidth = 0
protected

Definition at line 26 of file AbstractFloodFiller.cs.

◆ byteFillColor

ColorS BioImager.AbstractFloodFiller.byteFillColor
protected

Definition at line 39 of file AbstractFloodFiller.cs.

◆ fillColor

ColorS BioImager.AbstractFloodFiller.fillColor = ColorS.FromColor(Color.Black)
protected

Definition at line 21 of file AbstractFloodFiller.cs.

◆ fillDiagonally

bool BioImager.AbstractFloodFiller.fillDiagonally = false
protected

Definition at line 22 of file AbstractFloodFiller.cs.

◆ pixelFormat

PixelFormat BioImager.AbstractFloodFiller.pixelFormat
protected

Definition at line 31 of file AbstractFloodFiller.cs.

◆ pixelsChecked

bool [] BioImager.AbstractFloodFiller.pixelsChecked
protected

Definition at line 38 of file AbstractFloodFiller.cs.

◆ slow

bool BioImager.AbstractFloodFiller.slow = false
protected

Definition at line 23 of file AbstractFloodFiller.cs.

◆ startColor

ColorS BioImager.AbstractFloodFiller.startColor
protected

Definition at line 40 of file AbstractFloodFiller.cs.

◆ tolerance

ColorS BioImager.AbstractFloodFiller.tolerance = new ColorS(25, 25, 25)
protected

Definition at line 20 of file AbstractFloodFiller.cs.

Property Documentation

◆ Bitmap

Bitmap BioImager.AbstractFloodFiller.Bitmap
getset

Definition at line 77 of file AbstractFloodFiller.cs.

78 {
79 get { return bitmap; }
80 set
81 {
82 bitmap = value;
83 }
84 }

◆ FillColor

ColorS BioImager.AbstractFloodFiller.FillColor
getset

Definition at line 59 of file AbstractFloodFiller.cs.

60 {
61 get { return fillColor; }
62 set { fillColor = value; }
63 }

◆ FillDiagonally

bool BioImager.AbstractFloodFiller.FillDiagonally
getset

Definition at line 65 of file AbstractFloodFiller.cs.

66 {
67 get { return fillDiagonally; }
68 set { fillDiagonally = value; }
69 }

◆ Tolerance

ColorS BioImager.AbstractFloodFiller.Tolerance
getset

Definition at line 71 of file AbstractFloodFiller.cs.

72 {
73 get { return tolerance; }
74 set { tolerance = value; }
75 }

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