GetDatasetMasks
Get dataset mask info
int GetDatasetMasks( LPCTSTR lpcszDatasetName, vector<uint> & vnMaskIndices, vector<int> & vnMaskValues )
-2 if dataset not found, otherwise return number of masked values found, 0 indicat the dataset has no masked points
EX1
// test each cells in nColMask and if ture, put mask value into corresponding cell in nColShow void Project_GetDatasetMasks_ex1(int nColMask = 0, int nColShow = 1) { Worksheet wks = Project.ActiveLayer(); Column cm = wks.Columns(nColMask); Column cs = wks.Columns(nColShow); string strM = cm.GetDatasetName(); string strS = cs.GetDatasetName(); Dataset am(wks, nColMask); Dataset as(wks, nColShow); vector<uint> vnInd; vector<int> vnVal; int nn = Project.GetDatasetMasks(strM, vnInd, vnVal); if(nn > 0) { as.SetSize(am.GetSize()); as = 0; // first fill with 0 for(int ii = 0; ii < vnInd.GetSize(); ii++) { as[vnInd[ii]] = vnVal[ii]; } } }
Project::GetDatasetInfo, Project::GetDatasetPlotList, Project::SetDatasetMasks
origin.h