Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::MaxSumPathFunction< C, D > Class Template Reference

#include <MaxSumPathFunction.hpp>

Inheritance diagram for Bial::MaxSumPathFunction< C, D >:
Inheritance graph
Collaboration diagram for Bial::MaxSumPathFunction< C, D >:
Collaboration graph

Public Member Functions

 MaxSumPathFunction (const C< D > &new_intensity, const C< D > &handicap, double new_alpha=0.0, double new_beta=0.5)
 Basic constructor. More...
 
 MaxSumPathFunction (const MaxSumPathFunction< C, D > &pf)
 Copy constructor. More...
 
 ~MaxSumPathFunction ()
 Destructor. More...
 
MaxSumPathFunction< C, D > operator= (const MaxSumPathFunction< C, D > &pf)
 Assignment operator. More...
 
void Initialize (C< D > &init_value, C< int > *init_label, C< int > *init_predecessor, bool sequential_label)
 Initializes object attributes. More...
 
bool RemoveSimple (size_t index, BucketState state)
 Sets initial value for root pixel of index 'index'. More...
 
bool RemoveLabel (size_t index, BucketState state)
 Sets initial value for root pixel of index 'index'. Also sets its label value. More...
 
bool Capable (int index, int adj_index, BucketState adj_state)
 Checks if index can offer better value to adj_index, prior to computing it by Propagate function. This function makes IFT faster. More...
 
bool Propagate (int index, int adj_index)
 Updates adjacent pixel values and returns true if path_function is propagated. More...
 
bool Increasing ()
 Returns whether this path function uses increasing or decreasing values. More...
 
- Public Member Functions inherited from Bial::PathFunction< C, D >
 PathFunction ()
 Basic constructor. More...
 
 PathFunction (const PathFunction< C, D > &pf)
 Copy constructor. More...
 
virtual ~PathFunction ()
 Virtual destructor required for virtual classes. More...
 
void UpdateCompleteData (size_t index, size_t adj_index)
 Updates value, label, and predecessor images of index adj_index according to 'index' and value. One of these functions will be used depending on the chosen resultant images. More...
 
void UpdatePredecessorData (size_t index, size_t adj_index)
 
void UpdateLabelData (size_t index, size_t adj_index)
 
void UpdateSimpleData (size_t index, size_t adj_index)
 
PathFunction< C, D >::RemoveFn RemoveFunction ()
 Returns a root initialization function that will be used depending on used maps. More...
 
PathFunction< C, D >::UpdateFn UpdateFunction ()
 Returns an update function that will be used depending on used maps. More...
 

Protected Attributes

const C< D > & intensity
 Reference to source image. More...
 
C< D > handicap
 Handicap container (Vector, Matrix, Image, etc). More...
 
double alpha
 Orientation weight. -1.0 to 1.0. (negative) for dark objects, (positive) for light objects, (zero) for non-oriented edges. Default value is 0.0. More...
 
double beta
 Weight to control behavior between sum and max path functions. Lower: more similar to sum. Higher: more similar to max. Default value = 0.5. More...
 
- Protected Attributes inherited from Bial::PathFunction< C, D >
C< D > * value
 Pointer to value container (Vector, Matrix, Image, etc). More...
 
C< int > * label
 Pointer to label container (Vector, Matrix, Image, etc). More...
 
C< int > * predecessor
 Pointer to predecessor container (Vector, Matrix, Image, etc). More...
 
int next_label
 

Additional Inherited Members

- Public Types inherited from Bial::PathFunction< C, D >
typedef bool(PathFunction< C, D >::* RemoveFn) (size_t index, BucketState state)
 Initialization functions of IFT. It will operate on valid maps among value, label, predecessor, and. More...
 
typedef void(PathFunction< C, D >::* UpdateFn) (size_t index, size_t adj_index)
 Update functions of IFT. It will operate on valid maps among value, label, and predecessor. More...
 

Detailed Description

template<template< class D > class C, class D>
class Bial::MaxSumPathFunction< C, D >

Definition at line 22 of file MaxSumPathFunction.hpp.

Constructor & Destructor Documentation

template<template< class D > class C, class D>
Bial::MaxSumPathFunction< C, D >::MaxSumPathFunction ( const C< D > &  new_intensity,
const C< D > &  handicap,
double  new_alpha = 0.0,
double  new_beta = 0.5 
)

Basic constructor.

Date
2015/Jun/24
Parameters
new_intensitySource image intensity. Value image is a gradient.
new_alphaAlpha weight to orient the edges.
new_betaweight of the sum funtion. Closer to 0 is more similar to sum path function. Higher values is closer to max path function.
Returns
none.
Warning
none.
template<template< class D > class C, class D>
Bial::MaxSumPathFunction< C, D >::MaxSumPathFunction ( const MaxSumPathFunction< C, D > &  pf)

Copy constructor.

Date
2015/Jun/24
Parameters
pfpath-function to be copied.
Returns
none.
Warning
none.
template<template< class D > class C, class D>
Bial::MaxSumPathFunction< C, D >::~MaxSumPathFunction ( )

Destructor.

Date
2015/Jun/24
Parameters
none.
Returns
none.
Warning
none.

Member Function Documentation

template<template< class D > class C, class D>
bool Bial::MaxSumPathFunction< C, D >::Capable ( int  index,
int  adj_index,
BucketState  adj_state 
)
virtual

Checks if index can offer better value to adj_index, prior to computing it by Propagate function. This function makes IFT faster.

Date
2015/Jun/24
Parameters
sourceSource pixel index.
targetAdjacent pixel index.
Returns
True if it is possible to propagate.
Warning
none.

Implements Bial::PathFunction< C, D >.

template<template< class D > class C, class D>
bool Bial::MaxSumPathFunction< C, D >::Increasing ( )
virtual

Returns whether this path function uses increasing or decreasing values.

Date
2015/Jun/24
Parameters
none.
Returns
True for increasing and false for decreasing values.
Warning
none.

Implements Bial::PathFunction< C, D >.

template<template< class D > class C, class D>
void Bial::MaxSumPathFunction< C, D >::Initialize ( C< D > &  init_value,
C< int > *  init_label,
C< int > *  init_predecessor,
bool  sequential_label 
)
virtual

Initializes object attributes.

Date
2015/Jun/24
Parameters
init_valueReference for initial value container.
init_labelReference for initial label container.
init_predecessorReference for predecessor container.
sequential_labelSets labeling sequentially.
Returns
none.
Warning
This function is called automatically by IFT constructor.

Reimplemented from Bial::PathFunction< C, D >.

template<template< class D > class C, class D>
MaxSumPathFunction< C, D > Bial::MaxSumPathFunction< C, D >::operator= ( const MaxSumPathFunction< C, D > &  pf)

Assignment operator.

Date
2015/Jun/24
Parameters
pfpath-function to be assigned.
Returns
none.
Warning
none.
template<template< class D > class C, class D>
bool Bial::MaxSumPathFunction< C, D >::Propagate ( int  index,
int  adj_index 
)
virtual

Updates adjacent pixel values and returns true if path_function is propagated.

Date
2015/Jun/24
Parameters
sourceSource pixel index.
targetAdjacent pixel index.
Returns
True if path-value is propagated.
Warning
none.

Implements Bial::PathFunction< C, D >.

template<template< class D > class C, class D>
bool Bial::MaxSumPathFunction< C, D >::RemoveLabel ( size_t  index,
BucketState  state 
)
virtual

Sets initial value for root pixel of index 'index'. Also sets its label value.

Date
2015/Jun/24
Parameters
indexThe index of the pixel to be initalized.
Returns
Whether this node can propagate or not.
Warning
none.

Implements Bial::PathFunction< C, D >.

template<template< class D > class C, class D>
bool Bial::MaxSumPathFunction< C, D >::RemoveSimple ( size_t  index,
BucketState  state 
)
virtual

Sets initial value for root pixel of index 'index'.

Date
2015/Jun/24
Parameters
indexThe index of the pixel to be initalized.
Returns
Whether this node can propagate or not.
Warning
none.

Implements Bial::PathFunction< C, D >.

Member Data Documentation

template<template< class D > class C, class D>
double Bial::MaxSumPathFunction< C, D >::alpha
protected

Orientation weight. -1.0 to 1.0. (negative) for dark objects, (positive) for light objects, (zero) for non-oriented edges. Default value is 0.0.

Definition at line 39 of file MaxSumPathFunction.hpp.

template<template< class D > class C, class D>
double Bial::MaxSumPathFunction< C, D >::beta
protected

Weight to control behavior between sum and max path functions. Lower: more similar to sum. Higher: more similar to max. Default value = 0.5.

Definition at line 45 of file MaxSumPathFunction.hpp.

template<template< class D > class C, class D>
C< D > Bial::MaxSumPathFunction< C, D >::handicap
protected

Handicap container (Vector, Matrix, Image, etc).

Definition at line 33 of file MaxSumPathFunction.hpp.

template<template< class D > class C, class D>
const C< D >& Bial::MaxSumPathFunction< C, D >::intensity
protected

Reference to source image.

Definition at line 28 of file MaxSumPathFunction.hpp.


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