latest version v1.9 - last update 10 Apr 2010 |
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>
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 functor * | clone () const |
bool | apply (const matrix< int > ®ions, 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 > ®ions, const int minLabel, graph_type &graph) |
Methods to be reimplemented | |
virtual bool | checkInternalData (const point ®ionsSize, 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 |
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.
typedef parent::edge_data_type lti::regionGraphGray< F >::edge_data_type |
Type definitions of the parent class.
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
typedef parent::graph_type lti::regionGraphGray< F >::graph_type |
Type definitions of the parent class.
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
typedef parent::node_type lti::regionGraphGray< F >::node_type |
Type definitions of the parent class.
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
typedef parent::parameters lti::regionGraphGray< F >::parameters |
Type definitions of the parent class.
typedef regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits<float> > > lti::regionGraphGray< F >::parent |
Type definitions of the parent class.
typedef parent::weight_type lti::regionGraphGray< F >::weight_type |
Type definitions of the parent class.
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
lti::regionGraphGray< F >::regionGraphGray | ( | ) |
default constructor
lti::regionGraphGray< F >::regionGraphGray | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
lti::regionGraphGray< F >::regionGraphGray | ( | const regionGraphGray< F > & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::regionGraphGray< F >::~regionGraphGray | ( | ) | [virtual] |
destructor
bool lti::regionGraphGray< F >::apply | ( | const matrix< int > & | regions, | |
const int | minLabel, | |||
graph_type & | graph | |||
) | [protected] |
Alias for generate().
bool lti::regionGraphGray< F >::apply | ( | const int | minLabel, | |
graph_type & | graph, | |||
ivector & | equivalences | |||
) |
Alias for merge() taking the threshold from the parameters.
bool lti::regionGraphGray< F >::apply | ( | const weight_type & | threshold, | |
const int | minLabel, | |||
graph_type & | graph, | |||
ivector & | equivalences | |||
) |
Alias for merge().
bool lti::regionGraphGray< F >::apply | ( | graph_type & | graph, | |
ivector & | equivalences | |||
) |
Alias for merge() taking the threshold from the parameters.
bool lti::regionGraphGray< F >::apply | ( | const weight_type & | threshold, | |
graph_type & | graph, | |||
ivector & | equivalences | |||
) |
Alias for merge().
bool lti::regionGraphGray< F >::apply | ( | const matrix< int > & | regions, | |
const channel & | chnl, | |||
const int | minLabel, | |||
graph_type & | graph | |||
) |
Alias for generate().
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.
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. |
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
virtual functor* lti::regionGraphGray< F >::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.
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.
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. |
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.
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. |
virtual const char* lti::regionGraphGray< F >::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("regionGraphGrayMean")
Reimplemented from lti::regionGraphFunctor< adjacencyGraph< regionGraphMeansNode< float >, float, int, F, symmetricEdgeTraits< float > > >.