Represents a pixel graph. This class comes in handy if you want to map pixel edges with pixels.
More...
#include <PixelSet.h>
|
| | PixelGraph () |
| |
| | PixelGraph (const PixelSet &set) |
| |
| bool | isEmpty () const |
| |
| void | draw (QPainter &p, const PixelDistance::EdgeWeightFunction *weightFnc=0, double dynamicRange=1.0) const |
| |
| void | connect (const PixelConnector &connector=DelaunayPixelConnector(), const SortMode &sort=sort_none) |
| |
| PixelSet | set () const |
| |
| QVector< QSharedPointer< PixelEdge > > | edges (const QString &pixelID) const |
| | Returns all edges connected to the pixel with ID pixelID. More...
|
| |
| QVector< QSharedPointer< PixelEdge > > | edges (const QVector< int > &edgeIDs) const |
| | Returns a vector with all edges in the ID vector edgeIDs. More...
|
| |
| QVector< QSharedPointer< PixelEdge > > | edges () const |
| | Returns all pixel edges which were found using Delaunay triangulation. More...
|
| |
| int | pixelIndex (const QString &pixelID) const |
| | Maps pixel IDs (pixel->id()) to their current vector index. More...
|
| |
| QVector< int > | edgeIndexes (const QString &pixelID) const |
| | Returns all edges indexes of the current pixel. Each pixel has N edges in the graph. This function returns a vector with all edge indexes of the current pixel. The edge objects can then be retreived using edges()[idx]. More...
|
| |
| | BaseElement (const QString &id=QString()) |
| | This class keeps an ID to keep track of transformed elements during a processing chain. You can e.g. generate Pixel elements from MserBlobs. After filtering, processing etc. you can map back to the (pixel accurate) MserBlob using this ID. More...
|
| |
| void | setId (const QString &id) |
| | Sets the (preferably unique) ID. If no ID is set, a unqiue ID is generated and assigned. More...
|
| |
| QString | id () const |
| | Returns the elment's id. More...
|
| |
| virtual QString | toString () const |
| |
| virtual void | scale (double factor) |
| |
Represents a pixel graph. This class comes in handy if you want to map pixel edges with pixels.
- See also
- BaseElement
| Enumerator |
|---|
| sort_none |
|
| sort_edges |
|
| sort_line_edges |
|
| sort_distance |
|
| sort_end |
|
| rdf::PixelGraph::PixelGraph |
( |
| ) |
|
| rdf::PixelGraph::PixelGraph |
( |
const PixelSet & |
set | ) |
|
| QVector< int > rdf::PixelGraph::edgeIndexes |
( |
const QString & |
pixelID | ) |
const |
Returns all edges indexes of the current pixel. Each pixel has N edges in the graph. This function returns a vector with all edge indexes of the current pixel. The edge objects can then be retreived using edges()[idx].
- Parameters
-
- Returns
- A vector with edge indexes.
| QVector< QSharedPointer< PixelEdge > > rdf::PixelGraph::edges |
( |
const QString & |
pixelID | ) |
const |
Returns all edges connected to the pixel with ID pixelID.
- Parameters
-
| pixelID | The pixel identifier. |
- Returns
| QVector< QSharedPointer< PixelEdge > > rdf::PixelGraph::edges |
( |
const QVector< int > & |
edgeIDs | ) |
const |
Returns a vector with all edges in the ID vector edgeIDs.
- Parameters
-
- Returns
| QVector< QSharedPointer< PixelEdge > > rdf::PixelGraph::edges |
( |
| ) |
const |
Returns all pixel edges which were found using Delaunay triangulation.
- Returns
- A vector of PixelEdges which connect 2 pixels each.
| bool rdf::PixelGraph::isEmpty |
( |
| ) |
const |
| int rdf::PixelGraph::pixelIndex |
( |
const QString & |
pixelID | ) |
const |
Maps pixel IDs (pixel->id()) to their current vector index.
- Parameters
-
| pixelID | The unique ID of a pixel. |
- Returns
- The current vector position.
| QVector<QSharedPointer<PixelEdge> > rdf::PixelGraph::mEdges |
|
protected |
| QMap<QString, QVector<int> > rdf::PixelGraph::mPixelEdges |
|
protected |
| QMap<QString, int> rdf::PixelGraph::mPixelLookup |
|
protected |
The documentation for this class was generated from the following files: