Wildmeshing Toolkit
|
#include <Image.hpp>
Public Member Functions | |
Image ()=default | |
Image (int height_, int width_) | |
ImageMatrixf & | ref_raw_image () |
const ImageMatrixf & | get_raw_image () const |
int | width () const |
int | height () const |
template<class T > | |
std::decay_t< T > | get (const T &u, const T &v) const |
float | get_pixel (const int i, const int j) const |
std::pair< int, int > | get_pixel_index (const double &u, const double &v) const |
int | get_coordinate (const int x, const WrappingMode mode) const |
WrappingMode | get_wrapping_mode_x () const |
WrappingMode | get_wrapping_mode_y () const |
bool | set (const std::function< float(const double &, const double &)> &f, const WrappingMode mode_x=WrappingMode::CLAMP_TO_EDGE, const WrappingMode mode_y=WrappingMode::CLAMP_TO_EDGE) |
bool | set (const int r, const int c, const float v) |
bool | save (const std::filesystem::path &path) const |
void | load (const std::filesystem::path &path, WrappingMode mode_x, WrappingMode mode_y) |
void | set_wrapping_mode (WrappingMode mode_x, WrappingMode mode_y) |
Image | down_sample () const |
Protected Attributes | |
ImageMatrixf | m_image |
WrappingMode | m_mode_x = WrappingMode::CLAMP_TO_EDGE |
WrappingMode | m_mode_y = WrappingMode::CLAMP_TO_EDGE |
Private Types | |
using | DScalar = DScalar2< double, Eigen::Matrix< double, -1, 1 >, Eigen::Matrix< double, -1, -1 > > |
using | ImageMatrixf = Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor|Eigen::AutoAlign > |
|
private |
|
private |
|
default |
|
inline |
Image wmtk::components::adaptive_tessellation::image::Image::down_sample | ( | ) | const |
std::decay_t< T > wmtk::components::adaptive_tessellation::image::Image::get | ( | const T & | u, |
const T & | v | ||
) | const |
p | coordinates between (0,1) |
Definition at line 72 of file Image.hpp.
References wmtk::components::adaptive_tessellation::image::eval_bicubic_coeffs(), wmtk::components::adaptive_tessellation::image::extract_samples(), wmtk::components::adaptive_tessellation::image::get_bicubic_matrix(), wmtk::components::adaptive_tessellation::image::get_value(), height(), m_image, m_mode_x, m_mode_y, and width().
int wmtk::components::adaptive_tessellation::image::Image::get_coordinate | ( | const int | x, |
const WrappingMode | mode | ||
) | const |
Definition at line 26 of file Image.cpp.
References wmtk::components::adaptive_tessellation::image::CLAMP_TO_EDGE, height(), wmtk::components::adaptive_tessellation::image::MIRROR_REPEAT, wmtk::components::adaptive_tessellation::image::REPEAT, and width().
|
inline |
std::pair< int, int > wmtk::components::adaptive_tessellation::image::Image::get_pixel_index | ( | const double & | u, |
const double & | v | ||
) | const |
|
inline |
Definition at line 34 of file Image.hpp.
References m_image.
Referenced by wmtk::components::adaptive_tessellation::image::SamplingBicubic::sample_T().
|
inline |
Definition at line 46 of file Image.hpp.
References m_mode_x.
Referenced by wmtk::components::adaptive_tessellation::image::SamplingBicubic::sample_T().
|
inline |
Definition at line 47 of file Image.hpp.
References m_mode_y.
Referenced by wmtk::components::adaptive_tessellation::image::SamplingBicubic::sample_T().
|
inline |
Definition at line 39 of file Image.hpp.
References m_image.
Referenced by down_sample(), get(), get_coordinate(), get_pixel_index(), wmtk::components::adaptive_tessellation::image::SamplingBicubic::sample_T(), wmtk::components::adaptive_tessellation::image::SamplingImage< Derived >::SamplingImage(), save(), and set().
void wmtk::components::adaptive_tessellation::image::Image::load | ( | const std::filesystem::path & | path, |
WrappingMode | mode_x, | ||
WrappingMode | mode_y | ||
) |
Definition at line 113 of file Image.cpp.
References wmtk::components::adaptive_tessellation::image::load_image_exr_red_channel(), wmtk::logger(), m_image, and set_wrapping_mode().
|
inline |
bool wmtk::components::adaptive_tessellation::image::Image::save | ( | const std::filesystem::path & | path | ) | const |
Definition at line 84 of file Image.cpp.
References height(), wmtk::logger(), m_image, wmtk::components::adaptive_tessellation::image::save_image_exr_red_channel(), and width().
|
inline |
bool wmtk::components::adaptive_tessellation::image::Image::set | ( | const std::function< float(const double &, const double &)> & | f, |
const WrappingMode | mode_x = WrappingMode::CLAMP_TO_EDGE , |
||
const WrappingMode | mode_y = WrappingMode::CLAMP_TO_EDGE |
||
) |
Definition at line 61 of file Image.cpp.
References height(), m_image, set_wrapping_mode(), and width().
Referenced by wmtk::components::adaptive_tessellation::image::buffer_to_image(), and down_sample().
|
inline |
|
inline |
Definition at line 38 of file Image.hpp.
References m_image.
Referenced by down_sample(), get(), get_coordinate(), get_pixel_index(), wmtk::components::adaptive_tessellation::image::SamplingBicubic::sample_T(), wmtk::components::adaptive_tessellation::image::SamplingImage< Derived >::SamplingImage(), save(), and set().
|
protected |
Definition at line 25 of file Image.hpp.
Referenced by down_sample(), get(), get_pixel(), get_raw_image(), height(), Image(), load(), ref_raw_image(), save(), set(), and width().
|
protected |
Definition at line 26 of file Image.hpp.
Referenced by get(), get_wrapping_mode_x(), and set_wrapping_mode().
|
protected |
Definition at line 27 of file Image.hpp.
Referenced by get(), get_wrapping_mode_y(), and set_wrapping_mode().