52 for (
uint8 border = 0; border < inBorderWidth; ++border)
54 for (
int32 row = 0; row < static_cast<int32>(inShape.
rows); ++row)
56 for (
int32 col = 0; col < static_cast<int32>(inShape.
cols); ++col)
58 if (inExceedances(row, col))
61 xcds(
std::max(row - 1, 0), col) =
true;
62 xcds(
std::max(row - 1, 0), std::min<int32>(col + 1, inShape.
cols - 1)) =
true;
64 xcds(row, std::max<int32>(col - 1, 0)) =
true;
65 xcds(row, std::min<int32>(col + 1, inShape.
cols - 1)) =
true;
67 xcds(std::min<int32>(row + 1, inShape.
rows - 1),
std::max(col - 1, 0)) =
true;
68 xcds(std::min<int32>(row + 1, inShape.
rows - 1), col) =
true;
69 xcds(std::min<int32>(row + 1, inShape.
rows - 1), std::min<int32>(col + 1, inShape.
cols - 1)) =
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
Definition: applyThreshold.hpp:34
NdArray< bool > windowExceedances(const NdArray< bool > &inExceedances, uint8 inBorderWidth) noexcept
Definition: windowExceedances.hpp:47
std::int32_t int32
Definition: Types.hpp:36
std::uint8_t uint8
Definition: Types.hpp:42
NdArray< dtype > max(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition: max.hpp:44