kmeans::ContourSegmenter Class Reference

Inheritance diagram for kmeans::ContourSegmenter:

kmeans::Segmenter List of all members.

Public Types

typedef Cluster< SingleFeatureRegionProperty
 The simplest region property is a cluster of a single feature.
typedef std::vector< int > Replacement
 Given a region with label i, Replacement[i] provides the new label, usually at a particular scale.

Public Member Functions

 ContourSegmenter (int min_val, int max_val, int increment, int sm_size=1)
 The minimum valid value, the maximum valid value and the width of each band.Typically, you want to pass in a smoothed image.
virtual LImage< int > segment (const LImage< int > &orig)
LImage< int > segment (const LImage< int > &orig) const
virtual ~ContourSegmenter ()

Static Public Member Functions

static void computeRegionProperty (const LImage< int > &orig, const LImage< int > &label, vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.
static void computeRegionProperty (const LImage< int > &label, vector< RegionProperty > *fillme)
 Fills in the passed in vector with a vector of computed region properties.

Static Protected Member Functions

static void expand_segment (int x, int y, const LImage< int > &orig, LImage< int > &segimg, int label)
 Set the segimg at x,y to be label and then call this function.
static LImage< int > relabel (const LImage< int > &label_img)
 Will relabel the image, removing unused labels.
static LImage< int > pruneRegions (const LImage< int > &label, RegionPruner &)
 This method removes all regions that meet certain criteria.

Static Protected Attributes

static const int Unset = -1000
static const int Invalid = -2000

Member Typedef Documentation

typedef Cluster< SingleFeature > kmeans::Segmenter::RegionProperty [inherited]

The simplest region property is a cluster of a single feature.

typedef std::vector<int> kmeans::Segmenter::Replacement [inherited]

Given a region with label i, Replacement[i] provides the new label, usually at a particular scale.

The Replacement structure is such that replacement[i] provides the replacement label for the current label i. This replacement may be 0 or negative, which means that no replacement exists.

Reimplemented in kmeans::MergingKMSegmenter< T >.


Constructor & Destructor Documentation

kmeans::ContourSegmenter::ContourSegmenter ( int  min_val,
int  max_val,
int  increment,
int  sm_size = 1 
)

The minimum valid value, the maximum valid value and the width of each band.Typically, you want to pass in a smoothed image.

The optional smoothing filter size sets the size of the rectangular filter to use in smoothing the image before contouring.

virtual kmeans::ContourSegmenter::~ContourSegmenter (  )  [inline, virtual]


Member Function Documentation

static void kmeans::Segmenter::computeRegionProperty ( const LImage< int > &  label,
vector< RegionProperty > *  fillme 
) [static, inherited]

Fills in the passed in vector with a vector of computed region properties.

The input label image should be a labeled image such as that returned by the segmenter. WARNING: The resulting properties will not have any of the value elements set because the original image was not passed in.

static void kmeans::Segmenter::computeRegionProperty ( const LImage< int > &  orig,
const LImage< int > &  label,
vector< RegionProperty > *  fillme 
) [static, inherited]

Fills in the passed in vector with a vector of computed region properties.

The input label image should be a labeled image such as that returned by the segmenter.

static void kmeans::Segmenter::expand_segment ( int  x,
int  y,
const LImage< int > &  orig,
LImage< int > &  segimg,
int  label 
) [static, protected, inherited]

Set the segimg at x,y to be label and then call this function.

It will expand out segimg to all contiguous values that match

static LImage<int> kmeans::Segmenter::pruneRegions ( const LImage< int > &  label,
RegionPruner  
) [static, protected, inherited]

This method removes all regions that meet certain criteria.

The function object RegionPruner should be provided to target the appropriate regions.

Usually, you'd want to relabel the image that you get after pruning.

static LImage<int> kmeans::Segmenter::relabel ( const LImage< int > &  label_img  )  [static, protected, inherited]

Will relabel the image, removing unused labels.

LImage<int> kmeans::ContourSegmenter::segment ( const LImage< int > &  orig  )  const [inline]

virtual LImage<int> kmeans::ContourSegmenter::segment ( const LImage< int > &  orig  )  [inline, virtual]

Implements kmeans::Segmenter.


Member Data Documentation

const int kmeans::Segmenter::Invalid = -2000 [static, protected, inherited]

const int kmeans::Segmenter::Unset = -1000 [static, protected, inherited]


Generated on Fri May 4 13:40:22 2012 for WDSS-IIw2algs by  doxygen 1.4.7