MatrixLayer

 

Contents

Name

MatrixLayer

Remark

The MatrixLayer class provides methods and properties common to matrix layers in Origin matrix pages. An Origin matrix contains a number of matrix objects thus the MatrixLayer class contains a collection of all the matrix objects in the matrix layer.

An Origin C MatrixLayer object is a wrapper object that is a reference to an internal Origin matrix layer 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 MatrixLayer class is derived from the Datasheet, Layer, and OriginObject classes from which it inherits methods and properties.

Hierarchy

Examples

EX1

void MatrixLayer_MatrixLayer_Ex1()
{
    MatrixLayer ml = Project.ActiveLayer();
    if(ml)
    {
        Matrix mm(ml);// Get the active Matrix from a MatrixLayer
        printf("The active matrix is %d x %d\n",mm.GetNumRows(), mm.GetNumCols());
    }
}

header to Include

origin.h

Reference

Members

Name Brief Example
CopyImage Copies part of an image from another matrix layer Examples
CopyRect Copy all matrix objects data inside roi Examples
CreateCopy Create a copy of the matrix window matlayerSource and attaches it to the object. Examples
Delete Delete a number of MatrixObjects from the matrix layer. Examples
ExportMultiFrame Export all matrix objects to a multi frame image. Examples
GetActive Get the index of the layer's active MatrixObject. Examples
GetCellWidth Get the matrix cell width Examples
GetInternalData Replaced by GetInternalDataType. Kept for backwards compatibility. Examples
GetInternalDataType Get internal data type of the active matrix object. Examples
HasData Check if MatrixLayer has data that represent the image Examples
HasImage Check if MatrixLayer has associated image Examples
Insert Insert a number of new matrix objects into a matrix layer. Examples
MatrixLayer Constructor for the MatrixLayer class Examples
Open Opens a new matrix from the supplied OGM file and attaches it to the object. Examples
PutSPCBlob Put the data from an SPC blob into the matrix Examples
SetActive Set the layer's active MatrixObject by index. Examples
SetCellWidth Set the matrix cell width Examples
SetDataDisplay Sets the display format of the data in the matrix Examples
SetInternalData Replaced by SetInternalDataType. Kept for backwards compatibility. Examples
SetInternalDataType Set the internal data type for all the matrix objects in the layer. Examples
SetNumCols Set the number of columns in a MatixLayer. Examples
SetSize Set the number of MatrixObjects in a matrix layer. Examples
SetViewImage set matrix view mode to image or data mode Examples
XYtoColRow Find matrix indecies from X Y Examples

Property

Name Brief Example
MatrixObjects A Collection of all matrix objects in a matrix layer Examples