NumCpp
2.4.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
applyThreshold.hpp
Go to the documentation of this file.
1
#pragma once
29
30
#include "
NumCpp/Core/Internal/StaticAsserts.hpp
"
31
#include "
NumCpp/NdArray.hpp
"
32
33
namespace
nc
34
{
35
namespace
imageProcessing
36
{
37
//============================================================================
38
// Method Description:
46
template
<
typename
dtype>
47
NdArray<bool>
applyThreshold
(
const
NdArray<dtype>
& inImageArray, dtype inThreshold)
48
{
49
STATIC_ASSERT_ARITHMETIC
(dtype);
50
51
return
inImageArray > inThreshold;
52
}
53
}
// namespace imageProcessing
54
}
// namespace nc
StaticAsserts.hpp
STATIC_ASSERT_ARITHMETIC
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition:
StaticAsserts.hpp:37
nc::NdArray< bool >
NdArray.hpp
nc
Definition:
Coordinate.hpp:44
nc::imageProcessing::applyThreshold
NdArray< bool > applyThreshold(const NdArray< dtype > &inImageArray, dtype inThreshold)
Definition:
applyThreshold.hpp:47
include
NumCpp
ImageProcessing
applyThreshold.hpp
Generated by
1.8.17