2.2.4.11.6 DatasetObject::GetMask

Description

Get a copy of the mask and it's size contained in the DatasetObject.

Syntax

int GetMask(vector<byte>& vMask)

Parameters

vMask
[output] if not NULL the vector to receive a copy of the mask

Return

Returns a value less than 0 for error, 0 if no masked points, otherwise the size of the mask.

Examples

EX1

void DatasetObject_GetMask_Ex1()
{
    Worksheet wks = Project.ActiveLayer();

    Column colA = wks.Columns(0);
    DatasetObject doA(colA);

    vector<byte> vMask;
    int nMaskSize = doA.GetMask(vMask);
    if( 0 == nMaskSize )
        out_str("Column does not have any masked points."); 
    else if( 0 < nMaskSize )
        printf("Column's mask size is %d.", nMaskSize);
    else // nMaskSize < 0
        out_str("Failed to get column mask.");
}

Remark

See Also

DatasetObject::SetMask

Header to Include

origin.h