46 namespace imageProcessing
59 template<
typename dtype>
62 const std::string& inWindowType,
63 uint8 inBorderWidth = 0)
67 uint8 borderWidthPre = 0;
68 uint8 borderWidthPost = 0;
69 if (inWindowType ==
"pre")
71 borderWidthPre = inBorderWidth;
73 else if (inWindowType ==
"post")
75 borderWidthPost = inBorderWidth;
89 if (borderWidthPre > 0)
95 std::vector<Cluster<dtype>> clusters =
clusterPixels(inImageArray, xcds, borderWidthPost);
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:36
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:37
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
dtype generateThreshold(const NdArray< dtype > &inImageArray, double inRate)
Definition: generateThreshold.hpp:56
std::vector< Centroid< dtype > > centroidClusters(const std::vector< Cluster< dtype >> &inClusters)
Definition: centroidClusters.hpp:50
std::vector< Centroid< dtype > > generateCentroids(const NdArray< dtype > &inImageArray, double inRate, const std::string &inWindowType, uint8 inBorderWidth=0)
Definition: generateCentroids.hpp:60
NdArray< bool > windowExceedances(const NdArray< bool > &inExceedances, uint8 inBorderWidth) noexcept
Definition: windowExceedances.hpp:49
std::vector< Cluster< dtype > > clusterPixels(const NdArray< dtype > &inImageArray, const NdArray< bool > &inExceedances, uint8 inBorderWidth=0)
Definition: clusterPixels.hpp:53
NdArray< bool > applyThreshold(const NdArray< dtype > &inImageArray, dtype inThreshold)
Definition: applyThreshold.hpp:46
Definition: Coordinate.hpp:45
std::uint8_t uint8
Definition: Types.hpp:42