MCPcopy Create free account
hub / github.com/PDAL/PDAL / getLogicalMask

Method getLogicalMask

plugins/matlab/filters/Script.cpp:52–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52std::string Script::getLogicalMask(mxArray* array, LogPtr log)
53{
54
55 std::string output("");
56 mxClassID ml_id = mxGetClassID(array);
57 if (ml_id != mxSTRUCT_CLASS)
58 throw pdal::pdal_error("Selected array must be a Matlab struct array!");
59
60 for (int n = 0; n < mxGetNumberOfFields(array); ++n)
61 {
62
63 mxArray* f = mxGetFieldByNumber(array, 0, n);
64
65 if (mxIsLogical(f))
66 {
67 const char* name = mxGetFieldNameByNumber(array, n);
68 output = std::string(name);
69 }
70 }
71 return output;
72}
73
74std::string Script::getSRSWKT(mxArray* array, LogPtr log)
75{

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected