#include <sdet_watershed_region_proc.h>
Public Types | |
enum | priority_code { DARK = 0, LIGHT, BIG, SMALL } |
Public Member Functions | |
sdet_watershed_region_proc (sdet_watershed_region_proc_params &wrpp) | |
constructor from a parameter block (the only way). | |
~sdet_watershed_region_proc () | |
Default Destructor. | |
void | set_image (vil1_image const &image, vsol_box_2d_sptr const &box=vsol_box_2d_sptr()) |
set image and potentially clip. | |
void | set_roi (brip_roi_sptr const &roi) |
set image roi. | |
brip_roi_sptr | roi () |
void | clip_image () |
clip image assuming image and roi are set. | |
vil1_memory_image_of< float > | image () const |
vil1_memory_image_of< float > | clip () const |
void | clear () |
Clear internal storage. | |
vcl_vector< sdet_region_sptr > & | regions () |
bool | extract_regions () |
extract a set of digital regions. | |
bool | merge_regions () |
vil1_image | get_residual_image () |
Use a linear approximation to intensity to predict region data. | |
void | print_region_info () |
vil1_image | overlay_image () |
vil1_image | region_image () |
vcl_vector< vsol_polygon_2d_sptr > | boundaries () |
bool | SanityCheck () |
Checks that parameters are within acceptable bounds. | |
Public Attributes | |
unsigned int | min_area_ |
minimum region area | |
float | merge_tol_ |
region merge tolerance | |
int | merge_priority_ |
order for region merge | |
bool | debug_ |
Carry out debug processing. | |
bool | verbose_ |
Print detailed output. | |
brip_watershed_params | wp_ |
params associated with step and fold detection | |
Protected Member Functions | |
void | chip_out_roi (vil1_image &image) |
void | scan_region_data (vbl_array_2d< unsigned int > const &lab_array) |
scan the region label array to fill region pixel data. | |
bool | add_adjacency (sdet_region_sptr const ®, sdet_region_sptr const &adj_reg) |
bool | remove_adjacencies (sdet_region_sptr const ®) |
bool | adjacent_regions (sdet_region_sptr const ®, vcl_vector< sdet_region_sptr > &adj_regs) |
bool | compute_region_image () |
void | compute_boundaries () |
void | InitParams (brip_watershed_params const &wp, bool verbose, bool debug, int min_area, float merge_tol, int merge_priority) |
Protected Attributes | |
int | x0_ |
int | y0_ |
int | xs_ |
int | ys_ |
bool | regions_valid_ |
bool | region_image_valid_ |
bool | boundaries_valid_ |
unsigned int | min_label_ |
unsigned int | max_label_ |
vil1_memory_image_of< float > | image_ |
vil1_memory_image_of< float > | clip_ |
brip_roi_sptr | roi_ |
vil1_image | overlay_image_ |
vil1_memory_image_of< unsigned char > | region_image_ |
vcl_vector< sdet_region_sptr > | regions_ |
vcl_map< sdet_region_sptr, vcl_vector< sdet_region_sptr > * > | region_adjacency_ |
vcl_vector< vsol_polygon_2d_sptr > | boundaries_ |
Definition at line 29 of file sdet_watershed_region_proc.h.
Definition at line 32 of file sdet_watershed_region_proc.h.
sdet_watershed_region_proc::sdet_watershed_region_proc | ( | sdet_watershed_region_proc_params & | wrpp | ) |
constructor from a parameter block (the only way).
Definition at line 51 of file sdet_watershed_region_proc.cxx.
sdet_watershed_region_proc::~sdet_watershed_region_proc | ( | ) |
Default Destructor.
Definition at line 62 of file sdet_watershed_region_proc.cxx.
bool sdet_watershed_region_proc::add_adjacency | ( | sdet_region_sptr const & | reg, |
sdet_region_sptr const & | adj_reg | ||
) | [protected] |
Definition at line 154 of file sdet_watershed_region_proc.cxx.
bool sdet_watershed_region_proc::adjacent_regions | ( | sdet_region_sptr const & | reg, |
vcl_vector< sdet_region_sptr > & | adj_regs | ||
) | [protected] |
Definition at line 193 of file sdet_watershed_region_proc.cxx.
vcl_vector< vsol_polygon_2d_sptr > sdet_watershed_region_proc::boundaries | ( | ) |
Definition at line 529 of file sdet_watershed_region_proc.cxx.
void sdet_watershed_region_proc::chip_out_roi | ( | vil1_image & | image | ) | [protected] |
void sdet_watershed_region_proc::clear | ( | ) |
Clear internal storage.
Definition at line 425 of file sdet_watershed_region_proc.cxx.
vil1_memory_image_of<float> sdet_watershed_region_proc::clip | ( | ) | const [inline] |
Definition at line 49 of file sdet_watershed_region_proc.h.
void sdet_watershed_region_proc::clip_image | ( | ) |
clip image assuming image and roi are set.
if an roi is defined then create a chip image and define the bounds.
Definition at line 70 of file sdet_watershed_region_proc.cxx.
void sdet_watershed_region_proc::compute_boundaries | ( | ) | [protected] |
Definition at line 516 of file sdet_watershed_region_proc.cxx.
bool sdet_watershed_region_proc::compute_region_image | ( | ) | [protected] |
Definition at line 485 of file sdet_watershed_region_proc.cxx.
bool sdet_watershed_region_proc::extract_regions | ( | ) |
extract a set of digital regions.
Definition at line 354 of file sdet_watershed_region_proc.cxx.
vil1_image sdet_watershed_region_proc::get_residual_image | ( | ) |
Use a linear approximation to intensity to predict region data.
Return the residual error
Definition at line 433 of file sdet_watershed_region_proc.cxx.
vil1_memory_image_of<float> sdet_watershed_region_proc::image | ( | ) | const [inline] |
Definition at line 48 of file sdet_watershed_region_proc.h.
void sdet_watershed_region_proc_params::InitParams | ( | brip_watershed_params const & | wp, |
bool | verbose, | ||
bool | debug, | ||
int | min_area, | ||
float | merge_tol, | ||
int | merge_priority | ||
) | [inline, protected, inherited] |
Definition at line 36 of file sdet_watershed_region_proc_params.h.
bool sdet_watershed_region_proc::merge_regions | ( | ) |
Definition at line 230 of file sdet_watershed_region_proc.cxx.
vil1_image sdet_watershed_region_proc::overlay_image | ( | ) | [inline] |
Definition at line 63 of file sdet_watershed_region_proc.h.
void sdet_watershed_region_proc::print_region_info | ( | ) |
Definition at line 468 of file sdet_watershed_region_proc.cxx.
vil1_image sdet_watershed_region_proc::region_image | ( | ) |
Definition at line 507 of file sdet_watershed_region_proc.cxx.
vcl_vector<sdet_region_sptr>& sdet_watershed_region_proc::regions | ( | ) | [inline] |
Definition at line 54 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc::remove_adjacencies | ( | sdet_region_sptr const & | reg | ) | [protected] |
Definition at line 180 of file sdet_watershed_region_proc.cxx.
brip_roi_sptr sdet_watershed_region_proc::roi | ( | ) | [inline] |
Definition at line 43 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc_params::SanityCheck | ( | ) | [inherited] |
Checks that parameters are within acceptable bounds.
Note that msg << ends seems to restart the string and erase the previous string. We should only use it as the last call, use vcl_endl otherwise.
Definition at line 17 of file sdet_watershed_region_proc_params.cxx.
void sdet_watershed_region_proc::scan_region_data | ( | vbl_array_2d< unsigned int > const & | lab_array | ) | [protected] |
scan the region label array to fill region pixel data.
Definition at line 108 of file sdet_watershed_region_proc.cxx.
void sdet_watershed_region_proc::set_image | ( | vil1_image const & | image, |
vsol_box_2d_sptr const & | box = vsol_box_2d_sptr() |
||
) |
set image and potentially clip.
Set the image to be processed.
Definition at line 82 of file sdet_watershed_region_proc.cxx.
void sdet_watershed_region_proc::set_roi | ( | brip_roi_sptr const & | roi | ) |
set image roi.
vcl_vector<vsol_polygon_2d_sptr> sdet_watershed_region_proc::boundaries_ [protected] |
Definition at line 95 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc::boundaries_valid_ [protected] |
Definition at line 85 of file sdet_watershed_region_proc.h.
vil1_memory_image_of<float> sdet_watershed_region_proc::clip_ [protected] |
Definition at line 89 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc_params::debug_ [inherited] |
Carry out debug processing.
Definition at line 48 of file sdet_watershed_region_proc_params.h.
vil1_memory_image_of<float> sdet_watershed_region_proc::image_ [protected] |
Definition at line 88 of file sdet_watershed_region_proc.h.
unsigned int sdet_watershed_region_proc::max_label_ [protected] |
Definition at line 87 of file sdet_watershed_region_proc.h.
int sdet_watershed_region_proc_params::merge_priority_ [inherited] |
order for region merge
Definition at line 47 of file sdet_watershed_region_proc_params.h.
float sdet_watershed_region_proc_params::merge_tol_ [inherited] |
region merge tolerance
Definition at line 46 of file sdet_watershed_region_proc_params.h.
unsigned int sdet_watershed_region_proc_params::min_area_ [inherited] |
minimum region area
Definition at line 45 of file sdet_watershed_region_proc_params.h.
unsigned int sdet_watershed_region_proc::min_label_ [protected] |
Definition at line 86 of file sdet_watershed_region_proc.h.
vil1_image sdet_watershed_region_proc::overlay_image_ [protected] |
Definition at line 91 of file sdet_watershed_region_proc.h.
vcl_map<sdet_region_sptr, vcl_vector<sdet_region_sptr>* > sdet_watershed_region_proc::region_adjacency_ [protected] |
Definition at line 94 of file sdet_watershed_region_proc.h.
vil1_memory_image_of<unsigned char> sdet_watershed_region_proc::region_image_ [protected] |
Definition at line 92 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc::region_image_valid_ [protected] |
Definition at line 84 of file sdet_watershed_region_proc.h.
vcl_vector<sdet_region_sptr> sdet_watershed_region_proc::regions_ [protected] |
Definition at line 93 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc::regions_valid_ [protected] |
Definition at line 83 of file sdet_watershed_region_proc.h.
brip_roi_sptr sdet_watershed_region_proc::roi_ [protected] |
Definition at line 90 of file sdet_watershed_region_proc.h.
bool sdet_watershed_region_proc_params::verbose_ [inherited] |
Print detailed output.
Definition at line 49 of file sdet_watershed_region_proc_params.h.
params associated with step and fold detection
Definition at line 50 of file sdet_watershed_region_proc_params.h.
int sdet_watershed_region_proc::x0_ [protected] |
Definition at line 79 of file sdet_watershed_region_proc.h.
int sdet_watershed_region_proc::xs_ [protected] |
Definition at line 81 of file sdet_watershed_region_proc.h.
int sdet_watershed_region_proc::y0_ [protected] |
Definition at line 80 of file sdet_watershed_region_proc.h.
int sdet_watershed_region_proc::ys_ [protected] |
Definition at line 82 of file sdet_watershed_region_proc.h.