#include <brip_roi.h>

Public Member Functions | |
| brip_roi (const unsigned n_image_cols=0, const unsigned n_image_rows=0) | |
| should initialize with image bounds on construction. | |
| brip_roi (brip_roi const &r) | |
| brip_roi (brip_roi const &roi, const float delta) | |
| expand (or contract) each region of the roi by delta, creating a new roi. | |
| ~brip_roi () | |
| void | set_image_bounds (const int n_image_cols, const int n_image_rows) |
| replace existing image bounds. | |
| void | add_region (const int x0, const int y0, const int xs, const int ys) |
| roi from origin and size. | |
| void | add_region (const int xc, const int yc, const int radius) |
| roi from center and radius. | |
| void | add_region (vsol_box_2d_sptr const &box) |
| roi from box. | |
| vsol_box_2d_sptr | clip_to_image_bounds (vsol_box_2d_sptr box) |
| useful for inserting a new region, doesn't affect existing image bounds. | |
| void | clip_to_image_bounds () |
| clips all existing regions, doesn't affect existing image bounds. | |
| bool | empty () const |
| unsigned int | n_regions () const |
| int | cmin (const unsigned i) const |
| column minimum for region_i | |
| int | cmax (const unsigned i) const |
| column maximum for region_i | |
| int | rmin (const unsigned i) const |
| row minimum for region_i | |
| int | rmax (const unsigned i) const |
| row maximum for region_i | |
| unsigned | csize (const unsigned i) const |
| number of cols for region_i | |
| unsigned | rsize (const unsigned i) const |
| number of rows for region_i | |
| unsigned | ic (int local_col, unsigned i=0) const |
| image column and row coordinates from local roi coordinates for region i. | |
| unsigned | ir (int local_row, unsigned i=0) const |
| unsigned | lc (unsigned global_col, unsigned i=0) const |
| local roi column and row coordinates from global image coordinates for region i. | |
| unsigned | lr (unsigned global_row, unsigned i=0) const |
| vsol_box_2d_sptr | region (unsigned i) const |
| bool | remove_region (unsigned i) |
| void | ref () |
| void | unref () |
| int | get_references () const |
| bool | is_referenced () const |
Protected Attributes | |
| unsigned | n_image_cols_ |
| unsigned | n_image_rows_ |
| vcl_vector< vsol_box_2d_sptr > | regions_ |
Definition at line 26 of file brip_roi.h.
| brip_roi::brip_roi | ( | const unsigned | n_image_cols = 0, |
| const unsigned | n_image_rows = 0 |
||
| ) |
should initialize with image bounds on construction.
Definition at line 9 of file brip_roi.cxx.
| brip_roi::brip_roi | ( | brip_roi const & | r | ) | [inline] |
Definition at line 31 of file brip_roi.h.
| brip_roi::brip_roi | ( | brip_roi const & | roi, |
| const float | delta | ||
| ) |
expand (or contract) each region of the roi by delta, creating a new roi.
Definition at line 23 of file brip_roi.cxx.
| brip_roi::~brip_roi | ( | ) | [inline] |
Definition at line 38 of file brip_roi.h.
| void brip_roi::add_region | ( | const int | x0, |
| const int | y0, | ||
| const int | xs, | ||
| const int | ys | ||
| ) |
roi from origin and size.
Definition at line 84 of file brip_roi.cxx.
| void brip_roi::add_region | ( | const int | xc, |
| const int | yc, | ||
| const int | radius | ||
| ) |
roi from center and radius.
Definition at line 102 of file brip_roi.cxx.
| void brip_roi::add_region | ( | vsol_box_2d_sptr const & | box | ) |
roi from box.
Definition at line 120 of file brip_roi.cxx.
| vsol_box_2d_sptr brip_roi::clip_to_image_bounds | ( | vsol_box_2d_sptr | box | ) |
useful for inserting a new region, doesn't affect existing image bounds.
Definition at line 53 of file brip_roi.cxx.
| void brip_roi::clip_to_image_bounds | ( | ) |
clips all existing regions, doesn't affect existing image bounds.
Definition at line 145 of file brip_roi.cxx.
| int brip_roi::cmax | ( | const unsigned | i | ) | const |
column maximum for region_i
Definition at line 159 of file brip_roi.cxx.
| int brip_roi::cmin | ( | const unsigned | i | ) | const |
column minimum for region_i
Definition at line 154 of file brip_roi.cxx.
| unsigned brip_roi::csize | ( | const unsigned | i | ) | const |
number of cols for region_i
Definition at line 174 of file brip_roi.cxx.
| bool brip_roi::empty | ( | ) | const |
Definition at line 134 of file brip_roi.cxx.
| unsigned brip_roi::ic | ( | int | local_col, |
| unsigned | i = 0 |
||
| ) | const |
image column and row coordinates from local roi coordinates for region i.
Definition at line 186 of file brip_roi.cxx.
| unsigned brip_roi::ir | ( | int | local_row, |
| unsigned | i = 0 |
||
| ) | const |
Definition at line 192 of file brip_roi.cxx.
| unsigned brip_roi::lc | ( | unsigned | global_col, |
| unsigned | i = 0 |
||
| ) | const |
local roi column and row coordinates from global image coordinates for region i.
Definition at line 198 of file brip_roi.cxx.
| unsigned brip_roi::lr | ( | unsigned | global_row, |
| unsigned | i = 0 |
||
| ) | const |
Definition at line 204 of file brip_roi.cxx.
| unsigned int brip_roi::n_regions | ( | ) | const [inline] |
Definition at line 55 of file brip_roi.h.
| vsol_box_2d_sptr brip_roi::region | ( | unsigned | i | ) | const [inline] |
Definition at line 71 of file brip_roi.h.
| bool brip_roi::remove_region | ( | unsigned | i | ) |
Definition at line 210 of file brip_roi.cxx.
| int brip_roi::rmax | ( | const unsigned | i | ) | const |
row maximum for region_i
Definition at line 169 of file brip_roi.cxx.
| int brip_roi::rmin | ( | const unsigned | i | ) | const |
row minimum for region_i
Definition at line 164 of file brip_roi.cxx.
| unsigned brip_roi::rsize | ( | const unsigned | i | ) | const |
number of rows for region_i
Definition at line 180 of file brip_roi.cxx.
| void brip_roi::set_image_bounds | ( | const int | n_image_cols, |
| const int | n_image_rows | ||
| ) |
replace existing image bounds.
Definition at line 15 of file brip_roi.cxx.
unsigned brip_roi::n_image_cols_ [protected] |
Definition at line 75 of file brip_roi.h.
unsigned brip_roi::n_image_rows_ [protected] |
Definition at line 76 of file brip_roi.h.
vcl_vector<vsol_box_2d_sptr> brip_roi::regions_ [protected] |
Definition at line 77 of file brip_roi.h.
1.7.5.1