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

#include <Graph.hpp>

Inheritance diagram for Bial::Graph< GRAPH_ADJACENCY >:
Inheritance graph
Collaboration diagram for Bial::Graph< GRAPH_ADJACENCY >:
Collaboration graph

Public Member Functions

size_t MaxSamples () const
 Returns the maximum number of samples of the derived class. More...
 
template<class D >
void Initialize (const Feature< D > &feature, float scl_min, float scl_max)
 Initializes the object. More...
 
size_t Scales () const
 Returns the number of different scales. More...
 
size_t Samples () const
 Returns the number of nodes. More...
 
Vector< int > & Label ()
 Returns a reference to label. More...
 
const Vector< int > & Label () const
 Returns a reference to label. More...
 
double PDF (size_t scl)
 Computes PDF for spectral domain. More...
 
size_t Clustering (size_t scl)
 Computes cluster labels for spectral domain. More...
 
double NormalizedCut (size_t spl) const
 Computes the normalized cut of the graph labeled with chosen scale. More...
 
Vector< double > SampleNormalizedCut (const Vector< int > &label, size_t scl) const
 Computes the normalized cut of each example of the graph labeled with given scale. More...
 
void SetCut (size_t scl)
 Computes the normalized cut of each example of the graph labeled with chosen scale and assigns to the initial cut. More...
 
template<class D >
void PropagateLabel (Feature< D > &feature, size_t scl) const
 Propagates labels from subsample to samples. Just an interface to call multi-thread, GPU based or other more specialized methods. More...
 
template<class D >
void PropagateLabelThread (Feature< D > &feature, size_t scl, size_t thread, size_t total_threads) const
 Propagates labels from subsample to samples. More...
 
template<class D >
void GnuPlot2DScatter (const std::string &basename, const Feature< D > &feat, size_t scale, size_t x=0, size_t y=1)
 Plots 2D scatter from x and y features from given graph. Colors are labels and size are densities. More...
 

Protected Attributes

Sample sample
 
Vector< double > density
 
Vector< double > cut
 
Vector< size_t > ordered
 
Vector< int > label
 
GRAPH_ADJACENCY adjacency
 

Detailed Description

template<class GRAPH_ADJACENCY>
class Bial::Graph< GRAPH_ADJACENCY >

Definition at line 25 of file Graph.hpp.

Member Function Documentation

template<class GRAPH_ADJACENCY >
size_t Bial::Graph< GRAPH_ADJACENCY >::Clustering ( size_t  scl)

Computes cluster labels for spectral domain.

Date
2014/Nov/14
Parameters
sclNumber of scale element.
Returns
The number of clusters.
Warning
none.
template<class GRAPH_ADJACENCY >
template<class D >
void Bial::Graph< GRAPH_ADJACENCY >::GnuPlot2DScatter ( const std::string &  basename,
const Feature< D > &  feat,
size_t  scale,
size_t  x = 0,
size_t  y = 1 
)

Plots 2D scatter from x and y features from given graph. Colors are labels and size are densities.

Date
2015/Jan/12
Parameters
basenameFile basename. A txt file for dots and a gnp file for gnuplot instructions.
featA feature vecture from which two features will be plotted.
scaleThe scale of the plotting.
x,yThe number of the features that will be plotted.
Returns
none.
Warning
none.
template<class GRAPH_ADJACENCY >
template<class D >
void Bial::Graph< GRAPH_ADJACENCY >::Initialize ( const Feature< D > &  feature,
float  scl_min,
float  scl_max 
)

Initializes the object.

Date
2014/Nov/14
Parameters
featurefeature vector containing only the subsamples.
scl_min,scl_maxminimum and maximum scale fractions utilized for clustering. (0.0 - 1.0)
Returns
none.
Warning
none.
template<class GRAPH_ADJACENCY >
Vector< int >& Bial::Graph< GRAPH_ADJACENCY >::Label ( )

Returns a reference to label.

Date
2014/Nov/14
Parameters
none.
Returns
A reference to label.
Warning
none.
template<class GRAPH_ADJACENCY >
const Vector< int >& Bial::Graph< GRAPH_ADJACENCY >::Label ( ) const

Returns a reference to label.

Date
2014/Nov/14
Parameters
none.
Returns
A reference to label.
Warning
none.
template<class GRAPH_ADJACENCY >
size_t Bial::Graph< GRAPH_ADJACENCY >::MaxSamples ( ) const

Returns the maximum number of samples of the derived class.

Date
2014/Nov/14
Parameters
none.
Returns
Maximum number of samples.
Warning
none.
template<class GRAPH_ADJACENCY >
double Bial::Graph< GRAPH_ADJACENCY >::NormalizedCut ( size_t  spl) const

Computes the normalized cut of the graph labeled with chosen scale.

Date
2012/Oct/09
Parameters
sclNumber of scale element.
Returns
The normalized cut value.
Warning
none.
template<class GRAPH_ADJACENCY >
double Bial::Graph< GRAPH_ADJACENCY >::PDF ( size_t  scl)

Computes PDF for spectral domain.

Date
2012/Oct/09
Parameters
sclRequired scale.
Returns
The bucket size for the IFT queue and PathFunction.
Warning
none.
template<class GRAPH_ADJACENCY >
template<class D >
void Bial::Graph< GRAPH_ADJACENCY >::PropagateLabel ( Feature< D > &  feature,
size_t  scl 
) const

Propagates labels from subsample to samples. Just an interface to call multi-thread, GPU based or other more specialized methods.

Date
2014/Oct/23
Parameters
featureFeature vector.
sclNumber of scale element.
Returns
none.
Warning
none.
template<class GRAPH_ADJACENCY >
template<class D >
void Bial::Graph< GRAPH_ADJACENCY >::PropagateLabelThread ( Feature< D > &  feature,
size_t  scl,
size_t  thread,
size_t  total_threads 
) const

Propagates labels from subsample to samples.

Date
2013/Jul/07
Parameters
featureFeature vector.
kngKnn graph composed from samples and feature vectors.
sclNumber of scale element.
threadThread number.
total_threadsNumber of threads.
Returns
none.
Warning
none.
template<class GRAPH_ADJACENCY >
Vector< double > Bial::Graph< GRAPH_ADJACENCY >::SampleNormalizedCut ( const Vector< int > &  label,
size_t  scl 
) const

Computes the normalized cut of each example of the graph labeled with given scale.

Date
2014/Nov/11
Parameters
labelthe labels of the samples to be considered.
sclNumber of scale element.
Returns
A vector with the normalized cut of each example of the graph labeled with given scale.
Warning
none.
template<class GRAPH_ADJACENCY >
size_t Bial::Graph< GRAPH_ADJACENCY >::Samples ( ) const

Returns the number of nodes.

Date
2014/Nov/25
Parameters
none.
Returns
The number of nodes.
Warning
none.
template<class GRAPH_ADJACENCY >
size_t Bial::Graph< GRAPH_ADJACENCY >::Scales ( ) const

Returns the number of different scales.

Date
2014/Nov/14
Parameters
none.
Returns
The number of different scales.
Warning
none.
template<class GRAPH_ADJACENCY >
void Bial::Graph< GRAPH_ADJACENCY >::SetCut ( size_t  scl)

Computes the normalized cut of each example of the graph labeled with chosen scale and assigns to the initial cut.

Date
2014/Nov/14
Parameters
sclNumber of scale element.
Returns
none.
Warning
none.

Member Data Documentation

template<class GRAPH_ADJACENCY >
GRAPH_ADJACENCY Bial::Graph< GRAPH_ADJACENCY >::adjacency
protected

Definition at line 34 of file Graph.hpp.

template<class GRAPH_ADJACENCY >
Vector< double > Bial::Graph< GRAPH_ADJACENCY >::cut
protected

Definition at line 31 of file Graph.hpp.

template<class GRAPH_ADJACENCY >
Vector< double > Bial::Graph< GRAPH_ADJACENCY >::density
protected

Definition at line 30 of file Graph.hpp.

template<class GRAPH_ADJACENCY >
Vector< int > Bial::Graph< GRAPH_ADJACENCY >::label
protected

Definition at line 33 of file Graph.hpp.

template<class GRAPH_ADJACENCY >
Vector< size_t > Bial::Graph< GRAPH_ADJACENCY >::ordered
protected

Definition at line 32 of file Graph.hpp.

template<class GRAPH_ADJACENCY >
Sample Bial::Graph< GRAPH_ADJACENCY >::sample
protected

Definition at line 29 of file Graph.hpp.


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