Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
HuginGraph::ImageGraph Class Reference

class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on control points and linked images positions and provides function to work with it More...

#include <ImageGraph.h>

Public Types

typedef std::vector
< HuginBase::UIntSet
GraphList
 stores adjacency list for graph More...
 
typedef std::vector
< HuginBase::UIntSet
Components
 stores the components of the graph More...
 

Public Member Functions

 ImageGraph (const HuginBase::PanoramaData &pano, bool ignoreLinkedPosition=false)
 constructor, build internal representation of graph More...
 
 ImageGraph (const HuginBase::CalculateImageOverlap &overlap)
 constructor, build graph from overlap More...
 
Components GetComponents ()
 find all connected components More...
 
bool IsConnected ()
 check if all images are connected More...
 
void VisitAllImages (const size_t startImg, bool forceAllComponents, BreadthFirstSearchVisitor *visitor)
 visit all images via a breadth first search algorithm for each visited images, the functor visitor is called with HuginBase::UIntSet which contains all neighbors in the graph More...
 

Private Attributes

GraphList m_graph
 

Detailed Description

class to work with images graphs created from a HuginBase::Panorama class it creates a graph based on control points and linked images positions and provides function to work with it

Definition at line 44 of file ImageGraph.h.

Member Typedef Documentation

stores the components of the graph

Definition at line 50 of file ImageGraph.h.

stores adjacency list for graph

Definition at line 48 of file ImageGraph.h.

Constructor & Destructor Documentation

HuginGraph::ImageGraph::ImageGraph ( const HuginBase::PanoramaData pano,
bool  ignoreLinkedPosition = false 
)
HuginGraph::ImageGraph::ImageGraph ( const HuginBase::CalculateImageOverlap overlap)

constructor, build graph from overlap

Definition at line 70 of file ImageGraph.cpp.

References HuginBase::CalculateImageOverlap::getNrOfImages(), HuginBase::CalculateImageOverlap::getOverlap(), and m_graph.

Member Function Documentation

ImageGraph::Components HuginGraph::ImageGraph::GetComponents ( )

find all connected components

Returns
number of components if you want to know, if all images are connected use IsConnected() instead

Definition at line 101 of file ImageGraph.cpp.

References m_graph.

Referenced by AutoPanoSiftMultiRow::automatch(), main(), PanoDetector::matchMultiRow(), DragTool::MouseButtonEvent(), GLPreviewFrame::panoramaChanged(), and MainFrame::RunAssistant().

bool HuginGraph::ImageGraph::IsConnected ( )

check if all images are connected

Returns
true, if all images are connected, otherwise false it uses an optimized depth first search and breaks out if a a second components is found. If you need all components use GetComponents() instead

Definition at line 128 of file ImageGraph.cpp.

References HuginGraph::DepthFirstSearch(), and m_graph.

Referenced by AutoPanoSiftMultiRow::automatch(), HuginQueue::GetAssistantCommandQueue(), HuginQueue::GetAssistantCommandQueueUserDefined(), PanoOperation::CleanControlPointsOperation::GetInternalCommand(), main(), and PanoDetector::matchMultiRow().

void HuginGraph::ImageGraph::VisitAllImages ( const size_t  startImg,
bool  forceAllComponents,
BreadthFirstSearchVisitor visitor 
)

visit all images via a breadth first search algorithm for each visited images, the functor visitor is called with HuginBase::UIntSet which contains all neighbors in the graph

Parameters
forceAllComponentsif true all images are visited, if false only the images connected with startImg are visited

Definition at line 176 of file ImageGraph.cpp.

References HuginGraph::BreadthFirstSearchVisit(), and m_graph.

Referenced by HuginBase::AutoOptimise::autoOptimise(), and HuginBase::getEstimatedBlendingOrder().

Member Data Documentation

GraphList HuginGraph::ImageGraph::m_graph
private

Definition at line 73 of file ImageGraph.h.

Referenced by GetComponents(), ImageGraph(), IsConnected(), and VisitAllImages().


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