![]() |
MISA++ Imaging
1.0.0
Adds support for OpenCV
|
Enumerations | |
enum | tiff_compression : unsigned short { tiff_compression::none = 1, tiff_compression::lzw = 5 } |
Functions | |
template<class T > | |
T | cantor_pairing (T x, T y) |
template<typename T , typename U > | |
void | find_percentiles (std::vector< U > &t_result, std::vector< T > &t_pixels, const std::vector< double > &t_percentiles, bool t_multi_use_nth_element=true) |
template<typename T > | |
T | find_percentile (std::vector< T > &t_pixels, const double t_percentile) |
template<typename T > | |
T | find_percentile (const std::vector< T > &t_pixels, const double t_percentile) |
size_t | otsu (const std::vector< int > &t_histogram) |
template<class T > | |
size_t | huang_shannon2 (const std::vector< T > &data) |
cv::Mat | tiffread (const boost::filesystem::path &t_path) |
void | tiffwrite (const cv::Mat &t_img, const boost::filesystem::path &t_path, tiff_compression t_compression=tiff_compression::none) |
|
strong |
T misaxx::imaging::utils::cantor_pairing | ( | T | x, |
T | y | ||
) |
Cantor pairing function that transforms two natural numbers into a unique numerical representation of those numbers.
T |
x | |
y |
|
inline |
|
inline |
|
inline |
Finds percentiles of a vector. NOTE: This function WILL partially sort the vector!
t_pixels | |
t_percentiles | Vector of percentiles to fetch |
|
inline |
|
inline |
Calculates Otsu threshold from a histogram. Legacy function until cxxh::math::histogram will take over
T |
t_histogram |
cv::Mat misaxx::imaging::utils::tiffread | ( | const boost::filesystem::path & | t_path | ) |
Reads a cv::Mat from TIFF. Supports all types supported by OpenCV
t_path |
void misaxx::imaging::utils::tiffwrite | ( | const cv::Mat & | t_img, |
const boost::filesystem::path & | t_path, | ||
tiff_compression | t_compression = tiff_compression::none |
||
) |
Writes a cv::Mat to TIFF. Supports all types supported by OpenCV
t_img | |
t_path |