SetMask
Set the mask of the DatasetObject.
int SetMask(vector<byte>& vMask, bool bReplace = false, bool bUndo = false, int r1 = 0, int r2 = -1)
int SetMask(int nBegin, int nEnd, bool bReplace = false, bool bUndo = false)
Returns a value less than 0 for error, 0 if no masked points, otherwise the size of the mask.
EX1
void DatasetObject_SetMask_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); Column colB = wks.Columns(1); DatasetObject doB(colB); doB.SetMask(vMask); } else // nMaskSize < 0 out_str("Failed to get column mask."); }
DatasetObject::GetMask
origin.h