![]() |
SOPT
Sparse OPTimisation
|
Classes | |
struct | bad_lexical_cast |
Exception to be thrown by lexical_cast (below) More... | |
Functions | |
Image | read_tiff (std::string const &name) |
Reads tiff image. More... | |
void | write_tiff (Image<> const &image, std::string const &filename) |
Writes a tiff greyscale file. More... | |
template<typename T , typename U > | |
T | lexical_cast (const U &in) |
Convert between any types via stringstream. More... | |
template<typename T = std::string> | |
std::vector< T > | split (std::string s, const std::string &sep) |
Split a string on a specified delimiter with optional cast to another type. More... | |
template<typename T > | |
std::vector< float > | imageToFloat (sopt::Vector< T > const &image) |
template<typename T > | |
sopt::Vector< T > | floatToImage (std::vector< float > const &float_image) |
template<typename T > | |
Vector< T > & | get_wavelet_basis_coefficients (Vector< T > &coeffs, const t_uint basis_index, const t_uint size) |
return wavelet basis coefficients from a dictionary More... | |
template<typename T > | |
Vector< T > & | get_wavelet_levels_1d (Vector< T > &coeffs, const t_uint level, const t_uint size) |
return wavelet basis coefficients for a given level and below (1d case) More... | |
template<typename T > | |
Vector< T > & | get_wavelet_levels (Vector< T > &coeffs, const t_uint level, const t_uint rows, const t_uint cols) |
return wavelet basis coefficients for a given level and below (2d case) More... | |
template<typename T > | |
Vector< T > & | get_wavelet_low_high_pass (Vector< T > &coeffs, const t_uint level, const t_uint rows, const t_uint cols) |
return wavelet basis coefficients low pass (rows) and high pass (cols) for a given level More... | |
template<typename T > | |
Vector< T > & | get_wavelet_high_high_pass (Vector< T > &coeffs, const t_uint level, const t_uint rows, const t_uint cols) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level More... | |
template<typename T > | |
Vector< T > & | get_wavelet_high_low_pass (Vector< T > &coeffs, const t_uint level, const t_uint rows, const t_uint cols) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level More... | |
template<typename T > | |
Vector< T > & | get_wavelet_low_low_pass (Vector< T > &coeffs, const t_uint level, const t_uint rows, const t_uint cols) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level More... | |
template<typename T > | |
Vector< T > & | get_wavelet_high_pass_1d (Vector< T > &coeffs, const t_uint level, const t_uint size) |
return 1d high pass filter for a given level of a wavelet More... | |
sopt::Vector<T> sopt::utilities::floatToImage | ( | std::vector< float > const & | float_image | ) |
Definition at line 83 of file utilities.h.
Vector< T > & sopt::utilities::get_wavelet_basis_coefficients | ( | Vector< T > & | coeffs, |
const t_uint | basis_index, | ||
const t_uint | size | ||
) |
return wavelet basis coefficients from a dictionary
Definition at line 105 of file wavelets.h.
Vector< T > & sopt::utilities::get_wavelet_high_high_pass | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | rows, | ||
const t_uint | cols | ||
) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level
Definition at line 139 of file wavelets.h.
References cols, get_wavelet_levels(), and rows.
Vector< T > & sopt::utilities::get_wavelet_high_low_pass | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | rows, | ||
const t_uint | cols | ||
) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level
Definition at line 149 of file wavelets.h.
References cols, get_wavelet_levels(), and rows.
Vector< T > & sopt::utilities::get_wavelet_high_pass_1d | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | size | ||
) |
return 1d high pass filter for a given level of a wavelet
Definition at line 116 of file wavelets.h.
References get_wavelet_levels(), and N.
Vector< T > & sopt::utilities::get_wavelet_levels | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | rows, | ||
const t_uint | cols | ||
) |
return wavelet basis coefficients for a given level and below (2d case)
Definition at line 121 of file wavelets.h.
Referenced by get_wavelet_high_high_pass(), get_wavelet_high_low_pass(), get_wavelet_high_pass_1d(), get_wavelet_low_high_pass(), and get_wavelet_low_low_pass().
Vector< T > & sopt::utilities::get_wavelet_low_high_pass | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | rows, | ||
const t_uint | cols | ||
) |
return wavelet basis coefficients low pass (rows) and high pass (cols) for a given level
Definition at line 129 of file wavelets.h.
References cols, get_wavelet_levels(), and rows.
Vector< T > & sopt::utilities::get_wavelet_low_low_pass | ( | Vector< T > & | coeffs, |
const t_uint | level, | ||
const t_uint | rows, | ||
const t_uint | cols | ||
) |
return wavelet basis coefficients high pass (rows) and high pass (cols) for a given level
Definition at line 159 of file wavelets.h.
References cols, get_wavelet_levels(), and rows.
std::vector<float> sopt::utilities::imageToFloat | ( | sopt::Vector< T > const & | image | ) |
Definition at line 67 of file utilities.h.
Referenced by sopt::ONNXDifferentiableFunc< SCALAR >::function(), and sopt::ONNXDifferentiableFunc< SCALAR >::gradient().
T sopt::utilities::lexical_cast | ( | const U & | in | ) |
Convert between any types via stringstream.
Definition at line 24 of file utilities.h.
sopt::Image sopt::utilities::read_tiff | ( | std::string const & | filename | ) |
Reads tiff image.
Definition at line 38 of file utilities.cc.
References SOPT_LOW_LOG, SOPT_MEDIUM_LOG, and SOPT_THROW.
Referenced by main(), and sopt::tools::read_standard_tiff().
std::vector<T> sopt::utilities::split | ( | std::string | s, |
const std::string & | sep | ||
) |
Split a string on a specified delimiter with optional cast to another type.
Definition at line 38 of file utilities.h.
void sopt::utilities::write_tiff | ( | Image<> const & | image, |
std::string const & | filename | ||
) |
Writes a tiff greyscale file.
Definition at line 68 of file utilities.cc.
References SOPT_LOW_LOG, SOPT_MEDIUM_LOG, SOPT_THROW, and SOPT_TRACE.
Referenced by main(), and TEST_CASE().