MatrixObject

 

Name

MatrixObject

Remark

The MatrixObject class provides methods and properties common to internal Origin matrix objects. An Origin C MatrixObject is primarily used for style related control of the data in the internal Origin matrix while the Origin C Matrix class is used to access the data in the matrix. Thus, the MatrixObject class has the same relationship with the Matrix class as the Column class has with the Dataset class. That is, an internal Origin matrix object (accessed by the MatrixObject class) holds a matrix data set (accessed by the Matrix class) just as a worksheet column (accessed by the Column class) holds a data set (accessed by the Dataset class).

The data values displayed in the cells of a matrix are typically referred to as Z values whose associated X values are linearly mapped to the columns of the matrix and whose associated Y values are linearly mapped to the rows of the matrix. A MatrixLayer holds a collection of MatrixObjects even though in most cases there is only one MatrixObject per MatrixLayer.

An Origin C MatrixObject is a wrapper object that is a reference to an internal Origin matrix object. Wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object.

The MatrixObject class is derived from the DataObject, DataObjectBase, and OriginObject classes from which it inherits methods and properties.

Hierarchy

Examples

EX1

void MatrixObject_MatrixObject_Ex1()
{
    MatrixLayer ml = Project.ActiveLayer();
    if(ml)
        foreach(MatrixObject mo in ml.MatrixObjects)
            printf( "%s is %d x %d\n", ml.GetPage().GetName(), mo.GetNumRows(), mo.GetNumCols());
}

header to Include

origin.h

Reference

Members

Name Brief Example
ApplyPalette This function apply the palette to the matrix object Examples
Attach It initializes the MatrixObject from the name of a dataset. The dataset must be attached to a matrix, or this initialization will produce invalid MatrixObject. Examples
CopyToClipboard Copy a rectangle portion of the matrix object to the clipboard. Examples
CopyToMatrix Copy a rectangle portion of the matrix object to one matrix. Examples
GetColumnWidth Gets the width of a matrix column Examples
GetComments Get the matrix object comments. Examples
GetDataObject Access to the internal Matrix data Examples
GetDIB Get the handle to the Device Independent Bitmap that represents the current data. Examples
GetDigitMode Gets the digit mode of the matrix Examples
GetDigits Gets the number of digits of a particular digit mode of the matrix Examples
GetExtendedLabel Get the matrix object label by label type. Examples
GetFormat Gets the data format of the matrix Examples
GetImageMask Get the MatrixObject's mask data into a matrix Examples
GetInternalData Get internal data type Examples
GetLabel Get the matrix object labels. Examples
GetLeadBitmap not copy, access internal Examples
GetLongName Get the matrix object long name. Examples
GetName Get the matrix object short name. Examples
GetNumCols Gets the number of columns in a matrix Examples
GetNumRows Gets the number of rows in a matrix Examples
GetPaletteInfo get colormap palette info Examples
GetParameter Get one parameter label from the matrix object. Examples
GetParameters Get all parameter labels from the matrix object. Examples
GetPlots Get dataplot's uids as to access them, dataplots are generated by this matrix object. Examples
GetRegionPoints Get Z values and indices of points inside polygonal region Examples
GetUnits Get uints label of the matrix object. Examples
GetXY Get matrix object xy mapping coordinates Examples
HasData Check if MatrixObject has data Examples
HasImage Check if MatrixObject has image Examples
HasPalette Check if MatrixObject has palette Examples
IsImageView Determine if MatrixObject's view mode is "Image Mode" or "Data Mode". Examples
IsVirtual To check if the matrix object is a virtual matrix. Examples
MatrixObject Default constructor Examples
SetColumnWidth Sets the width of a matrix column. Examples
SetComments set the matrix object comments. Examples
SetDIB Set the Device Independent Bitmap that represents the current data. Examples
SetDigitMode Sets the digit mode of the matrix Examples
SetDigits Sets the number of digits of a particular digit mode of the matrix. Examples
SetExtendedLabel Set the matrix object label by label type. Examples
SetFormat Set the Matrix data format. Only OKCOLTYPE_NUMERIC is supported. Examples
SetImageMask Set MatrixObject's image mask. Examples
SetInternalData Set the Matrix internal data storage type Examples
SetLabel Set the matrix object label. Examples
SetLeadBitmap Set the LEAD bitmap handle of the matrix object. Examples
SetLongName Set the matrix object long name. Examples
SetNumCols Set the number of columns and keep same number of rows. Examples
SetNumRows Set the number of rows and keep same number of columns. Examples
SetParameter Set one parameter label for matrix object. Examples
SetParameters set all parameters labels for the matrix object. Examples
SetSize Set the number of rows and columns. Examples
SetUnits set units label of the matrix object. Examples
SetXY Set matrix object xy mapping coordinates Examples