Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::OPF Namespace Reference

Functions

template<template< class D > class C>
float ClusterMatchingError (const Vector< C< int > > &sim_label)
 Computes and returns the minimum error of corresponding clusters between pairs of containers. e.g. Given a ground truth labeled image and a test labeled image, this function tries to maximize the matching of cluster labels in order to achieve the minimum error. If both images have the same clusters, but with different labels assigned to them, the error will be zero. The error is the frequency of incorrect labeled pixels. More...
 
template<class D >
size_t HierarchicalClustering (Feature< D > &feature, float scale_min, float scale_max)
 Computes OPF clustering based only on the feature space, using sampling and a graph. It tries to find the best scale for each cluster. More...
 
template<class D , class GRAPH_ADJACENCY >
size_t HierarchicalClustering (Feature< D > &feature, float scale_min, float scale_max, HierarchicalGraph< GRAPH_ADJACENCY > &graph)
 
template<class D >
size_t SpacialClustering (const Feature< D > &feature, Image< int > &label, const Adjacency &adjacency, float intensity_fraction)
 Computes OPF clustering based on the feature and image space, using complete graph. More...
 
template<class D >
float MaxWeight (const Feature< D > &feature, Image< int > &label, const Adjacency &adjacency, float intensity_fraction)
 Computes PDF for 'neighbors' neighbours. More...
 
template<class D >
void MaxWeightThread (const Feature< D > &feature, Image< int > &label, const Adjacency &adjacency, float &max_distance, size_t thread, size_t total_threads)
 Computes PDF for 'neighbors' neighbours. More...
 
template<class D >
float PDF (const Feature< D > &feature, const Adjacency &adjacency, Image< float > &density, float max_weight)
 Computes PDF in spatial and spectral domains. More...
 
template<class D >
float PDFThread (const Feature< D > &feature, const Adjacency &adjacency, Image< float > &density, float sigma, float &max_dens_diff, size_t thread, size_t total_threads)
 Computes PDF in spatial and spectral domains. More...
 
template<class D >
size_t SpectralClustering (Feature< D > &feature, float scale_min, float scale_max)
 Computes OPF clustering based only on the feature space, using sampling and a graph. More...
 
template<class D , class GRAPH_ADJACENCY >
size_t SpectralClustering (Feature< D > &feature, float scale_min, float scale_max, Graph< GRAPH_ADJACENCY > &graph)
 
template<class D >
size_t SpectralClustering (Feature< D > &feature, size_t clusters)
 Computes OPF clustering based only on the feature space, using sampling and k-nn arcs. More...
 
template<class D , class GRAPH_ADJACENCY >
size_t SpectralClustering (Feature< D > &feature, size_t clusters, Graph< GRAPH_ADJACENCY > &graph)
 

Function Documentation

template<template< class D > class C>
float Bial::OPF::ClusterMatchingError ( const Vector< C< int > > &  sim_label)

Computes and returns the minimum error of corresponding clusters between pairs of containers. e.g. Given a ground truth labeled image and a test labeled image, this function tries to maximize the matching of cluster labels in order to achieve the minimum error. If both images have the same clusters, but with different labels assigned to them, the error will be zero. The error is the frequency of incorrect labeled pixels.

Date
2014/Apr/30
Parameters
sim_labelVector of labels.
Returns
The minimum error of corresponding clusters between pairs of containers (i.e. images, vectors).
Warning
none.
template<class D >
size_t Bial::OPF::HierarchicalClustering ( Feature< D > &  feature,
float  scale_min,
float  scale_max 
)

Computes OPF clustering based only on the feature space, using sampling and a graph. It tries to find the best scale for each cluster.

Date
2014/Nov/04
Parameters
featureFeature vector.
scale_min,scale_maxminimum and maximum scale. From 0.0 to 1.0.
graphthe graph used to compute OPF. Default: KnnGraph for function with no parameter.
Returns
Number of clusters.
Warning
scale_min must be smaller than of equal to scale_min.
template<class D , class GRAPH_ADJACENCY >
size_t Bial::OPF::HierarchicalClustering ( Feature< D > &  feature,
float  scale_min,
float  scale_max,
HierarchicalGraph< GRAPH_ADJACENCY > &  graph 
)
template<class D >
float Bial::OPF::MaxWeight ( const Feature< D > &  feature,
Image< int > &  label,
const Adjacency adjacency,
float  intensity_fraction 
)

Computes PDF for 'neighbors' neighbours.

Date
2012/Nov/26
Parameters
featureFeature vector.
labellabel map. May be a std random access container, Bial::Image, or Bial::Matrix class.
adjacencyadjacency relation for spacial constraints.
intensity_fractionfraction from 0.0 to 1.0 of the maximum intensity set for adjacent pixels.
Returns
The bucket size for the IFT queue and PathFunction.
Warning
none.
template<class D >
void Bial::OPF::MaxWeightThread ( const Feature< D > &  feature,
Image< int > &  label,
const Adjacency adjacency,
float &  max_distance,
size_t  thread,
size_t  total_threads 
)

Computes PDF for 'neighbors' neighbours.

Date
2013/Dec/10
Parameters
featureFeature vector.
labellabel map. May be a std random access container, Bial::Image, or Bial::Matrix class.
adjacencyadjacency relation for spacial constraints.
max_distanceMaximum distance among pixels.
threadThread number.
total_threadsNumber of threads.
Returns
The bucket size for the IFT queue and PathFunction.
Warning
none.
template<class D >
float Bial::OPF::PDF ( const Feature< D > &  feature,
const Adjacency adjacency,
Image< float > &  density,
float  max_weight 
)

Computes PDF in spatial and spectral domains.

Date
2012/Nov/26
Parameters
featureFeature vector.
adjacencyadjacency relation for spacial constraints.
densitySamples density. Used as value map in IFT.
max_weightmaximum arc weight in feature space.
Returns
The bucket size for the IFT queue and PathFunction.
Warning
none.
template<class D >
float Bial::OPF::PDFThread ( const Feature< D > &  feature,
const Adjacency adjacency,
Image< float > &  density,
float  sigma,
float &  max_dens_diff,
size_t  thread,
size_t  total_threads 
)

Computes PDF in spatial and spectral domains.

Date
2013/Dec/10
Parameters
featureFeature vector.
adjacencyadjacency relation for spacial constraints.
densitySamples density. Used as value map in IFT.
sigmaSigma(variance) value for exponential PDF.
max_dens_diffMaximum density difference found among samples.
threadThread number.
total_threadsNumber of threads.
Returns
The bucket size for the IFT queue and PathFunction.
Warning
none.
template<class D >
size_t Bial::OPF::SpacialClustering ( const Feature< D > &  feature,
Image< int > &  label,
const Adjacency adjacency,
float  intensity_fraction 
)

Computes OPF clustering based on the feature and image space, using complete graph.

Date
2013/Nov/26
Parameters
featureFeature vector.
labellabel map.
adjacencyadjacency relation for spacial constraints.
intensity_fractionfraction from 0.0 to 1.0 of the maximum intensity set for adjacent pixels.
Returns
Number of clusters.
Warning
Feature and init label must have compatible dimensions.
template<class D >
size_t Bial::OPF::SpectralClustering ( Feature< D > &  feature,
float  scale_min,
float  scale_max 
)

Computes OPF clustering based only on the feature space, using sampling and a graph.

Date
2013/Jul/05
Parameters
featureFeature vector.
scale_min,scale_maxminimum and maximum scale. From 0.0 to 1.0.
graphthe graph used to compute OPF. Default: KnnGraph for function with no parameter.
Returns
Number of clusters.
Warning
scale_min must be smaller than of equal to scale_min.
template<class D , class GRAPH_ADJACENCY >
size_t Bial::OPF::SpectralClustering ( Feature< D > &  feature,
float  scale_min,
float  scale_max,
Graph< GRAPH_ADJACENCY > &  graph 
)
template<class D >
size_t Bial::OPF::SpectralClustering ( Feature< D > &  feature,
size_t  clusters 
)

Computes OPF clustering based only on the feature space, using sampling and k-nn arcs.

Date
2014/Apr/30
Parameters
featureFeature vector.
clustersNumber of expected clusters.
graphthe graph used to compute OPF.
Returns
Number of clusters.
Warning
none.
template<class D , class GRAPH_ADJACENCY >
size_t Bial::OPF::SpectralClustering ( Feature< D > &  feature,
size_t  clusters,
Graph< GRAPH_ADJACENCY > &  graph 
)