NumCpp  2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
nc::imageProcessing::Centroid< dtype > Class Template Reference

holds the information for a centroid More...

#include <Centroid.hpp>

Public Types

using accumulator_t = typename std::conditional< std::is_integral< dtype >::value, int64, double >::type
 

Public Member Functions

 Centroid ()=default
 
 Centroid (const Cluster< dtype > &inCluster)
 
double a () const noexcept
 
double b () const noexcept
 
double col () const noexcept
 
double eccentricity () const noexcept
 
double eod () const noexcept
 
accumulator_t intensity () const noexcept
 
bool operator!= (const Centroid< dtype > &rhs) const noexcept
 
bool operator< (const Centroid< dtype > &rhs) const noexcept
 
bool operator== (const Centroid< dtype > &rhs) const noexcept
 
double orientation () const noexcept
 
void print () const
 
double row () const noexcept
 
std::string str () const
 

Friends

std::ostream & operator<< (std::ostream &inStream, const Centroid< dtype > &inCentriod)
 

Detailed Description

template<typename dtype>
class nc::imageProcessing::Centroid< dtype >

holds the information for a centroid

Member Typedef Documentation

◆ accumulator_t

template<typename dtype >
using nc::imageProcessing::Centroid< dtype >::accumulator_t = typename std::conditional<std::is_integral<dtype>::value, int64, double>::type

Constructor & Destructor Documentation

◆ Centroid() [1/2]

template<typename dtype >
nc::imageProcessing::Centroid< dtype >::Centroid ( )
default

defualt constructor needed by containers

◆ Centroid() [2/2]

template<typename dtype >
nc::imageProcessing::Centroid< dtype >::Centroid ( const Cluster< dtype > &  inCluster)
inlineexplicit

constructor

Parameters
inCluster

Member Function Documentation

◆ a()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::a ( ) const
inlinenoexcept

returns the ellipse semi-major axis a

Returns
a

◆ b()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::b ( ) const
inlinenoexcept

returns the ellipse semi-minor axis b

Returns
b

◆ col()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::col ( ) const
inlinenoexcept

gets the centroid col

Returns
centroid col

◆ eccentricity()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::eccentricity ( ) const
inlinenoexcept

returns the ellipse eccentricity

Returns
eccentricity

◆ eod()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::eod ( ) const
inlinenoexcept

returns the estimated eod of the centroid

Returns
star id

◆ intensity()

template<typename dtype >
accumulator_t nc::imageProcessing::Centroid< dtype >::intensity ( ) const
inlinenoexcept

gets the centroid intensity

Returns
centroid intensity

◆ operator!=()

template<typename dtype >
bool nc::imageProcessing::Centroid< dtype >::operator!= ( const Centroid< dtype > &  rhs) const
inlinenoexcept

not equality operator

Parameters
rhs
Returns
bool

◆ operator<()

template<typename dtype >
bool nc::imageProcessing::Centroid< dtype >::operator< ( const Centroid< dtype > &  rhs) const
inlinenoexcept

less than operator for std::sort algorithm; NOTE: std::sort sorts in ascending order. Since I want to sort the centroids in descensing order, I am purposefully defining this operator backwards!

Parameters
rhs
Returns
bool

◆ operator==()

template<typename dtype >
bool nc::imageProcessing::Centroid< dtype >::operator== ( const Centroid< dtype > &  rhs) const
inlinenoexcept

equality operator

Parameters
rhs
Returns
bool

◆ orientation()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::orientation ( ) const
inlinenoexcept

returns the ellipse semi-minor axis orientation

Returns
orientation

◆ print()

template<typename dtype >
void nc::imageProcessing::Centroid< dtype >::print ( ) const
inline

Method Description: prints the Centroid object to the console

◆ row()

template<typename dtype >
double nc::imageProcessing::Centroid< dtype >::row ( ) const
inlinenoexcept

gets the centroid row

Returns
centroid row

◆ str()

template<typename dtype >
std::string nc::imageProcessing::Centroid< dtype >::str ( ) const
inline

returns the centroid as a string representation

Returns
std::string

Friends And Related Function Documentation

◆ operator<<

template<typename dtype >
std::ostream & operator<< ( std::ostream &  inStream,
const Centroid< dtype > &  inCentriod 
)
friend

ostream operator

Parameters
inStream
inCentriod
Returns
std::ostream

The documentation for this class was generated from the following file: