MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.basecode.Bytemap Class Reference

The Bytemap operates similar to a bitmap but is actually just an array of bytes. More...

Public Member Functions

 Bytemap (int nChannels, int nHeight, int nWidth, byte[] rgData=null)
 The constructor. More...
 
 Bytemap (Bytemap data)
 The constructorl More...
 
void SetPixel (int nX, int nY, byte clr)
 Set a given pixel to a given color. More...
 
void SetPixel (int nX, int nY, Color clr)
 Set a given pixel to a given color. More...
 
Color GetPixel (int nX, int nY)
 Get the color of a pixel in the map. More...
 
void Clear ()
 Reset all values to zero. More...
 
Bitmap ToImage ()
 Converts the Bytemap into a Bitmap. More...
 

Static Public Member Functions

static Bytemap FromImage (Bitmap bmp)
 Converts a bitmap into a new Bytemap. More...
 

Properties

byte[] Bytes [get]
 Specifies the data itself. More...
 
int Channels [get]
 Specifies the channels of the data. More...
 
int Height [get]
 Specifies the height of the data. More...
 
int Width [get]
 Specifies the width of the data. More...
 

Detailed Description

The Bytemap operates similar to a bitmap but is actually just an array of bytes.

Definition at line 14 of file Bytemap.cs.

Constructor & Destructor Documentation

◆ Bytemap() [1/2]

MyCaffe.basecode.Bytemap.Bytemap ( int  nChannels,
int  nHeight,
int  nWidth,
byte[]  rgData = null 
)

The constructor.

Parameters
nChannelsSpecifies the number of channels in the map.
nHeightSpecifies the height of the map.
nWidthSpecifies the width of the map.
rgDataOptionally, specifies the data to use.

Definition at line 29 of file Bytemap.cs.

◆ Bytemap() [2/2]

MyCaffe.basecode.Bytemap.Bytemap ( Bytemap  data)

The constructorl

Parameters
dataSpecifies another Bytemap to copy.

Definition at line 43 of file Bytemap.cs.

Member Function Documentation

◆ Clear()

void MyCaffe.basecode.Bytemap.Clear ( )

Reset all values to zero.

Definition at line 124 of file Bytemap.cs.

◆ FromImage()

static Bytemap MyCaffe.basecode.Bytemap.FromImage ( Bitmap  bmp)
static

Converts a bitmap into a new Bytemap.

Parameters
bmpSpecifies the bitmap.
Returns
A new Bytemap is returned.

Definition at line 191 of file Bytemap.cs.

◆ GetPixel()

Color MyCaffe.basecode.Bytemap.GetPixel ( int  nX,
int  nY 
)

Get the color of a pixel in the map.

Parameters
nXSpecifies the x location of the pixel.
nYSpecifies the y location of the pixel.
Returns
The color of the pixel is returned.

Definition at line 105 of file Bytemap.cs.

◆ SetPixel() [1/2]

void MyCaffe.basecode.Bytemap.SetPixel ( int  nX,
int  nY,
byte  clr 
)

Set a given pixel to a given color.

Parameters
nXSpecifies the x location of the pixel.
nYSpecifies the y location of the pixel.
clrSpecifies the color to set the pixel.

Definition at line 65 of file Bytemap.cs.

◆ SetPixel() [2/2]

void MyCaffe.basecode.Bytemap.SetPixel ( int  nX,
int  nY,
Color  clr 
)

Set a given pixel to a given color.

Parameters
nXSpecifies the x location of the pixel.
nYSpecifies the y location of the pixel.
clrSpecifies the color to set the pixel.

Definition at line 83 of file Bytemap.cs.

◆ ToImage()

Bitmap MyCaffe.basecode.Bytemap.ToImage ( )

Converts the Bytemap into a Bitmap.

Returns
A new bitmap is returned.

Definition at line 165 of file Bytemap.cs.

Property Documentation

◆ Bytes

byte [] MyCaffe.basecode.Bytemap.Bytes
get

Specifies the data itself.

Definition at line 132 of file Bytemap.cs.

◆ Channels

int MyCaffe.basecode.Bytemap.Channels
get

Specifies the channels of the data.

Definition at line 140 of file Bytemap.cs.

◆ Height

int MyCaffe.basecode.Bytemap.Height
get

Specifies the height of the data.

Definition at line 148 of file Bytemap.cs.

◆ Width

int MyCaffe.basecode.Bytemap.Width
get

Specifies the width of the data.

Definition at line 156 of file Bytemap.cs.


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