hugin_utils Namespace Reference

namespace for various utils More...


Classes

struct  hugin_utils::GraphEdge
struct  hugin_utils::RemoveVisitor
 removes vertices from the set More...
struct  hugin_utils::TrackVisitor
 remember/track all visited vertices More...
struct  hugin_utils::TDiff2D< T >
class  hugin_utils::LMS_Solver
 Solve a linear least squares problem. More...

Typedefs

typedef std::vector< int > AdjList
typedef std::vector< AdjListAdjListGraph
typedef TDiff2D< double > FDiff2D

Functions

template<class str>
str wxQuoteStringInternal (const str &arg, const str &quotechar, const str &replacements)
template<class str>
str wxQuoteString (const str &arg)
 Try to escape special chars on windows and linux.
template<class str>
str wxQuoteFilename (const str &arg)
 Quote a filename, so that it is surrounded by "".
wxString doubleTowxString (double d, int digits=-1)
void sortd (int length, double *a, int *ind)
void eig_jacobi (int n, double a[3][3], double v[3][3], double *d, int *ind, int *maxsweep, int *maxannil, double *epsilon)
 Implements jacobi eigenvalue/vector algorithm on a symmetric matrix stored as a 2 dimensional matrix a[n][n] and computes the eigenvectors in another globally allocated matrix v[n][n].
void findSubGraphs (AdjListGraph &graph, std::vector< int > &subgraphStart)
 find subgraphs
template<class FUNCTOR>
void traverseEdges (const AdjListGraph &graph, int startNode, FUNCTOR &visitor)
 traverse a graph, and run visitor on every vertice - vertice edge encounterd
template<class FUNCTOR>
void traverseVertices (const AdjListGraph &graph, int start, FUNCTOR &visitor)
 traverse graph vertices
double round (double x)
float roundf (float x)
int ceili (double x)
int floori (double x)
template<class T>
int roundi (T x)
int isnan (double x)
template<class T>
simpleClipPoint (const T &point, const T &min, const T &max)
 clip a point to fit int [min, max] does not do a mathematical clipping, just sets p.x and p.y to the borders if they are outside.
template<class T>
sqr (T t)
template<class T>
double norm (T t)
template<class InputIterator1, class InputIterator2>
double euclid_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2)
 calculate squared Euclidean distance between two vectors.
template<class InputIterator1, class InputIterator2, class T>
sqr_dist (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T res)
 calculate squared Euclidean distance between two vectors.
template<class POINT>
vigra::Rect2D calcCircleROIFromPoints (const POINT &p1, const POINT &p2)
 calculate the bounding box of a circle that goes through both points.
int getCPUCount ()
 return the CPU count. On error returns a cpu count of 0 or -1
template<class str>
str quoteStringInternal (const str &arg, const str &quotechar, const str &replacements)
 utility function; escapes characters in replacements with quotechar.
template<class str>
str quoteString (const str &arg)
 Try to escape special chars on windows and linux.
template<class str>
str quoteStringShell (const str &arg)
 Try to escape special chars in a string used by a unix type shell.
template<class str>
str escapeStringMake (const str &arg)
 Escape dangerous chars in makefile strings/filenames (space),#,=.
template<class str>
str quoteFilename (const str &arg)
 Quote a filename, so that it is surrounded by "".
std::string tolower (const std::string &s)
 convert a string to lowercase
std::string GetCurrentTimeString ()
 current time as a string
std::string getExtension (const std::string &basename2)
 Get extension of a filename.
std::string stripExtension (const std::string &basename2)
 remove extension of a filename
std::string stripPath (const std::string &filename)
 remove the path of a filename (mainly useful for gui display of filenames)
std::string getPathPrefix (const std::string &filename)
 Get the path to a filename.
std::string doubleToString (double d, int digits)
 convert a double to a string, suitable for display within a GUI.
void ControlPointErrorColour (const double cperr, double &r, double &g, double &b)
bool FileExists (const std::string filename)
 checks if file exists
std::string GetAbsoluteFilename (const std::string filename)
 returns the full absolute filename
template<typename STR>
bool stringToDouble (const STR &str_, double &dest)
 convert a string to a double, ignore localisation.
template<typename Target, typename Source>
Target lexical_cast (Source arg)
template<class str>
str QuoteStringInternal (const str &arg, const str &quotechar, const str &replacements)
template<class str>
str replaceAll (const str &arg, const str &target, const str &replacement)


Detailed Description

namespace for various utils

Typedef Documentation

typedef std::vector<int> hugin_utils::AdjList
 

Definition at line 42 of file graph.h.

typedef std::vector<AdjList> hugin_utils::AdjListGraph
 

Definition at line 43 of file graph.h.

typedef TDiff2D<double> hugin_utils::FDiff2D
 

Definition at line 183 of file hugin_math.h.

Referenced by AddGeometricControlPoint(), HuginBase::MaskPolygon::addPoint(), HuginBase::angle_between(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::apply(), HuginBase::Photometric::ResponseTransform< VTIn >::apply(), ApplyLensDBParameters(), vigra_ext::applyMask(), PreviewColorPickerTool::CalcCorrection(), HuginBase::CalculateFOV::calcFOV(), PT::Panorama::calcFOV(), HuginBase::CalculateOptimalScale::calcOptimalPanoScale(), HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), DisplayedControlPoint::CheckSelection(), vigra_ext::circularCrop(), HuginBase::clip_getIntersection(), HuginBase::clip_getIntersectionCircle(), HuginBase::clip_insideCircle(), HuginBase::clip_isSide(), HuginBase::clip_onPlane(), HuginBase::MaskPolygon::clipPolygon(), MeshManager::MeshInfo::Coord3D::Coord3D(), CPEvent::CPEvent(), CPEditorPanel::CreateNewPoint(), TextureManager::TextureInfo::DefineLevels(), GreatCircleArc::LineSegment::doGL(), GreatCircleArc::LineSegment::doGLcross(), DisplayedControlPoint::Draw(), MaskImageCtrl::DrawCrop(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), OverviewOutlinesTool::DrawRect(), CPImageCtrl::DrawSelectionRectangle(), DisplayedControlPoint::DrawTextMag(), CPEditorPanel::estimateAndAddOtherPoint(), HuginBase::estimateImageAlpha(), CPEditorPanel::EstimatePoint(), vigra_ext::extractRandomPoints(), HuginBase::MaskPolygon::FindPointNearPos(), MaskImageCtrl::FindPolygon(), CPEditorPanel::FineTuneNewPoint(), CPEditorPanel::FineTuneSelectedPoint(), HuginBase::CalculateFitPanorama::fitPano(), HuginBase::generateArc(), CPImageCtrl::generateMagBitmap(), PreviewMeshManager::GetCoord3D(), PlaneOverviewMeshManager::GetCoord3D(), PanosphereOverviewMeshManager::GetCoord3D(), MeshManager::PreviewMeshInfo::GetCoord3D(), MeshManager::PlaneOverviewMeshInfo::GetCoord3D(), MeshManager::PanosphereOverviewMeshInfo::GetCoord3D(), HuginBase::getCPinMasks(), HuginBase::LensDB::LensDB::GetCrop(), PreviewLayoutLinesTool::LineDetails::getDistance(), HuginLines::GetFootpoint(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetMouseScreenPosition(), CPImageCtrl::getNewPoint(), CPEvent::getPoint(), DisplayedControlPoint::GetPos(), HuginBase::CalculateFOV::getResultFOV(), HuginBase::MaskPolygon::getTotalWindingNumber(), HuginBase::PanoramaOptions::getVFOV(), HuginBase::MaskPolygon::getWindingNumber(), GreatCircleArc::GreatCircleArc(), HuginBase::Nona::SpaceTransform::InitRadialCorrect(), HuginBase::MaskPolygon::insertPoint(), CPImageCtrl::invScale(), MaskImageCtrl::invtransform(), HuginBase::MaskPolygon::isInside(), CPImageCtrl::isOccupied(), DisplayedControlPoint::isOccupiedPos(), CPEditorPanel::LocalFineTunePoint(), main(), PanosphereOverviewCameraTool::MouseButtonEvent(), DragTool::MouseButtonEvent(), PanosphereOverviewCameraTool::MouseMoveEvent(), DragTool::MouseMoveEvent(), CPImageCtrl::mouseMoveEvent(), CPImageCtrl::mousePressLMBEvent(), CPImageCtrl::mousePressRMBEvent(), CPImageCtrl::mouseReleaseLMBEvent(), CPImageCtrl::mouseReleaseRMBEvent(), HuginBase::MaskPolygon::movePointBy(), HuginBase::MaskPolygon::movePointTo(), CPEditorPanel::NewPointChange(), CPEditorPanel::OnCPEvent(), MaskImageCtrl::OnDraw(), CPImageCtrl::OnDraw(), CPImageCtrl::OnKey(), MaskImageCtrl::OnLeftMouseDblClick(), MaskImageCtrl::OnLeftMouseDown(), MaskImageCtrl::OnLeftMouseUp(), HFOVDialog::OnLoadLensParameters(), CPImageCtrl::OnMouseLeave(), MaskImageCtrl::OnMouseMove(), MaskImageCtrl::OnRightMouseDown(), MaskImageCtrl::OnRightMouseUp(), ImageVariableDialog::OnShowDistortionGraph(), ImageVariableDialog::OnShowResponseGraph(), ImageVariableDialog::OnShowVignettingGraph(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::operator()(), HuginBase::Photometric::ResponseTransform< VTIn >::operator()(), vigra_ext::PassThroughFunctor< T >::operator()(), hugin_utils::TRANSFORM::InvRotERect::operator()(), hugin_utils::TRANSFORM::Translate::operator()(), hugin_utils::TRANSFORM::RotERect::operator()(), hugin_utils::TRANSFORM::ImgToCart::operator()(), hugin_utils::TRANSFORM::CartToImg::operator()(), hugin_utils::TRANSFORM::RectToERect::operator()(), hugin_utils::TRANSFORM::ERectToRect::operator()(), operator/(), PosMap::operator[](), HuginBase::MaskPolygon::parsePolygonString(), CPEditorPanel::PointFineTune(), vigra_ext::PointFineTuneRotSearch(), vigra_ext::PointPairT< VALUE >::PointPairT(), vigra_ext::radialVigCorrection(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), resetValues(), HuginBase::MaskPolygon::rotate90(), hugin_utils::TRANSFORM::rotatePoint(), vigra_ext::RotateTransform::RotateTransform(), CPImageCtrl::roundP(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), HuginBase::LensDB::LensDB::SaveCrop(), SaveLensParameters(), OptimData::SaveToImgs(), CPImageCtrl::scale(), MaskImageCtrl::SelectPointsInsideMouseRect(), MaskImageCtrl::setCrop(), MaskEditorPanel::setImage(), CPImageCtrl::setNewPoint(), HuginBase::PTOVariableConverterFDiff2D< code_x1, code_y1, code_x2, code_y2 >::setValueFromVariable(), HuginBase::PanoramaOptions::setVFOV(), DisplayedControlPoint::ShiftControlPoint(), CPImageCtrl::showPosition(), CPImageCtrl::showSearchArea(), HuginBase::SmartOptimise::smartOptimize(), sortByDistance(), GreatCircleArc::LineSegment::squareDistance(), GreatCircleArc::squareDistance(), DisplayedControlPoint::StartLineControlPoint(), HuginBase::MaskPolygon::subSample(), HuginBase::PTools::Transform::transform(), HuginBase::Nona::SpaceTransform::transform(), MaskImageCtrl::transform(), vigra_ext::transformImageAlphaIntern(), vigra_ext::transformImageIntern(), HuginBase::Nona::SpaceTransform::transformImgCoord(), HuginBase::PTools::Transform::transformImgCoord(), HuginBase::MaskPolygon::transformPolygon(), DisplayedControlPoint::UpdateControlPoint(), MaskImageCtrl::UpdateCrop(), ImagesTreeCtrl::UpdateGroupText(), and ImagesTreeCtrl::UpdateImageText().


Function Documentation

template<class POINT>
vigra::Rect2D calcCircleROIFromPoints const POINT &  p1,
const POINT &  p2
 

calculate the bounding box of a circle that goes through both points.

the center of the circle is halfway between the two points

Definition at line 250 of file hugin_math.h.

References roundi(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

int ceili double  x  )  [inline]
 

Definition at line 84 of file hugin_math.h.

Referenced by HuginBase::estimateImageAlpha().

IMPEX void hugin_utils::ControlPointErrorColour const double  cperr,
double &  r,
double &  g,
double &  b
 

Definition at line 205 of file utils.cpp.

Referenced by PreviewControlPointTool::AfterDrawImagesEvent(), PreviewLayoutLinesTool::LineDetails::draw(), and CPImagesComboBox::OnDrawItem().

IMPEX std::string hugin_utils::doubleToString double  d,
int  fractionaldigits = -1
 

convert a double to a string, suitable for display within a GUI.

d value to convert t a string fractionaldigits number of fractional digits. -1: not specified, use default.

Definition at line 170 of file utils.cpp.

Referenced by doubleTowxString(), HuginBase::LensDB::LensDBList::GetLensName(), PreviewFrame::panoramaChanged(), GLPreviewFrame::panoramaChanged(), and PanoPanel::UpdateDisplay().

wxString doubleTowxString double  d,
int  digits = -1
[inline]
 

Definition at line 97 of file wxPlatform.h.

References doubleToString().

Referenced by EVT_BUTTON(), ImagesTreeCtrl::OnBeginEdit(), HFOVDialog::OnCropFactorChanged(), HFOVDialog::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), HFOVDialog::OnLoadLensParameters(), CPListFrame::OnSelectButton(), ImagesPanel::OnSelectionChanged(), HFOVDialog::OnTypeChanged(), GLPreviewFrame::panoramaChanged(), LensCalFrame::ParametersToDisplay(), PreferencesDialog::UpdateDisplayData(), ImagesTreeCtrl::UpdateGroupText(), and ImagesTreeCtrl::UpdateImageText().

void hugin_utils::eig_jacobi int  n,
double  a[3][3],
double  v[3][3],
double *  d,
int *  ind,
int *  maxsweep,
int *  maxannil,
double *  epsilon
 

Implements jacobi eigenvalue/vector algorithm on a symmetric matrix stored as a 2 dimensional matrix a[n][n] and computes the eigenvectors in another globally allocated matrix v[n][n].

intput: n - size of matrix problem outputs: v - eigenvector matrix d[MAX] - a vector of unsorted eigenvalues ind[MAX] - a vector of indicies sorting d[] into descending order maxanil - number of rotations applied inputs/outputs a - input matrix (the input is changed) maxsweep - on input max number of sweeps

  • on output actual number of sweeps epsilon - on input tolerance to consider offdiagonal elements as zero
  • on output sum of offdiagonal elements

Definition at line 68 of file eig_jacobi.cpp.

References sortd().

Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation().

template<class str>
str escapeStringMake const str &  arg  ) 
 

Escape dangerous chars in makefile strings/filenames (space),#,=.

Definition at line 154 of file platform.h.

References quoteStringInternal().

template<class InputIterator1, class InputIterator2>
double euclid_dist InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2
 

calculate squared Euclidean distance between two vectors.

Definition at line 216 of file hugin_math.h.

IMPEX bool hugin_utils::FileExists const std::string  filename  ) 
 

checks if file exists

Definition at line 226 of file utils.cpp.

Referenced by PanoPanel::DoSendToBatch(), GetAbsoluteFilename(), getProgram(), PanoDetector::loadProject(), main(), FailedProjectsDialog::OnSelectProject(), MainFrame::OnSendToAssistantQueue(), PT::wxAddImagesCmd::processPanorama(), MaskImageCtrl::setImage(), and CPImageCtrl::setImage().

void hugin_utils::findSubGraphs AdjListGraph graph,
std::vector< int > &  subgraphStart
 

find subgraphs

Actually, we could just use the BOOST graph library instead of hacking our own graph functions.

Definition at line 39 of file graph.cpp.

References traverseVertices().

int floori double  x  )  [inline]
 

Definition at line 89 of file hugin_math.h.

Referenced by HuginBase::CalculateCPStatisticsRadial::calcCtrlPntsRadiStats(), and HuginBase::estimateImageAlpha().

IMPEX std::string hugin_utils::GetAbsoluteFilename const std::string  filename  ) 
 

returns the full absolute filename

replace realpath with function with works without this hack

Definition at line 232 of file utils.cpp.

References FileExists(), and makefile::string.

Referenced by main().

IMPEX int hugin_utils::getCPUCount  ) 
 

return the CPU count. On error returns a cpu count of 0 or -1

Definition at line 50 of file platform.cpp.

Referenced by main(), and PanoDetector::PanoDetector().

IMPEX std::string hugin_utils::GetCurrentTimeString  ) 
 

current time as a string

Definition at line 53 of file utils.cpp.

IMPEX std::string hugin_utils::getExtension const std::string basename  ) 
 

Get extension of a filename.

Definition at line 61 of file utils.cpp.

References makefile::string.

Referenced by main(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch().

IMPEX std::string hugin_utils::getPathPrefix const std::string filename  ) 
 

Get the path to a filename.

Definition at line 146 of file utils.cpp.

References celeste::max().

Referenced by PanoDetector::loadProject(), main(), MainFrame::OnSaveProject(), and LensCalFrame::OnSaveProject().

int isnan double  x  )  [inline]
 

Definition at line 104 of file hugin_math.h.

Referenced by vigra_ext::subpixelMaxima().

template<typename Target, typename Source>
Target lexical_cast Source  arg  ) 
 

Definition at line 228 of file utils.h.

References DEBUG_ERROR.

template<class T>
double norm t  ) 
 

Definition at line 208 of file hugin_math.h.

Referenced by HuginBase::CalculateOptimalScale::calcOptimalPanoScale(), HuginBase::MaskPolygon::FindPointNearPos(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), and HuginBase::MaskPolygon::subSample().

template<class str>
str quoteFilename const str &  arg  ) 
 

Quote a filename, so that it is surrounded by "".

I don't know the escape char for windows

Definition at line 169 of file platform.h.

References quoteStringInternal().

Referenced by AutoPanoKolor::automatch(), and AutoPanoSift::automatch().

template<class str>
str quoteString const str &  arg  ) 
 

Try to escape special chars on windows and linux.

: I'm quite sure that this routine doesn't replace some important shell chars I don't know of. This could lead to nasty behaviour and maybe even security holes.

Definition at line 117 of file platform.h.

References quoteStringInternal().

template<class str>
str QuoteStringInternal const str &  arg,
const str &  quotechar,
const str &  replacements
 

Definition at line 249 of file utils.h.

template<class str>
str quoteStringInternal const str &  arg,
const str &  quotechar,
const str &  replacements
 

utility function; escapes characters in replacements with quotechar.

Definition at line 65 of file platform.h.

Referenced by escapeStringMake(), quoteFilename(), quoteString(), and quoteStringShell().

template<class str>
str quoteStringShell const str &  arg  ) 
 

Try to escape special chars in a string used by a unix type shell.

: I'm quite sure that this routine doesn't replace some important shell chars I don't know of. This could lead to nasty behaviour and maybe even security holes.

Note that : and = are not special shell charaters but they also should be escaped because they causes problems with gnumake.

Definition at line 139 of file platform.h.

References quoteStringInternal().

template<class str>
str replaceAll const str &  arg,
const str &  target,
const str &  replacement
 

Definition at line 273 of file utils.h.

double hugin_utils::round double  x  )  [inline]
 

Definition at line 72 of file hugin_math.h.

Referenced by PreviewPanel::updatePreview().

float hugin_utils::roundf float  x  )  [inline]
 

Definition at line 79 of file hugin_math.h.

template<class T>
int roundi x  )  [inline]
 

Definition at line 97 of file hugin_math.h.

Referenced by vigra_ext::ApplyGammaFunctor< vigra::UInt16, vigra::UInt8 >::ApplyGammaFunctor(), calcCircleROIFromPoints(), PT::Panorama::calcOptimalWidth(), correctImage(), CPEvent::CPEvent(), HuginBase::AssistantMakefilelibExport::createItems(), RunStitchPanel::DetectProject(), MaskEditorPanel::DisplayCrop(), PanoPanel::DoCalcFOV(), DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), PreviewPanel::DrawOutline(), LensCalImageCtrl::DrawView(), CPEditorPanel::FineTuneSelectedPoint(), HuginBase::CalculateOptimalScale::getResultOptimalWidth(), loadPoints(), loadPointsC(), main(), CPImageCtrl::mouseMoveEvent(), CPEditorPanel::OnCPEvent(), CPImageCtrl::OnDraw(), MainFrame::OnFineTuneAll(), PreviewFrame::OnFitPano(), GLPreviewFrame::OnFitPano(), LensCalImageCtrl::OnMouseEvent(), PreviewFrame::panoramaChanged(), GLPreviewFrame::panoramaChanged(), print_result(), LensCalImageCtrl::Resize(), MainFrame::RunAssistant(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::PanoramaOptions::setWidth(), CPImageCtrl::showPosition(), hugin_utils::TDiff2D< double >::toDiff2D(), MaskImageCtrl::UpdateCrop(), and AppBase::StreamProgressDisplay::updateProgressDisplay().

template<class T>
T simpleClipPoint const T &  point,
const T &  min,
const T &  max
 

clip a point to fit int [min, max] does not do a mathematical clipping, just sets p.x and p.y to the borders if they are outside.

Definition at line 191 of file hugin_math.h.

References hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by vigra_ext::PointFineTune(), and PointFineTune2().

void sortd int  length,
double *  a,
int *  ind
 

Definition at line 24 of file eig_jacobi.cpp.

Referenced by eig_jacobi().

template<class T>
T sqr t  ) 
 

Definition at line 202 of file hugin_math.h.

Referenced by HuginBase::MaskPolygon::FindPointNearPos(), HuginLines::GetFootpoint(), MaskImageCtrl::OnLeftMouseUp(), MaskImageCtrl::OnRightMouseUp(), vigra_ext::optimizeVignettingQuotient(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), VertexCoordRemapper::SetLengthAndAngle(), and MaskImageCtrl::UpdateCrop().

template<class InputIterator1, class InputIterator2, class T>
T sqr_dist InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2,
res
 

calculate squared Euclidean distance between two vectors.

Definition at line 233 of file hugin_math.h.

template<typename STR>
bool stringToDouble const STR &  str_,
double &  dest
 

convert a string to a double, ignore localisation.

always accept both.

sets dest to the new value, and returns true if it could be read.

it the conversion fails, returns false and does not modify dest.

Returns:
success

Definition at line 177 of file utils.h.

References DEBUG_DEBUG.

Referenced by HuginBase::PTScriptParsing::getDoubleParam(), HuginBase::PTScriptParsing::getPTDoubleParam(), GLPreviewFrame::OnNumTransform(), HuginBase::PTScriptParsing::readVar(), str2double(), and PreferencesDialog::UpdateConfigData().

IMPEX std::string hugin_utils::stripExtension const std::string basename  ) 
 

remove extension of a filename

Definition at line 92 of file utils.cpp.

Referenced by getKeyfilenameFor(), main(), MainFrame::OnSaveProject(), reduceFilesToHDR(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch().

IMPEX std::string hugin_utils::stripPath const std::string filename  ) 
 

remove the path of a filename (mainly useful for gui display of filenames)

Definition at line 122 of file utils.cpp.

References celeste::max().

Referenced by getKeyfilenameFor(), main(), MainFrame::OnSaveProject(), PT::wxLoadPTProjectCmd::processPanorama(), and AutoCtrlPointCreator::readUpdatedControlPoints().

std::string tolower const std::string s  )  [inline]
 

convert a string to lowercase

Definition at line 49 of file stl_utils.h.

Referenced by BuildMountName(), HuginBase::LensDB::LensDB::FindLens(), and HuginBase::LensDB::LensDB::FindLenses().

template<class FUNCTOR>
void traverseEdges const AdjListGraph graph,
int  startNode,
FUNCTOR &  visitor
 

traverse a graph, and run visitor on every vertice - vertice edge encounterd

Definition at line 81 of file graph.h.

References DEBUG_DEBUG, and set_contains().

template<class FUNCTOR>
void traverseVertices const AdjListGraph graph,
int  start,
FUNCTOR &  visitor
 

traverse graph vertices

Definition at line 121 of file graph.h.

References set_contains().

Referenced by findSubGraphs().

template<class str>
str wxQuoteFilename const str &  arg  ) 
 

Quote a filename, so that it is surrounded by "".

I don't know the escape char for windows

Definition at line 83 of file wxPlatform.h.

References wxQuoteStringInternal().

Referenced by AutoPanoKolor::automatch(), AutoPanoSift::automatch(), RunStitchPanel::DetectProject(), PanoPanel::DoSendToBatch(), PanoPanel::DoStitch(), MyExecuteCommandOnDialog(), MainFrame::OnSendToAssistantQueue(), MainFrame::RunAssistant(), and RunStitchPanel::StitchProject().

template<class str>
str wxQuoteString const str &  arg  ) 
 

Try to escape special chars on windows and linux.

: I'm quite sure that this routine doesn't replace some important shell chars I don't know of. This could lead to nasty behaviour and maybe even security holes.

Definition at line 67 of file wxPlatform.h.

References wxQuoteStringInternal().

Referenced by PanoPanel::DoSendToBatch(), getGNUMakeCmd(), and RunStitchPanel::StitchProject().

template<class str>
str wxQuoteStringInternal const str &  arg,
const str &  quotechar,
const str &  replacements
 

Definition at line 37 of file wxPlatform.h.

Referenced by wxQuoteFilename(), and wxQuoteString().


Generated on Wed Sep 17 01:25:50 2014 for Hugintrunk by  doxygen 1.3.9.1