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

#include <ROI2D.h>

Classes

struct  region
 
struct  region_boundary
 
struct  region_nlinfo
 

Public Types

typedef std::ptrdiff_t difference_type
 
typedef std::pair< difference_type, difference_typecoords
 
typedef details::ROI2D_incrementor incrementor
 
typedef details::ROI2D_contig_subregion_generator contig_subregion_generator
 

Public Member Functions

 ROI2D ()
 
 ROI2D (const ROI2D &)=default
 
 ROI2D (ROI2D &&) noexcept=default
 
ROI2Doperator= (const ROI2D &)=default
 
ROI2Doperator= (ROI2D &&)=default
 
 ~ROI2D () noexcept=default
 
 ROI2D (Array2D< bool >, difference_type=0)
 
 ROI2D (region_nlinfo, difference_type, difference_type)
 
 ROI2D (region_boundary, difference_type, difference_type)
 
 ROI2D (std::vector< region_nlinfo >, difference_type, difference_type)
 
 ROI2D (std::vector< region_boundary >, difference_type, difference_type)
 
difference_type height () const
 
difference_type width () const
 
bool empty () const
 
bool in_bounds (difference_type p) const
 
bool in_bounds (difference_type p1, difference_type p2) const
 
bool operator() (difference_type p) const
 
bool operator() (difference_type p1, difference_type p2) const
 
const Array2D< bool > & get_mask () const
 
const region_nlinfoget_nlinfo (difference_type) const
 
const region_boundaryget_boundary (difference_type) const
 
difference_type get_points () const
 
difference_type size_regions () const
 
std::pair< difference_type, difference_typeget_region_idx (difference_type, difference_type) const
 
ROI2D reduce (difference_type) const
 
ROI2D form_union (const Array2D< bool > &) const
 
incrementor begin_inc () const
 
incrementor end_inc () const
 
contig_subregion_generator get_contig_subregion_generator (SUBREGION, difference_type) const
 
std::string size_string () const
 
std::string size_2D_string () const
 

Static Public Member Functions

static ROI2D simple_circle (difference_type)
 
static ROI2D simple_square (difference_type)
 
static ROI2D load (std::ifstream &)
 

Public Attributes

friend incrementor
 
friend contig_subregion_generator
 

Friends

std::ostream & operator<< (std::ostream &, const ROI2D &)
 
void imshow (const ROI2D &roi, difference_type delay=-1)
 
bool isequal (const ROI2D &, const ROI2D &)
 
void save (const ROI2D &, std::ofstream &)
 

Detailed Description

Definition at line 29 of file ROI2D.h.

Member Typedef Documentation

◆ contig_subregion_generator

◆ coords

Definition at line 32 of file ROI2D.h.

◆ difference_type

typedef std::ptrdiff_t ncorr::ROI2D::difference_type

Definition at line 31 of file ROI2D.h.

◆ incrementor

Definition at line 33 of file ROI2D.h.

Constructor & Destructor Documentation

◆ ROI2D() [1/8]

ncorr::ROI2D::ROI2D ( )
inline

Definition at line 44 of file ROI2D.h.

◆ ROI2D() [2/8]

ncorr::ROI2D::ROI2D ( const ROI2D )
default

◆ ROI2D() [3/8]

ncorr::ROI2D::ROI2D ( ROI2D &&  )
defaultnoexcept

◆ ~ROI2D()

ncorr::ROI2D::~ROI2D ( )
defaultnoexcept

◆ ROI2D() [4/8]

ncorr::ROI2D::ROI2D ( Array2D< bool >  mask,
difference_type  cutoff = 0 
)
explicit

Definition at line 13 of file ROI2D.cpp.

◆ ROI2D() [5/8]

ncorr::ROI2D::ROI2D ( region_nlinfo  nlinfo,
difference_type  h,
difference_type  w 
)

Definition at line 39 of file ROI2D.cpp.

◆ ROI2D() [6/8]

ncorr::ROI2D::ROI2D ( region_boundary  boundary,
difference_type  h,
difference_type  w 
)

Definition at line 53 of file ROI2D.cpp.

◆ ROI2D() [7/8]

ncorr::ROI2D::ROI2D ( std::vector< region_nlinfo nlinfos,
difference_type  h,
difference_type  w 
)

Definition at line 67 of file ROI2D.cpp.

◆ ROI2D() [8/8]

ncorr::ROI2D::ROI2D ( std::vector< region_boundary boundaries,
difference_type  h,
difference_type  w 
)

Definition at line 83 of file ROI2D.cpp.

Member Function Documentation

◆ begin_inc()

ROI2D::incrementor ncorr::ROI2D::begin_inc ( ) const

Definition at line 279 of file ROI2D.cpp.

◆ empty()

bool ncorr::ROI2D::empty ( ) const
inline

Definition at line 73 of file ROI2D.h.

◆ end_inc()

ROI2D::incrementor ncorr::ROI2D::end_inc ( ) const

Definition at line 283 of file ROI2D.cpp.

◆ form_union()

ROI2D ncorr::ROI2D::form_union ( const Array2D< bool > &  mask) const

Definition at line 258 of file ROI2D.cpp.

◆ get_boundary()

const ROI2D::region_boundary & ncorr::ROI2D::get_boundary ( difference_type  region_idx) const

Definition at line 204 of file ROI2D.cpp.

◆ get_contig_subregion_generator()

ROI2D::contig_subregion_generator ncorr::ROI2D::get_contig_subregion_generator ( SUBREGION  subregion_type,
difference_type  r 
) const

Definition at line 288 of file ROI2D.cpp.

◆ get_mask()

const Array2D< bool > & ncorr::ROI2D::get_mask ( ) const
inline

Definition at line 81 of file ROI2D.h.

◆ get_nlinfo()

const ROI2D::region_nlinfo & ncorr::ROI2D::get_nlinfo ( difference_type  region_idx) const

Definition at line 198 of file ROI2D.cpp.

◆ get_points()

difference_type ncorr::ROI2D::get_points ( ) const
inline

Definition at line 84 of file ROI2D.h.

◆ get_region_idx()

std::pair< ROI2D::difference_type, ROI2D::difference_type > ncorr::ROI2D::get_region_idx ( difference_type  p1,
difference_type  p2 
) const

Definition at line 210 of file ROI2D.cpp.

◆ height()

difference_type ncorr::ROI2D::height ( ) const
inline

Definition at line 71 of file ROI2D.h.

◆ in_bounds() [1/2]

bool ncorr::ROI2D::in_bounds ( difference_type  p) const
inline

Definition at line 74 of file ROI2D.h.

◆ in_bounds() [2/2]

bool ncorr::ROI2D::in_bounds ( difference_type  p1,
difference_type  p2 
) const
inline

Definition at line 75 of file ROI2D.h.

◆ load()

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

Definition at line 129 of file ROI2D.cpp.

◆ operator()() [1/2]

bool ncorr::ROI2D::operator() ( difference_type  p) const
inline

Definition at line 77 of file ROI2D.h.

◆ operator()() [2/2]

bool ncorr::ROI2D::operator() ( difference_type  p1,
difference_type  p2 
) const
inline

Definition at line 78 of file ROI2D.h.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ reduce()

ROI2D ncorr::ROI2D::reduce ( difference_type  scalefactor) const

Definition at line 238 of file ROI2D.cpp.

◆ simple_circle()

ROI2D ncorr::ROI2D::simple_circle ( difference_type  r)
static

Definition at line 106 of file ROI2D.cpp.

◆ simple_square()

ROI2D ncorr::ROI2D::simple_square ( difference_type  r)
static

Definition at line 123 of file ROI2D.cpp.

◆ size_2D_string()

std::string ncorr::ROI2D::size_2D_string ( ) const
inline

Definition at line 101 of file ROI2D.h.

◆ size_regions()

difference_type ncorr::ROI2D::size_regions ( ) const
inline

Definition at line 85 of file ROI2D.h.

◆ size_string()

std::string ncorr::ROI2D::size_string ( ) const
inline

Definition at line 100 of file ROI2D.h.

◆ width()

difference_type ncorr::ROI2D::width ( ) const
inline

Definition at line 72 of file ROI2D.h.

Friends And Related Symbol Documentation

◆ imshow

void imshow ( const ROI2D roi,
difference_type  delay = -1 
)
friend

Definition at line 65 of file ROI2D.h.

◆ isequal

bool isequal ( const ROI2D roi1,
const ROI2D roi2 
)
friend

Definition at line 164 of file ROI2D.cpp.

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const ROI2D roi 
)
friend

Definition at line 151 of file ROI2D.cpp.

◆ save

void save ( const ROI2D roi,
std::ofstream &  os 
)
friend

Definition at line 182 of file ROI2D.cpp.

Member Data Documentation

◆ contig_subregion_generator

Definition at line 41 of file ROI2D.h.

◆ incrementor

Definition at line 40 of file ROI2D.h.


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