NumCpp  1.0
A C++ implementation of the Python Numpy library
clusterPixels.hpp
Go to the documentation of this file.
1 
30 #pragma once
31 
32 #include "NumCpp/Core/Types.hpp"
36 #include "NumCpp/NdArray.hpp"
37 
38 #include <vector>
39 
40 namespace nc
41 {
42  namespace imageProcessing
43  {
44  //============================================================================
45  // Method Description:
54  template<typename dtype>
55  std::vector<Cluster<dtype> > clusterPixels(const NdArray<dtype>& inImageArray, const NdArray<bool>& inExceedances, uint8 inBorderWidth = 0)
56  {
58 
59  ClusterMaker<dtype> clusterMaker(&inExceedances, &inImageArray, inBorderWidth);
60  return std::vector<Cluster<dtype> >(clusterMaker.begin(), clusterMaker.end());
61  }
62  }
63 }
StaticAsserts.hpp
nc::imageProcessing::clusterPixels
std::vector< Cluster< dtype > > clusterPixels(const NdArray< dtype > &inImageArray, const NdArray< bool > &inExceedances, uint8 inBorderWidth=0)
Definition: clusterPixels.hpp:55
STATIC_ASSERT_ARITHMETIC
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:38
nc::uint8
std::uint8_t uint8
Definition: Types.hpp:43
nc::NdArray< dtype >
NdArray.hpp
ClusterMaker.hpp
nc::imageProcessing::ClusterMaker::begin
const_iterator begin() const noexcept
Definition: ClusterMaker.hpp:158
nc::imageProcessing::ClusterMaker
Clusters exceedance data into contiguous groups.
Definition: ClusterMaker.hpp:53
nc
Definition: Coordinate.hpp:45
Cluster.hpp
Types.hpp
nc::imageProcessing::ClusterMaker::end
const_iterator end() const noexcept
Definition: ClusterMaker.hpp:170