CppNCorr
C++ ncorr Digital Image Correlation engine
Loading...
Searching...
No Matches
ncorr::Image2D Class Referencefinal

#include <Image2D.h>

Public Types

enum class  StorageMode { FILE_PATH , IN_MEMORY_MAT , IN_MEMORY_GS }
 
typedef std::ptrdiff_t difference_type
 

Public Member Functions

 Image2D ()=default
 
 Image2D (const Image2D &)=default
 
 Image2D (Image2D &&) noexcept=default
 
Image2Doperator= (const Image2D &)=default
 
Image2Doperator= (Image2D &&)=default
 
 ~Image2D () noexcept=default
 
 Image2D (std::string filename)
 
 Image2D (const cv::Mat &mat, const std::string &name="in_memory")
 
 Image2D (cv::Mat &&mat, const std::string &name="in_memory")
 
 Image2D (const Array2D< double > &gs_array, const std::string &name="in_memory_gs")
 
 Image2D (Array2D< double > &&gs_array, const std::string &name="in_memory_gs")
 
std::string get_filename () const
 
Array2D< double > get_gs () const
 
cv::Mat get_mat () const
 
StorageMode get_storage_mode () const
 
bool is_in_memory () const
 
bool save_to_file (const std::string &filename) const
 

Static Public Member Functions

static Image2D load (std::ifstream &)
 
static Image2D from_mat (const cv::Mat &mat, const std::string &name="in_memory", const FilterConfig &filter_config=FilterConfig())
 
static Image2D from_file_filtered (const std::string &filename, const FilterConfig &filter_config)
 

Friends

std::ostream & operator<< (std::ostream &, const Image2D &)
 
void imshow (const Image2D &, difference_type delay)
 
bool isequal (const Image2D &, const Image2D &)
 
void save (const Image2D &, std::ofstream &)
 

Detailed Description

Definition at line 59 of file Image2D.h.

Member Typedef Documentation

◆ difference_type

typedef std::ptrdiff_t ncorr::Image2D::difference_type

Definition at line 61 of file Image2D.h.

Member Enumeration Documentation

◆ StorageMode

enum class ncorr::Image2D::StorageMode
strong
Enumerator
FILE_PATH 
IN_MEMORY_MAT 
IN_MEMORY_GS 

Definition at line 64 of file Image2D.h.

Constructor & Destructor Documentation

◆ Image2D() [1/8]

ncorr::Image2D::Image2D ( )
default

◆ Image2D() [2/8]

ncorr::Image2D::Image2D ( const Image2D )
default

◆ Image2D() [3/8]

ncorr::Image2D::Image2D ( Image2D &&  )
defaultnoexcept

◆ ~Image2D()

ncorr::Image2D::~Image2D ( )
defaultnoexcept

◆ Image2D() [4/8]

ncorr::Image2D::Image2D ( std::string  filename)
inline

Definition at line 80 of file Image2D.h.

◆ Image2D() [5/8]

ncorr::Image2D::Image2D ( const cv::Mat &  mat,
const std::string &  name = "in_memory" 
)
inline

Definition at line 85 of file Image2D.h.

◆ Image2D() [6/8]

ncorr::Image2D::Image2D ( cv::Mat &&  mat,
const std::string &  name = "in_memory" 
)
inline

Definition at line 91 of file Image2D.h.

◆ Image2D() [7/8]

ncorr::Image2D::Image2D ( const Array2D< double > &  gs_array,
const std::string &  name = "in_memory_gs" 
)
inline

Definition at line 97 of file Image2D.h.

◆ Image2D() [8/8]

ncorr::Image2D::Image2D ( Array2D< double > &&  gs_array,
const std::string &  name = "in_memory_gs" 
)
inline

Definition at line 103 of file Image2D.h.

Member Function Documentation

◆ from_file_filtered()

Image2D ncorr::Image2D::from_file_filtered ( const std::string &  filename,
const FilterConfig filter_config 
)
static

Definition at line 64 of file Image2D.cpp.

◆ from_mat()

Image2D ncorr::Image2D::from_mat ( const cv::Mat &  mat,
const std::string &  name = "in_memory",
const FilterConfig filter_config = FilterConfig() 
)
static

Definition at line 45 of file Image2D.cpp.

◆ get_filename()

std::string ncorr::Image2D::get_filename ( ) const
inline

Definition at line 127 of file Image2D.h.

◆ get_gs()

Array2D< double > ncorr::Image2D::get_gs ( ) const

Definition at line 134 of file Image2D.cpp.

◆ get_mat()

cv::Mat ncorr::Image2D::get_mat ( ) const

Definition at line 168 of file Image2D.cpp.

◆ get_storage_mode()

StorageMode ncorr::Image2D::get_storage_mode ( ) const
inline

Definition at line 130 of file Image2D.h.

◆ is_in_memory()

bool ncorr::Image2D::is_in_memory ( ) const
inline

Definition at line 131 of file Image2D.h.

◆ load()

Image2D ncorr::Image2D::load ( std::ifstream &  is)
static

Definition at line 25 of file Image2D.cpp.

◆ operator=() [1/2]

Image2D & ncorr::Image2D::operator= ( const Image2D )
default

◆ operator=() [2/2]

Image2D & ncorr::Image2D::operator= ( Image2D &&  )
default

◆ save_to_file()

bool ncorr::Image2D::save_to_file ( const std::string &  filename) const

Definition at line 189 of file Image2D.cpp.

Friends And Related Symbol Documentation

◆ imshow

void imshow ( const Image2D img,
Image2D::difference_type  delay 
)
friend

Definition at line 90 of file Image2D.cpp.

◆ isequal

bool isequal ( const Image2D img1,
const Image2D img2 
)
friend

Definition at line 94 of file Image2D.cpp.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Image2D img 
)
friend

Definition at line 80 of file Image2D.cpp.

◆ save

void save ( const Image2D img,
std::ofstream &  os 
)
friend

Definition at line 123 of file Image2D.cpp.


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