| 398 | } |
| 399 | |
| 400 | std::vector<int> SMRFilter::createLowMask(std::vector<double> const& ZImin) |
| 401 | { |
| 402 | // "[The] minimum surface is checked for low outliers by inverting the point |
| 403 | // cloud in the z-axis and applying the filter with parameters (slope = |
| 404 | // 500%, maxWindowSize = 1). The resulting mask is used to flag low outlier |
| 405 | // cells as OBJ before the inpainting of the provisional DEM." |
| 406 | |
| 407 | // Need to add a step to negate ZImin |
| 408 | std::vector<double> negZImin; |
| 409 | std::transform(ZImin.begin(), ZImin.end(), std::back_inserter(negZImin), |
| 410 | [](double v) { return -v; }); |
| 411 | std::vector<int> LowV = progressiveFilter(negZImin, 5.0, m_args->m_cell); |
| 412 | |
| 413 | if (!m_args->m_dir.empty()) |
| 414 | { |
| 415 | std::string fname = |
| 416 | FileUtils::toAbsolutePath("zilow.tif", m_args->m_dir); |
| 417 | MatrixXi Low = Map<MatrixXi>(LowV.data(), m_rows, m_cols); |
| 418 | math::writeMatrix(Low.cast<double>(), fname, "GTiff", m_args->m_cell, m_bounds, m_srs); |
| 419 | } |
| 420 | |
| 421 | return LowV; |
| 422 | } |
| 423 | |
| 424 | std::vector<int> SMRFilter::createNetMask() |
| 425 | { |
nothing calls this directly
no test coverage detected