Generic box class: site set containing points of a regular grid. More...
#include <box.hh>

Public Types | |
| enum | |
Dimension. More... | |
| typedef box_bkd_piter_< P > | bkd_piter | 
| Backward Site_Iterator associated type.   | |
| typedef P | element | 
| Element associated type.   | |
| typedef box_fwd_piter_< P > | fwd_piter | 
| Forward Site_Iterator associated type.   | |
| typedef fwd_piter | piter | 
| Site_Iterator associated type.   | |
| typedef P | psite | 
| Psite associated type.   | |
| typedef P | site | 
| Site associated type.   | |
Public Member Functions | |
| const box< P > & | bbox () const | 
| Give the bounding box of this site set.   | |
| box () | |
| Constructor without argument.   | |
| box (const site &pmin, const site &pmax) | |
Constructor of a box going from pmin to pmax.   | |
| void | crop_wrt (const box< P > &b) | 
Crop this bbox in order to fit in the reference box b.   | |
| void | enlarge (unsigned b) | 
Enlarge the box with a border b.   | |
| void | enlarge (unsigned dim, unsigned b) | 
Enlarge the box with a border b for dimension dim.   | |
| bool | has (const P &p) const | 
Test if p belongs to the box.   | |
| bool | is_empty () const | 
| Test if this box is empty.   | |
| bool | is_valid () const | 
| Test that the box owns valid data, i.e., is initialized and with pmin being 'less-than' pmax.   | |
| unsigned | len (unsigned i) const | 
Give the length of the i-th side of the box.   | |
| std::size_t | memory_size () const | 
| Return the size of this site set in memory.   | |
| void | merge (const box< P > &b) | 
| Merge inplace with another box.   | |
| unsigned | nsites () const | 
| Give the number of sites of this box.   | |
| P | pcenter () const | 
| Return the approximated central site of this box.   | |
| P & | pmax () | 
| Reference to the maximum point.   | |
| P | pmax () const | 
| Maximum point.   | |
| P | pmin () const | 
| Minimum point.   | |
| P & | pmin () | 
| Reference to the minimum point.   | |
| box< P > | to_larger (unsigned b) const | 
| Give a larger box.   | |
| box (typename P::coord ninds) | |
Related Functions | |
(Note that these are not member functions.)  | |
| template<typename P > | |
| std::ostream & | operator<< (std::ostream &ostr, const box< P > &b) | 
Print a generic box b into the output stream ostr.   | |
Generic box class: site set containing points of a regular grid.
Parameter P is the corresponding type of point. 
Definition at line 81 of file core/site_set/box.hh.
Backward Site_Iterator associated type.
Definition at line 105 of file core/site_set/box.hh.
Element associated type.
Definition at line 90 of file core/site_set/box.hh.
Forward Site_Iterator associated type.
Definition at line 99 of file core/site_set/box.hh.
Site_Iterator associated type.
Definition at line 102 of file core/site_set/box.hh.
Psite associated type.
Definition at line 93 of file core/site_set/box.hh.
Site associated type.
Definition at line 96 of file core/site_set/box.hh.
| anonymous enum | 
Dimension.
Definition at line 87 of file core/site_set/box.hh.
Constructor without argument.
Definition at line 275 of file core/site_set/box.hh.
Constructor of a box going from pmin to pmax. 
Definition at line 284 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Constructors with different numbers of arguments (sizes) w.r.t. the dimension.
Definition at line 293 of file core/site_set/box.hh.
References mln::literal::origin.
Give the bounding box of this site set.
Return the bounding box of this site set, so that is itself. This method is declared by the mln::Site_Set concept.
Crop this bbox in order to fit in the reference box b. 
Definition at line 205 of file core/site_set/box.hh.
References mln::box< P >::pmax(), and mln::box< P >::pmin().
Referenced by mln::debug::draw_graph(), and mln::make_debug_graph_image().
| void mln::box< P >::enlarge | ( | unsigned | b | ) |  [inline] | 
        
Enlarge the box with a border b. 
Definition at line 337 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Referenced by mln::registration::icp().
| void mln::box< P >::enlarge | ( | unsigned | dim, | |
| unsigned | b | |||
| ) |  [inline] | 
        
Enlarge the box with a border b for dimension dim. 
Definition at line 351 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
| bool mln::box< P >::has | ( | const P & | p | ) |  const [inline] | 
        
Test if p belongs to the box. 
| [in] | p | A point site. | 
Definition at line 325 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Referenced by mln::morpho::line_gradient().
| bool mln::box< P >::is_valid | ( | ) |  const [inline] | 
        
Test that the box owns valid data, i.e., is initialized and with pmin being 'less-than' pmax.
Definition at line 195 of file core/site_set/box.hh.
References mln::util::ord_weak().
Referenced by mln::box< P >::box(), mln::transform::distance_and_closest_point_geodesic(), mln::box< P >::enlarge(), mln::box< P >::has(), mln::box< P >::merge(), mln::box< P >::pcenter(), mln::box< P >::pmax(), mln::box< P >::pmin(), and mln::box< P >::to_larger().
Give the length of the i-th side of the box. 
| std::size_t mln::box< P >::memory_size | ( | ) |  const [inline] | 
        
Return the size of this site set in memory.
Definition at line 407 of file core/site_set/box.hh.
Merge inplace with another box.
Definition at line 221 of file core/site_set/box.hh.
References mln::box< P >::is_valid(), mln::box< P >::pmax(), and mln::box< P >::pmin().
Give the number of sites of this box.
Return the number of sites of this box. This method is declared by the mln::Site_Set concept.
| P mln::box< P >::pcenter | ( | ) |  const [inline] | 
        
Return the approximated central site of this box.
Definition at line 395 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
| P mln::box< P >::pmax | ( | ) |  const [inline] | 
        
Maximum point.
Definition at line 259 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Referenced by mln::box< P >::crop_wrt(), mln::make::image3d(), mln::larger_than(), mln::io::fld::load(), and mln::box< P >::merge().
| P & mln::box< P >::pmax | ( | ) |  [inline] | 
        
Reference to the maximum point.
Definition at line 268 of file core/site_set/box.hh.
| P & mln::box< P >::pmin | ( | ) |  [inline] | 
        
Reference to the minimum point.
Definition at line 251 of file core/site_set/box.hh.
| P mln::box< P >::pmin | ( | ) |  const [inline] | 
        
Minimum point.
Definition at line 242 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
Referenced by mln::box< P >::crop_wrt(), mln::make::image3d(), mln::larger_than(), mln::io::fld::load(), and mln::box< P >::merge().
Give a larger box.
Definition at line 378 of file core/site_set/box.hh.
References mln::box< P >::is_valid().
| std::ostream & operator<< | ( | std::ostream & | ostr, | |
| const box< P > & | b | |||
| ) |  [related] | 
        
Print a generic box b into the output stream ostr. 
| [in,out] | ostr | An output stream. | 
| [in] | b | A generic box. | 
ostr.Definition at line 414 of file core/site_set/box.hh.
 1.7.1