te::graph::LDDGraphBuilder Class Reference

This strategy is based on Serio Rosim method, using this "mask" is possible extract a graph from a LDD image. More...

#include <LDDGraphBuilder.h>

Inheritance diagram for te::graph::LDDGraphBuilder:
te::graph::AbstractGraphBuilder

Public Member Functions

 LDDGraphBuilder ()
 Default constructor. More...
 
virtual ~LDDGraphBuilder ()
 Virtual destructor. More...
 
Methods

Methods used by this builder

bool build (te::rst::Raster *raster, const std::string &dsInfo, const std::string &graphType, const std::map< std::string, std::string > &gInfo)
 Function used to build the output graph based on input parameters. More...
 
Abstract Methods

Method common to each graph builder

std::string getErrorMessage ()
 Get error message. More...
 
boost::shared_ptr< AbstractGraphgetGraph ()
 Get generated graph. More...
 

Protected Member Functions

int getEdgeId ()
 Function used to generated the edge id. More...
 
bool getVertexId (int row, int col, int &id)
 Function used to generated the vertex id based on raster coordenate. More...
 

Protected Attributes

std::string m_errorMessage
 Error message. More...
 
boost::shared_ptr< AbstractGraphm_graph
 Graph object. More...
 

Private Attributes

int m_edgeId
 Attribute used as a index counter for edge objects. More...
 
te::rst::Rasterm_raster
 Input raster with LDD information. More...
 

Detailed Description

This strategy is based on Serio Rosim method, using this "mask" is possible extract a graph from a LDD image.


| 32 | 64 | 128 |

| 16 | * | 1 |

| 8 | 4 | 2 |

See also
AbstractGraphBuilder

Definition at line 75 of file LDDGraphBuilder.h.

Constructor & Destructor Documentation

te::graph::LDDGraphBuilder::LDDGraphBuilder ( )

Default constructor.

Definition at line 56 of file LDDGraphBuilder.cpp.

References ~LDDGraphBuilder().

te::graph::LDDGraphBuilder::~LDDGraphBuilder ( )
virtualdefault

Virtual destructor.

Referenced by LDDGraphBuilder().

Member Function Documentation

bool te::graph::LDDGraphBuilder::build ( te::rst::Raster raster,
const std::string &  dsInfo,
const std::string &  graphType,
const std::map< std::string, std::string > &  gInfo 
)
int te::graph::LDDGraphBuilder::getEdgeId ( )
protected

Function used to generated the edge id.

Returns
Integer value as ID

Definition at line 271 of file LDDGraphBuilder.cpp.

References m_edgeId.

Referenced by build().

std::string te::graph::AbstractGraphBuilder::getErrorMessage ( )
inherited

Get error message.

Definition at line 41 of file AbstractGraphBuilder.cpp.

References te::graph::AbstractGraphBuilder::m_errorMessage.

Referenced by CreateLDDGraph().

boost::shared_ptr< te::graph::AbstractGraph > te::graph::AbstractGraphBuilder::getGraph ( )
inherited

Get generated graph.

Definition at line 46 of file AbstractGraphBuilder.cpp.

References te::graph::AbstractGraphBuilder::m_graph.

Referenced by CreateLDDGraph().

bool te::graph::LDDGraphBuilder::getVertexId ( int  row,
int  col,
int id 
)
protected

Function used to generated the vertex id based on raster coordenate.

Parameters
rowRow position over the raster
colColumn position over the raster
idUsed to set the id generated
Returns
True if a valid id was generated and false in other case

Definition at line 249 of file LDDGraphBuilder.cpp.

References te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), and m_raster.

Referenced by build().

Member Data Documentation

int te::graph::LDDGraphBuilder::m_edgeId
private

Attribute used as a index counter for edge objects.

Definition at line 134 of file LDDGraphBuilder.h.

Referenced by getEdgeId().

std::string te::graph::AbstractGraphBuilder::m_errorMessage
protectedinherited
te::rst::Raster* te::graph::LDDGraphBuilder::m_raster
private

Input raster with LDD information.

Definition at line 132 of file LDDGraphBuilder.h.

Referenced by build(), and getVertexId().


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