NumCpp
2.12.1
A Templatized Header Only C++ Implementation of the Python NumPy Library
|
Holds the information for a single pixel. More...
#include <Pixel.hpp>
Public Member Functions | |
constexpr | Pixel ()=default |
constexpr | Pixel (uint32 inRow, uint32 inCol, dtype inIntensity) noexcept |
constexpr bool | operator!= (const Pixel< dtype > &rhs) const noexcept |
bool | operator< (const Pixel< dtype > &rhs) const noexcept |
constexpr bool | operator== (const Pixel< dtype > &rhs) const noexcept |
void | print () const |
std::string | str () const |
Data Fields | |
int32 | clusterId { -1 } |
uint32 | col { 0 } |
dtype | intensity { 0 } |
uint32 | row { 0 } |
Friends | |
std::ostream & | operator<< (std::ostream &inStream, const Pixel< dtype > &inPixel) |
Holds the information for a single pixel.
|
constexprdefault |
defualt constructor needed by containers
|
inlineconstexprnoexcept |
constructor
inRow | pixel row |
inCol | pixel column |
inIntensity | pixel intensity |
|
inlineconstexprnoexcept |
not equality operator
rhs |
|
inlinenoexcept |
less than operator for std::sort algorithm and std::set<>; NOTE: std::sort sorts in ascending order. Since I want to sort the centroids in descensing order, I am purposefully defining this operator backwards!
rhs |
|
inlineconstexprnoexcept |
equality operator
rhs |
|
inline |
Method Description: prints the Pixel object to the console
|
inline |
returns the pixel information as a string
|
friend |
osstream operator
inStream | |
inPixel |
|
mutable |
uint32 nc::imageProcessing::Pixel< dtype >::col { 0 } |
dtype nc::imageProcessing::Pixel< dtype >::intensity { 0 } |
uint32 nc::imageProcessing::Pixel< dtype >::row { 0 } |