48 template<
typename dtype>
152 return eccentricity_;
220 return !(*
this ==
rhs);
236 return intensity_ <
rhs.intensity_ ?
false :
true;
264 double eccentricity_{};
266 double orientation_{};
291 row_ =
rowCol.front() + rowMin;
292 col_ =
rowCol.back() + colMin;
303 constexpr auto two =
static_cast<double>(2.);
305 auto m20 =
static_cast<double>(0.);
306 auto m02 =
static_cast<double>(0.);
307 auto m11 =
static_cast<double>(0.);
334 eccentricity_ = std::sqrt(
static_cast<double>(1.) -
lambda1 /
lambda2);
335 orientation_ =
static_cast<double>(-0.5) * std::atan2(
two *
m11,
m20 -
m02);
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition StaticAsserts.hpp:39
holds the information for a centroid
Definition Centroid.hpp:50
bool operator<(const Centroid< dtype > &rhs) const noexcept
Definition Centroid.hpp:234
double eod() const noexcept
Definition Centroid.hpp:116
friend std::ostream & operator<<(std::ostream &inStream, const Centroid< dtype > &inCentriod)
Definition Centroid.hpp:247
double b() const noexcept
Definition Centroid.hpp:139
void print() const
Definition Centroid.hpp:188
accumulator_t intensity() const noexcept
Definition Centroid.hpp:105
double col() const noexcept
Definition Centroid.hpp:94
bool operator==(const Centroid< dtype > &rhs) const noexcept
Definition Centroid.hpp:201
Centroid(const Cluster< dtype > &inCluster)
Definition Centroid.hpp:69
double eccentricity() const noexcept
Definition Centroid.hpp:150
bool operator!=(const Centroid< dtype > &rhs) const noexcept
Definition Centroid.hpp:218
double row() const noexcept
Definition Centroid.hpp:83
std::string str() const
Definition Centroid.hpp:173
typename std::conditional< std::is_integral< dtype >::value, int64, double >::type accumulator_t
Definition Centroid.hpp:55
double a() const noexcept
Definition Centroid.hpp:127
double orientation() const noexcept
Definition Centroid.hpp:162
Holds the information for a cluster of pixels.
Definition Cluster.hpp:53
typename std::vector< Pixel< dtype > >::const_iterator const_iterator
Definition Cluster.hpp:59
Definition applyThreshold.hpp:34
std::string num2str(dtype inNumber)
Definition num2str.hpp:44
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition essentiallyEqual.hpp:49
constexpr dtype sqr(dtype inValue) noexcept
Definition sqr.hpp:42
std::int64_t int64
Definition Types.hpp:35
NdArray< double > centerOfMass(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition centerOfMass.hpp:47
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59
std::uint32_t uint32
Definition Types.hpp:40