MyCaffe  1.12.0.60
Deep learning software for Windows C# programmers.
MyCaffe.basecode.Valuemap Class Reference

The Realmap operates similar to a bitmap but is actually just an array of doubles. More...

Public Member Functions

 Valuemap (int nChannels, int nHeight, int nWidth, double[] rgData=null)
 The constructor. More...
 
 Valuemap (Valuemap data)
 The constructorl More...
 
void SetPixel (int nX, int nY, double clr)
 Set a given pixel to a given color. More...
 
double GetPixel (int nX, int nY)
 Get the value of a pixel in the map. More...
 
void SetPixel (int nChannel, int nX, int nY, double clr)
 Set a given pixel to a given color. More...
 
double GetPixel (int nChannel, int nX, int nY)
 Get the value of a pixel in the map. More...
 
void SetAll (double dfVal)
 Set all values to the specified value. More...
 
void SetAll (int nChannel, double dfVal)
 Set all values of a given channel to a specified value. More...
 
void Clear ()
 Reset all values to zero. More...
 

Properties

double[] Values [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 Realmap operates similar to a bitmap but is actually just an array of doubles.

Definition at line 14 of file Valuemap.cs.

Constructor & Destructor Documentation

◆ Valuemap() [1/2]

MyCaffe.basecode.Valuemap.Valuemap ( int  nChannels,
int  nHeight,
int  nWidth,
double[]  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 Valuemap.cs.

◆ Valuemap() [2/2]

MyCaffe.basecode.Valuemap.Valuemap ( Valuemap  data)

The constructorl

Parameters
dataSpecifies another Realmap to copy.

Definition at line 43 of file Valuemap.cs.

Member Function Documentation

◆ Clear()

void MyCaffe.basecode.Valuemap.Clear ( )

Reset all values to zero.

Definition at line 146 of file Valuemap.cs.

◆ GetPixel() [1/2]

double MyCaffe.basecode.Valuemap.GetPixel ( int  nChannel,
int  nX,
int  nY 
)

Get the value of a pixel in the map.

Parameters
nChannelSpecifies the channel of the pixel.
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 109 of file Valuemap.cs.

◆ GetPixel() [2/2]

double MyCaffe.basecode.Valuemap.GetPixel ( int  nX,
int  nY 
)

Get the value 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 83 of file Valuemap.cs.

◆ SetAll() [1/2]

void MyCaffe.basecode.Valuemap.SetAll ( double  dfVal)

Set all values to the specified value.

Parameters
dfValSpecifies the value to set all elements.

Definition at line 119 of file Valuemap.cs.

◆ SetAll() [2/2]

void MyCaffe.basecode.Valuemap.SetAll ( int  nChannel,
double  dfVal 
)

Set all values of a given channel to a specified value.

Parameters
nChannelSpecifies the channel.
dfValSpecifies the value.

Definition at line 132 of file Valuemap.cs.

◆ SetPixel() [1/2]

void MyCaffe.basecode.Valuemap.SetPixel ( int  nChannel,
int  nX,
int  nY,
double  clr 
)

Set a given pixel to a given color.

Parameters
nChannelSpecifies the channel location of the pixel.
nXSpecifies the x location of the pixel.
nYSpecifies the y location of the pixel.
clrSpecifies the value to set the pixel.

Definition at line 96 of file Valuemap.cs.

◆ SetPixel() [2/2]

void MyCaffe.basecode.Valuemap.SetPixel ( int  nX,
int  nY,
double  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 value to set the pixel.

Definition at line 65 of file Valuemap.cs.

Property Documentation

◆ Channels

int MyCaffe.basecode.Valuemap.Channels
get

Specifies the channels of the data.

Definition at line 162 of file Valuemap.cs.

◆ Height

int MyCaffe.basecode.Valuemap.Height
get

Specifies the height of the data.

Definition at line 170 of file Valuemap.cs.

◆ Values

double [] MyCaffe.basecode.Valuemap.Values
get

Specifies the data itself.

Definition at line 154 of file Valuemap.cs.

◆ Width

int MyCaffe.basecode.Valuemap.Width
get

Specifies the width of the data.

Definition at line 178 of file Valuemap.cs.


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