Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends
brip_watershed Class Reference

#include <brip_watershed.h>

Inheritance diagram for brip_watershed:
Inheritance graph
[legend]

List of all members.

Public Types

enum  label { UNLABELED = 0, BOUNDARY = 1 }

Public Member Functions

 brip_watershed (brip_watershed_params const &bwp)
 Constructors/destructor.
 ~brip_watershed ()
void set_image (vil1_memory_image_of< float > const &image)
 Accessors/Mutators.
unsigned int max_region_label () const
vil1_image overlay_image ()
vbl_array_2d< unsigned int > & region_label_array ()
bool adjacent_regions (const unsigned int region, vcl_vector< unsigned int > &adj_regs)
bool compute_regions ()
 Main process method.
void print_region_array ()
 Debug methods.
void print_adjacency_map ()
bool SanityCheck ()
 Checks that parameters are within acceptable bounds.

Static Public Member Functions

static unsigned int min_region_label ()

Public Attributes

float sigma_
 Standard deviation of the smoothing kernel.
float thresh_
 Threshold (min grad difference for a seed)
bool eight_connected_
 Neighborhood connectivity (8 vs 4)
bool verbose_
 output debug messages

Protected Member Functions

void print_neighborhood (int col, int row, unsigned int lab)
 internal methods.
bool add_adjacency (const unsigned int reg, const unsigned int adj_reg)
 add a region adjacency relation. Returns false if relation is already known.
bool compute_seeds ()
 Find points of local minima in gradient magnitude.
bool initialize_queue ()
 Initialize the priority queue from the seeds give each region a new label.
bool grow_regions ()
 Process the priority queue and grow regions.
 brip_watershed ()
 members.
void InitParams (float sigma, float thresh, bool eight_connected, bool verbose)

Protected Attributes

int width_
int height_
unsigned int max_region_label_
vbl_array_2d< unsigned int > region_label_array_
vil1_memory_image_of< float > image_
vil1_memory_image_of< float > gradient_mag_image_
vcl_priority_queue
< brip_region_pixel_sptr,
vcl_vector
< brip_region_pixel_sptr >
, brip_region_pixel::compare
priority_queue_
vcl_map< unsigned int,
vcl_vector< unsigned int > * > 
region_adjacency_

Friends

vcl_ostream & operator<< (vcl_ostream &, const brip_watershed_params &wp)

Detailed Description

Definition at line 40 of file brip_watershed.h.


Member Enumeration Documentation

Enumerator:
UNLABELED 
BOUNDARY 

Definition at line 43 of file brip_watershed.h.


Constructor & Destructor Documentation

brip_watershed::brip_watershed ( brip_watershed_params const &  bwp)

Constructors/destructor.

Definition at line 15 of file brip_watershed.cxx.

brip_watershed::~brip_watershed ( )

Definition at line 21 of file brip_watershed.cxx.

brip_watershed::brip_watershed ( ) [protected]

members.


Member Function Documentation

bool brip_watershed::add_adjacency ( const unsigned int  reg,
const unsigned int  adj_reg 
) [protected]

add a region adjacency relation. Returns false if relation is already known.

Definition at line 263 of file brip_watershed.cxx.

bool brip_watershed::adjacent_regions ( const unsigned int  region,
vcl_vector< unsigned int > &  adj_regs 
)

Definition at line 288 of file brip_watershed.cxx.

bool brip_watershed::compute_regions ( )

Main process method.

Definition at line 304 of file brip_watershed.cxx.

bool brip_watershed::compute_seeds ( ) [protected]

Find points of local minima in gradient magnitude.

Label these points as seeds.

Definition at line 115 of file brip_watershed.cxx.

bool brip_watershed::grow_regions ( ) [protected]

Process the priority queue and grow regions.

Definition at line 183 of file brip_watershed.cxx.

bool brip_watershed::initialize_queue ( ) [protected]

Initialize the priority queue from the seeds give each region a new label.

Definition at line 157 of file brip_watershed.cxx.

void brip_watershed_params::InitParams ( float  sigma,
float  thresh,
bool  eight_connected,
bool  verbose 
) [protected, inherited]

Definition at line 24 of file brip_watershed_params.cxx.

unsigned int brip_watershed::max_region_label ( ) const [inline]

Definition at line 50 of file brip_watershed.h.

static unsigned int brip_watershed::min_region_label ( ) [inline, static]

Definition at line 49 of file brip_watershed.h.

vil1_image brip_watershed::overlay_image ( )

Definition at line 328 of file brip_watershed.cxx.

void brip_watershed::print_adjacency_map ( )

Definition at line 72 of file brip_watershed.cxx.

void brip_watershed::print_neighborhood ( int  col,
int  row,
unsigned int  lab 
) [protected]

internal methods.

Definition at line 43 of file brip_watershed.cxx.

void brip_watershed::print_region_array ( )

Debug methods.

Print the region label array.

Definition at line 30 of file brip_watershed.cxx.

vbl_array_2d<unsigned int>& brip_watershed::region_label_array ( ) [inline]

Definition at line 52 of file brip_watershed.h.

bool brip_watershed_params::SanityCheck ( ) [inherited]

Checks that parameters are within acceptable bounds.

Definition at line 37 of file brip_watershed_params.cxx.

void brip_watershed::set_image ( vil1_memory_image_of< float > const &  image)

Accessors/Mutators.

Definition at line 89 of file brip_watershed.cxx.


Friends And Related Function Documentation

vcl_ostream& operator<< ( vcl_ostream &  os,
const brip_watershed_params wp 
) [friend, inherited]

Definition at line 59 of file brip_watershed_params.cxx.


Member Data Documentation

Neighborhood connectivity (8 vs 4)

Definition at line 38 of file brip_watershed_params.h.

vil1_memory_image_of<float> brip_watershed::gradient_mag_image_ [protected]

Definition at line 74 of file brip_watershed.h.

int brip_watershed::height_ [protected]

Definition at line 70 of file brip_watershed.h.

vil1_memory_image_of<float> brip_watershed::image_ [protected]

Definition at line 73 of file brip_watershed.h.

unsigned int brip_watershed::max_region_label_ [protected]

Definition at line 71 of file brip_watershed.h.

Definition at line 76 of file brip_watershed.h.

vcl_map<unsigned int, vcl_vector<unsigned int>* > brip_watershed::region_adjacency_ [protected]

Definition at line 77 of file brip_watershed.h.

Definition at line 72 of file brip_watershed.h.

float brip_watershed_params::sigma_ [inherited]

Standard deviation of the smoothing kernel.

Definition at line 36 of file brip_watershed_params.h.

float brip_watershed_params::thresh_ [inherited]

Threshold (min grad difference for a seed)

Definition at line 37 of file brip_watershed_params.h.

output debug messages

Definition at line 39 of file brip_watershed_params.h.

int brip_watershed::width_ [protected]

Definition at line 69 of file brip_watershed.h.


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