LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::regionGraphGray< F > Class Template Reference

Functor to manipulate graphs of adjacent image regions, where the nodes of the graphs contain the mean value of the region represented by the node. More...

#include <ltiRegionGraphMeans.h>

Inheritance diagram for lti::regionGraphGray< F >:
Inheritance graph
[legend]
Collaboration diagram for lti::regionGraphGray< F >:
Collaboration graph
[legend]

List of all members.

Public Types



typedef regionGraphFunctor
< adjacencyGraph
< regionGraphMeansNode< float >
, float, int, F,
symmetricEdgeTraits< float > > > 
parent
typedef parent::parameters parameters
typedef parent::graph_type graph_type
typedef parent::weight_type weight_type
typedef parent::edge_data_type edge_data_type
typedef parent::node_type node_type

Public Member Functions

 regionGraphGray ()
 regionGraphGray (const parameters &par)
 regionGraphGray (const regionGraphGray &other)
virtual ~regionGraphGray ()
virtual const char * getTypeName () const
virtual functorclone () const
bool apply (const matrix< int > &regions, const channel &chnl, const int minLabel, graph_type &graph)
bool apply (const weight_type &threshold, graph_type &graph, ivector &equivalences)
bool apply (graph_type &graph, ivector &equivalences)
bool apply (const weight_type &threshold, const int minLabel, graph_type &graph, ivector &equivalences)
bool apply (const int minLabel, graph_type &graph, ivector &equivalences)

Protected Member Functions

bool apply (const matrix< int > &regions, const int minLabel, graph_type &graph)
Methods to be reimplemented



virtual bool checkInternalData (const point &regionsSize, const int maxRegionIndex) const
virtual bool considerForEdgeData (const point &p1, const point &p2, edge_data_type &edgeData)
virtual bool considerForNodeData (const point &p1, const int label, node_type &nodeData)

Protected Attributes

Internal data



channel c1

Detailed Description

template<class F = regionGraphScalarMeanDistance>
class lti::regionGraphGray< F >

Functor to manipulate graphs of adjacent image regions, where the nodes of the graphs contain the mean value of the region represented by the node.

The template F is the distance computation functor required by the graph.


Member Typedef Documentation

template<class F = regionGraphScalarMeanDistance>
typedef parent::edge_data_type lti::regionGraphGray< F >::edge_data_type
template<class F = regionGraphScalarMeanDistance>
typedef parent::graph_type lti::regionGraphGray< F >::graph_type
template<class F = regionGraphScalarMeanDistance>
typedef parent::node_type lti::regionGraphGray< F >::node_type
template<class F = regionGraphScalarMeanDistance>
typedef parent::parameters lti::regionGraphGray< F >::parameters

Type definitions of the parent class.

template<class F = regionGraphScalarMeanDistance>
typedef regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits<float> > > lti::regionGraphGray< F >::parent

Type definitions of the parent class.

template<class F = regionGraphScalarMeanDistance>
typedef parent::weight_type lti::regionGraphGray< F >::weight_type

Constructor & Destructor Documentation

template<class F = regionGraphScalarMeanDistance>
lti::regionGraphGray< F >::regionGraphGray (  ) 

default constructor

template<class F = regionGraphScalarMeanDistance>
lti::regionGraphGray< F >::regionGraphGray ( const parameters par  ) 

Construct a functor using the given parameters.

template<class F = regionGraphScalarMeanDistance>
lti::regionGraphGray< F >::regionGraphGray ( const regionGraphGray< F > &  other  ) 

copy constructor

Parameters:
other the object to be copied
template<class F = regionGraphScalarMeanDistance>
virtual lti::regionGraphGray< F >::~regionGraphGray (  )  [virtual]

destructor


Member Function Documentation

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( const matrix< int > &  regions,
const int  minLabel,
graph_type graph 
) [protected]

Alias for generate().

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( const int  minLabel,
graph_type graph,
ivector equivalences 
)

Alias for merge() taking the threshold from the parameters.

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( const weight_type threshold,
const int  minLabel,
graph_type graph,
ivector equivalences 
)

Alias for merge().

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( graph_type graph,
ivector equivalences 
)

Alias for merge() taking the threshold from the parameters.

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( const weight_type threshold,
graph_type graph,
ivector equivalences 
)

Alias for merge().

template<class F = regionGraphScalarMeanDistance>
bool lti::regionGraphGray< F >::apply ( const matrix< int > &  regions,
const channel chnl,
const int  minLabel,
graph_type graph 
)

Alias for generate().

template<class F = regionGraphScalarMeanDistance>
virtual bool lti::regionGraphGray< F >::checkInternalData ( const point regionsSize,
const int  maxRegionIndex 
) const [protected, virtual]

Check if the internal data is compatible with the region mask.

The weights between region nodes can be computed from very different information sources. Usually, this information is coded in images and channels also extracted from the same image from which the regions map was computed. Therefore, it is important to provide a way to check if the internal data is compatible with the regions map, since both must be provided by the user at different times.

Parameters:
regionsSize size of the original image and region mask. This allows to check for channels and other data in the original image size format.
maxRegionIndex maximum region index employed. This is used to check if the vectors with information per region have the appropriate size.
Returns:
true if the internal data is compatible, false if there are problems.

Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.

template<class F = regionGraphScalarMeanDistance>
virtual functor* lti::regionGraphGray< F >::clone (  )  const [virtual]
template<class F = regionGraphScalarMeanDistance>
virtual bool lti::regionGraphGray< F >::considerForEdgeData ( const point p1,
const point p2,
edge_data_type edgeData 
) [protected, virtual]

For each two neighbor pixels that belong to different regions, this method is called to compute the edge data value in a sequential manner.

It will be assumed, that the default constructor of the graph_type::edge_type::data_type "resets" correctly the data of the edge.

Parameters:
p1 coordinates of pixel belonging to one region
p2 coordinates of pixel belonging to another region
edgeData reference to data structure of the edge, where some values can be accumulated or set.
Returns:
true if successful, false otherwise.
template<class F = regionGraphScalarMeanDistance>
virtual bool lti::regionGraphGray< F >::considerForNodeData ( const point p1,
const int  label,
node_type nodeData 
) [protected, virtual]

For each pixel in each region, this method is called once to compute statistics or other data for each node.

Parameters:
p1 coordinates of the current pixel
label identification label for the region to which the pixel belongs.
nodeData reference to the data structure of the node, where some values can be accumulated or set.
Returns:
true if successful, false otherwise.
template<class F = regionGraphScalarMeanDistance>
virtual const char* lti::regionGraphGray< F >::getTypeName (  )  const [virtual]

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

Generated on Sat Apr 10 15:27:46 2010 for LTI-Lib by Doxygen 1.6.1