hugin_utils Namespace Reference

namespace for various utils More...


Classes

struct  GraphEdge
struct  RemoveVisitor
 removes vertices from the set More...
struct  TrackVisitor
 remember/track all visited vertices More...
struct  TDiff2D
struct  ContextSettings

Namespaces

namespace  TRANSFORM

Typedefs

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

Functions

wxString doubleTowxString (double d, int digits)
bool str2double (const wxString &s, double &d)
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 "".
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 toupper (const std::string &s)
std::string GetCurrentTimeString ()
 current time as a string
std::string getExtension (const std::string &basename)
 Get extension of a filename.
std::string stripExtension (const std::string &basename)
 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 StrTrim (const std::string &str)
 remove trailing and leading white spaces and tabs
std::string doubleToString (double d, int fractionaldigits=-1)
 convert a double to a string, suitable for display within a GUI.
bool stringToInt (const std::string &s, int &val)
 convert string to integer value, returns true, if sucessful
bool stringToUInt (const std::string &s, unsigned int &val)
 convert string to unsigned integer value, returns true, if sucessful
std::vector< std::stringSplitString (const std::string &s, const std::string &sep)
 split string s at given sep, returns vector of strings
void ReplaceAll (std::string &s, const std::string &oldChar, char newChar)
 replace all characters oldChar in s with newChar
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
std::string GetDataDir ()
 returns the full path to the data directory
std::string GetUserAppDataDir ()
 returns the directory for user specific Hugin settings, e.g.
bool CreateContext (int *argcp, char **argv)
void DestroyContext ()
bool initGPU (int *argcp, char **argv)
 Try to initalise GLUT and GLEW, and create an OpenGL context for GPU stitching.
bool wrapupGPU ()
 cleanup GPU settings
std::string GetHuginVersion ()
 return a string with version numbers
std::string GetICCDesc (const vigra::ImageImportInfo::ICCProfile &iccProfile)
 returns description of given icc profile
std::string GetICCDesc (const cmsHPROFILE &profile)
template<typename STR>
bool stringToDouble (const STR &str_, double &dest)
 convert a string to a double, ignore localisation.
template<class str>
str QuoteStringInternal (const str &arg, const str &quotechar, const str &replacements)

Variables

static ContextSettings context


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.


Function Documentation

WXIMPEX wxString hugin_utils::doubleTowxString ( double  d,
int  digits = -1 
)

Definition at line 31 of file wxPlatform.cpp.

References doubleToString().

Referenced by LensCalFrame::AddImages(), EVT_BUTTON(), ImageVariableDialog::InitValues(), ImagesTreeCtrl::OnBeginEdit(), HFOVDialog::OnCropFactorChanged(), HFOVDialog::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), HFOVDialog::OnLoadLensParameters(), CPListFrame::OnSelectButton(), ImagesPanel::OnSelectionChanged(), HFOVDialog::OnTypeChanged(), LensCalFrame::Optimize(), ImagesPanel::panoramaChanged(), GLPreviewFrame::panoramaChanged(), LensCalFrame::ParametersToDisplay(), SaveLensDBDialog::SetAperture(), LoadLensDBDialog::SetAperture(), SaveLensDBDialog::SetFocalLength(), LoadLensDBDialog::SetFocalLength(), SaveLensDBDialog::SetSubjectDistance(), LoadLensDBDialog::SetSubjectDistance(), PreferencesDialog::UpdateDisplayData(), ImagesTreeCtrl::UpdateGroupText(), ImagesTreeCtrl::UpdateImageText(), and HuginQueue::wxStringFromCDouble().

WXIMPEX bool hugin_utils::str2double ( const wxString &  s,
double &  d 
)

Definition at line 37 of file wxPlatform.cpp.

References stringToDouble().

template<class str>
str hugin_utils::wxQuoteStringInternal ( const str &  arg,
const str &  quotechar,
const str &  replacements 
)

Definition at line 36 of file wxPlatform.h.

Referenced by HuginQueue::wxEscapeFilename(), wxQuoteFilename(), and wxQuoteString().

template<class str>
str hugin_utils::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 66 of file wxPlatform.h.

References wxQuoteStringInternal().

Referenced by PanoPanel::DoSendToBatch().

template<class str>
str hugin_utils::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 82 of file wxPlatform.h.

References wxQuoteStringInternal().

Referenced by AutoPanoSift::automatch(), PanoPanel::DoSendToBatch(), PanoPanel::DoStitch(), PanoPanel::DoUserDefinedStitch(), MyExecuteCommandOnDialog(), and MainFrame::OnSendToAssistantQueue().

void hugin_utils::sortd ( int  length,
double *  a,
int *  ind 
)

Definition at line 24 of file eig_jacobi.cpp.

Referenced by eig_jacobi().

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

Definition at line 68 of file eig_jacobi.cpp.

References sortd().

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

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().

template<class FUNCTOR>
void hugin_utils::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 hugin_utils::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().

double hugin_utils::round ( double  x  )  [inline]

Definition at line 72 of file hugin_math.h.

Referenced by Graph::TransformX(), Graph::TransformY(), and PreviewPanel::updatePreview().

float hugin_utils::roundf ( float  x  )  [inline]

Definition at line 79 of file hugin_math.h.

int hugin_utils::ceili ( double  x  )  [inline]

Definition at line 84 of file hugin_math.h.

Referenced by HuginBase::estimateImageAlpha().

int hugin_utils::floori ( double  x  )  [inline]

Definition at line 89 of file hugin_math.h.

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

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

Definition at line 97 of file hugin_math.h.

Referenced by HuginLines::_getVerticalLines(), vigra_ext::ApplyGammaFunctor< vigra::UInt16, vigra::UInt8 >::ApplyGammaFunctor(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcAlpha(), calcCircleROIFromPoints(), PT::Panorama::calcOptimalWidth(), HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), correctImage(), CPEvent::CPEvent(), createCtrlPoints(), HuginBase::AssistantMakefilelibExport::createItems(), MaskEditorPanel::DisplayCrop(), PanoPanel::DoCalcFOV(), PanoPanel::DoCalcOptimalWidth(), DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), PreviewPanel::DrawOutline(), LensCalImageCtrl::DrawView(), HuginBase::estimateImageAlpha(), MyExecPanel::ExecNextQueue(), CPEditorPanel::FineTuneSelectedPoint(), CPImageCtrl::generateMagBitmap(), HuginQueue::GetAssistantCommandQueue(), HuginBase::LensDB::LensDB::GetCrop(), HuginBase::CalculateOptimalScale::getResultOptimalWidth(), loadPoints(), loadPointsC(), main(), PanoDetector::matchMultiRow(), CPImageCtrl::mouseMoveEvent(), CPEditorPanel::OnCPEvent(), GLPreviewFrame::OnCreateCP(), CPImageCtrl::OnDraw(), MainFrame::OnFineTuneAll(), PreviewFrame::OnFitPano(), GLPreviewFrame::OnFitPano(), LensCalImageCtrl::OnMouseEvent(), PanoOutputDialog::OnOk(), PanoOutputDialog::PanoOutputDialog(), PreviewFrame::panoramaChanged(), GLPreviewFrame::panoramaChanged(), PointFineTuneProjectionAware(), print_result(), PT::StraightenPanoCmd::processPanorama(), PT::CenterPanoCmd::processPanorama(), PanoCommand::StraightenPanoCmd::processPanorama(), PanoCommand::CenterPanoCmd::processPanorama(), LensCalImageCtrl::Resize(), CPImageCtrl::roundP(), HuginBase::FitPanorama::runAlgorithm(), HuginBase::PointSampler::sampleAndExtractPoints(), HuginBase::PanoramaOptions::setVFOV(), HuginBase::PanoramaOptions::setWidth(), CPImageCtrl::showPosition(), hugin_utils::TDiff2D< double >::toDiff2D(), HuginBase::Nona::traceImageOutline(), MaskImageCtrl::UpdateCrop(), and PreferencesDialog::UpdateDisplayData().

int hugin_utils::isnan ( double  x  )  [inline]

Definition at line 104 of file hugin_math.h.

Referenced by vigra_ext::subpixelMaxima().

template<class T>
T hugin_utils::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.

Referenced by vigra_ext::PointFineTune().

template<class T>
T hugin_utils::sqr ( t  ) 

Definition at line 202 of file hugin_math.h.

Referenced by HuginLines::_getVerticalLines(), HuginLines::GetFootpoint(), vigra_ext::optimizeVignettingQuotient(), HuginBase::AllPointSampler::sampleAllPanoPoints(), and HuginBase::RandomPointSampler::sampleRandomPanoPoints().

template<class T>
double hugin_utils::norm ( t  ) 

Definition at line 208 of file hugin_math.h.

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

template<class InputIterator1, class InputIterator2>
double hugin_utils::euclid_dist ( InputIterator1  first1,
InputIterator1  last1,
InputIterator2  first2 
)

calculate squared Euclidean distance between two vectors.

Definition at line 216 of file hugin_math.h.

template<class InputIterator1, class InputIterator2, class T>
T hugin_utils::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<class POINT>
vigra::Rect2D hugin_utils::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().

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.

template<class str>
str hugin_utils::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 hugin_utils::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 hugin_utils::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 hugin_utils::escapeStringMake ( const str &  arg  ) 

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

Definition at line 154 of file platform.h.

References quoteStringInternal().

template<class str>
str hugin_utils::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().

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

convert a string to lowercase

Definition at line 49 of file stl_utils.h.

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

std::string hugin_utils::toupper ( const std::string s  )  [inline]

Definition at line 59 of file stl_utils.h.

Referenced by iterateFileSystem(), main(), PTOCopyMove(), and SetCompression().

IMPEX std::string hugin_utils::GetCurrentTimeString (  ) 

current time as a string

Definition at line 85 of file utils.cpp.

IMPEX std::string hugin_utils::getExtension ( const std::string basename2  ) 

Get extension of a filename.

Definition at line 93 of file utils.cpp.

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

IMPEX std::string hugin_utils::stripExtension ( const std::string basename2  ) 

remove extension of a filename

Definition at line 124 of file utils.cpp.

Referenced by convert_file(), getKeyfilenameFor(), main(), 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 154 of file utils.cpp.

References celeste::max().

Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::ImageCache::getImage(), getKeyfilenameFor(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginBase::ImageCache::getSmallImage(), initGPU(), main(), PT::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), AutoCtrlPointCreator::readUpdatedControlPoints(), HuginBase::Nona::remapImage(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), HuginBase::Nona::detail::saveRemapped(), HuginBase::Nona::SimpleStitcher< 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 178 of file utils.cpp.

References celeste::max().

Referenced by CheckProjectFile(), PanoDetector::loadProject(), main(), HuginExecutor::OnRun(), MainFrame::OnSaveProject(), LensCalFrame::OnSaveProject(), processPTO(), and PTOCopyMove().

IMPEX std::string hugin_utils::StrTrim ( const std::string str  ) 

remove trailing and leading white spaces and tabs

Definition at line 202 of file utils.cpp.

Referenced by HuginBase::Exiv2Helper::getExiv2ValueString(), GetICCDesc(), main(), print_result(), SplitString(), and stringToInt().

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 222 of file utils.cpp.

Referenced by doubleTowxString(), PreviewFrame::panoramaChanged(), GLPreviewFrame::panoramaChanged(), and PanoPanel::UpdateDisplay().

IMPEX bool hugin_utils::stringToInt ( const std::string s,
int &  val 
)

convert string to integer value, returns true, if sucessful

Definition at line 257 of file utils.cpp.

References StrTrim().

Referenced by HuginBase::PTScriptParsing::getPTDoubleParam(), HuginBase::LensDB::LensDB::Database::ImportDistortion(), HuginBase::LensDB::LensDB::Database::ImportEMOR(), HuginBase::LensDB::LensDB::Database::ImportHFOV(), HuginBase::LensDB::LensDB::Database::ImportLensCrop(), HuginBase::LensDB::LensDB::Database::ImportProjection(), HuginBase::LensDB::LensDB::Database::ImportTCA(), HuginBase::LensDB::LensDB::Database::ImportVignetting(), ParseSingleImage(), HuginBase::PTScriptParsing::readVar(), and stringToUInt().

IMPEX bool hugin_utils::stringToUInt ( const std::string s,
unsigned int &  val 
)

convert string to unsigned integer value, returns true, if sucessful

Definition at line 273 of file utils.cpp.

References stringToInt().

IMPEX std::vector< std::string > hugin_utils::SplitString ( const std::string s,
const std::string sep 
)

split string s at given sep, returns vector of strings

Definition at line 287 of file utils.cpp.

References StrTrim().

Referenced by HuginBase::LensDB::LensDB::Database::ImportCropFactor(), HuginBase::LensDB::LensDB::Database::ImportDistortion(), HuginBase::LensDB::LensDB::Database::ImportEMOR(), HuginBase::LensDB::LensDB::Database::ImportFromFile(), HuginBase::LensDB::LensDB::Database::ImportHFOV(), HuginBase::LensDB::LensDB::Database::ImportLensCrop(), HuginBase::LensDB::LensDB::Database::ImportProjection(), HuginBase::LensDB::LensDB::Database::ImportTCA(), HuginBase::LensDB::LensDB::Database::ImportVignetting(), main(), ParseImageLensStackString(), and ParseVariableString().

IMPEX void hugin_utils::ReplaceAll ( std::string s,
const std::string oldChar,
char  newChar 
)

replace all characters oldChar in s with newChar

Definition at line 318 of file utils.cpp.

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

Definition at line 328 of file utils.cpp.

References XP1, and XP2.

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

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

checks if file exists

Definition at line 349 of file utils.cpp.

Referenced by HuginBase::LensDB::LensDB::Database::Database(), PanoPanel::DoSendToBatch(), GetAbsoluteFilename(), HuginQueue::GetExternalProgram(), PanoDetector::loadProject(), main(), PreferencesDialog::OnExifArgfileEdit(), PreferencesDialog::OnExifArgfileEdit2(), stitchApp::OnInit(), FailedProjectsDialog::OnSelectProject(), MainFrame::OnSendToAssistantQueue(), PT::wxAddImagesCmd::processPanorama(), PanoCommand::wxAddImagesCmd::processPanorama(), MaskImageCtrl::setImage(), and CPImageCtrl::setImage().

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 355 of file utils.cpp.

References FileExists().

Referenced by main(), and PTOCopyMove().

IMPEX std::string hugin_utils::GetDataDir (  ) 

returns the full path to the data directory

Definition at line 392 of file utils.cpp.

References INSTALL_DATA_DIR.

Referenced by HuginQueue::GetStitchingCommandQueue(), PanoDetector::LoadSVMModel(), main(), and HuginExecutor::OnCmdLineParsed().

IMPEX std::string hugin_utils::GetUserAppDataDir (  ) 

returns the directory for user specific Hugin settings, e.g.

lens database the directory is automatically created if it does not exists

Returns:
path, empty if path could not retrieved or not created

Definition at line 429 of file utils.cpp.

References cerr.

Referenced by HuginBase::LensDB::LensDB::LensDB().

bool hugin_utils::CreateContext ( int *  argcp,
char **  argv 
)

Definition at line 602 of file utils.cpp.

References hugin_utils::ContextSettings::colormap, hugin_utils::ContextSettings::context, context, hugin_utils::ContextSettings::display, hugin_utils::ContextSettings::visualInfo, and hugin_utils::ContextSettings::window.

Referenced by initGPU().

void hugin_utils::DestroyContext (  ) 

Definition at line 645 of file utils.cpp.

References hugin_utils::ContextSettings::colormap, hugin_utils::ContextSettings::context, context, hugin_utils::ContextSettings::display, hugin_utils::ContextSettings::visualInfo, and hugin_utils::ContextSettings::window.

Referenced by initGPU(), and wrapupGPU().

IMPEX bool hugin_utils::initGPU ( int *  argcp,
char **  argv 
)

Try to initalise GLUT and GLEW, and create an OpenGL context for GPU stitching.

OpenGL extensions required by the GPU stitcher (-g option) are checked here.

Returns:
true if everything went OK, false if we can't use GPU mode.

Definition at line 670 of file utils.cpp.

References cerr, cout, CreateContext(), DestroyContext(), and stripPath().

Referenced by main().

IMPEX bool hugin_utils::wrapupGPU (  ) 

cleanup GPU settings

Definition at line 716 of file utils.cpp.

References DestroyContext().

Referenced by main().

IMPEX std::string hugin_utils::GetHuginVersion (  ) 

return a string with version numbers

Definition at line 722 of file utils.cpp.

Referenced by EVT_NOTEBOOK_PAGE_CHANGED(), HuginQueue::detail::GenerateFinalArgfile(), AboutDialog::GetSystemInformation(), main(), MainFrame::MainFrame(), HuginQueue::detail::PrintDetailInfo(), printVersion(), and usage().

IMPEX std::string hugin_utils::GetICCDesc ( const vigra::ImageImportInfo::ICCProfile &  iccProfile  ) 

returns description of given icc profile

Definition at line 727 of file utils.cpp.

Referenced by HuginBase::Color::detail::GetMonitorProfile(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), and PanoCommand::wxAddImagesCmd::processPanorama().

IMPEX std::string hugin_utils::GetICCDesc ( const cmsHPROFILE &  profile  ) 

Definition at line 745 of file utils.cpp.

References StrTrim().

template<typename STR>
bool hugin_utils::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 159 of file utils.h.

References DEBUG_DEBUG.

Referenced by HuginBase::PTScriptParsing::getDoubleParam(), HuginBase::PTScriptParsing::getPTDoubleParam(), HuginBase::LensDB::LensDB::Database::ImportCropFactor(), HuginBase::LensDB::LensDB::Database::ImportDistortion(), HuginBase::LensDB::LensDB::Database::ImportEMOR(), HuginBase::LensDB::LensDB::Database::ImportHFOV(), HuginBase::LensDB::LensDB::Database::ImportLensCrop(), HuginBase::LensDB::LensDB::Database::ImportTCA(), HuginBase::LensDB::LensDB::Database::ImportVignetting(), GLPreviewFrame::OnNumTransform(), HuginBase::PTScriptParsing::readVar(), str2double(), str2double(), and PreferencesDialog::UpdateConfigData().

template<class str>
str hugin_utils::QuoteStringInternal ( const str &  arg,
const str &  quotechar,
const str &  replacements 
)

Definition at line 225 of file utils.h.


Variable Documentation

ContextSettings hugin_utils::context [static]

Definition at line 600 of file utils.cpp.

Referenced by CreateContext(), and DestroyContext().


Generated on 1 Sep 2015 for Hugintrunk by  doxygen 1.4.7