IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
Base class for storing image data and exporting and importing images froom files and different types of objects. More...
Public Member Functions | |
ImageBuilderBase () | |
ImageBuilderBase (System.Drawing.Bitmap bitmap) | |
void | ClearData () |
Clears the data that holds image information. More... | |
abstract void | InitData () |
System.Drawing.Bitmap | ToBitmap () |
Creates and returns a bitmap object from the current image data. More... | |
void | FromBitmap (System.Drawing.Bitmap bitmap) |
Copies image data from the specified bitmap. More... | |
void | FromBitmap (System.Drawing.Bitmap bitmap, bool extractColorComponents, bool extractGreyLevels) |
Copies image data from the specified bitmap. More... | |
void | FromCsv (CsvData csv) |
Copies image data from the specified CsvData. More... | |
void | LoadCsv (string filePath) |
Reads image data from the specified file in CSV format. More... | |
void | ToCsv (ref CsvData csv) |
Write the current image data to a CSV object. More... | |
string | ToCsvString () |
Returns a CSV string containing current image data written in the CSV (comma separated values) form. More... | |
void | SaveCsv (string filePath) |
Saves image data to the specified file in CSV format. More... | |
Public Attributes | |
const string | ConstImage = "Image" |
Protected Attributes | |
int | _sizeX = 0 |
int | _sizeY = 0 |
double[] | _red = null |
double[] | _green = null |
double[] | _blue = null |
double[] | _grey = null |
double[] | _opacity = null |
IG.Lib.CsvData | _csv = null |
Private Member Functions | |
void | SetSize (int sizeX, int sizeY) |
Sets or changes image size. More... | |
int | GetIndex (int i, int j) |
Returns the flat array index corresponding to 2D indices of a pixel. More... | |
void | GetIndex (int flatIndex, out int indexX, out int indexY) |
Calculates and returns (through output arguments) 2D indices of a pixel that correspond to the specified flat index. More... | |
Private Attributes | |
const string | ConstDim = "Dimensions" |
const string | ConstRed = "Red" |
const string | ConstGreen = "Green" |
const string | ConstBlue = "Blue" |
const string | ConstGrey = "Grey" |
const string | ConstAlpha = "Alpha" |
Base class for storing image data and exporting and importing images froom files and different types of objects.
|
inline |
|
inline |
|
inline |
Clears the data that holds image information.
|
inlineprivate |
Sets or changes image size.
sizeX | Size in x direction. |
sizeY | Size in y direction. |
|
inlineprivate |
Returns the flat array index corresponding to 2D indices of a pixel.
i | First index. |
j | Second index. |
|
inlineprivate |
Calculates and returns (through output arguments) 2D indices of a pixel that correspond to the specified flat index.
flatIndex | Fat (1D) index that count pixels column by column. |
indexX | Pixel index in x direction. |
indexY | Pixel index in y direction. |
|
pure virtual |
Implemented in IG.Lib.ImageBuilder, IG.Lib.Ib3, IG.Lib.Ib1, IG.Lib.Ib2, IG.Lib.Ib4, IG.Lib.Ib5, IG.Lib.Ib6, IG.Lib.Ib7, IG.Lib.Ib8, and IG.Lib.Ib9.
|
inline |
Creates and returns a bitmap object from the current image data.
Referenced by IPLab.MainForm.OpenFile(), and IPLab.MainForm.SaveFile().
|
inline |
Copies image data from the specified bitmap.
bitmap | Bitmap where data is copied from. |
|
inline |
Copies image data from the specified bitmap.
bitmap | Bitmap where data is copied from. |
extractColorComponents | Whether color components are extracted from the bitmap and stored in the current object. |
extractGreyLevels | Whether grey levels are extracted from the bitmap and stored in the current object. |
|
inline |
Copies image data from the specified CsvData.
bitmap | Bitmap where data is copied from. |
extractColorComponents | Whether color components are extracted from the bitmap and stored in the current object. |
extractGreyLevels | Whether grey levels are extracted from the bitmap and stored in the current object. |
References IG.Lib.StringTable.GetInt(), IG.Lib.StringTable.IsDefined(), IG.Lib.StringTable.IsInt(), IG.Lib.StringTable.IsNotNullOrEmpty(), and IG.Lib.StringTable.NumRows.
|
inline |
Reads image data from the specified file in CSV format.
filePath | File from which data is saved. |
References IG.Lib.StringTable.LoadCsv().
Referenced by IPLab.MainForm.OpenFile().
|
inline |
Write the current image data to a CSV object.
csv | CSV object where image data is stored in the agreed format. |
|
inline |
Returns a CSV string containing current image data written in the CSV (comma separated values) form.
|
inline |
Saves image data to the specified file in CSV format.
If the file exists then it is overwritten.
filePath | File to which data is saved. |
Referenced by IPLab.MainForm.SaveFile().
const string IG.Lib.ImageBuilderBase.ConstImage = "Image" |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |