utils.cpp File Reference

#include "utils.h"
#include "hugin_version.h"
#include "hugin_config.h"
#include <sys/time.h>
#include <cstdlib>
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
#include <time.h>
#include <fstream>
#include <stdio.h>
#include <cstdio>
#include <algorithm>
#include <hugin_utils/filesystem.h>
#include <lcms2.h>
#include <GL/glew.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glx.h>

Include dependency graph for utils.cpp:

Go to the source code of this file.


namespace  hugin_utils


struct  hugin_utils::ContextSettings


#define XP1   5.0f
#define XP2   10.0f


std::string hugin_utils::GetCurrentTimeString ()
 current time as a string
std::string hugin_utils::getExtension (const std::string &basename)
 Get extension of a filename.
std::string hugin_utils::stripExtension (const std::string &basename)
 remove extension of a filename
std::string hugin_utils::stripPath (const std::string &filename)
 remove the path of a filename (mainly useful for gui display of filenames)
std::string hugin_utils::getPathPrefix (const std::string &filename)
 Get the path to a filename.
std::string hugin_utils::StrTrim (const std::string &str)
 remove trailing and leading white spaces and tabs
std::string hugin_utils::doubleToString (double d, int fractionaldigits=-1)
 convert a double to a string, suitable for display within a GUI.
bool hugin_utils::stringToInt (const std::string &s, int &val)
 convert string to integer value, returns true, if sucessful
bool hugin_utils::stringToUInt (const std::string &s, unsigned int &val)
 convert string to unsigned integer value, returns true, if sucessful
std::vector< std::stringhugin_utils::SplitString (const std::string &s, const std::string &sep)
 split string s at given sep, returns vector of strings
void hugin_utils::ReplaceAll (std::string &s, const std::string &oldChar, char newChar)
 replace all characters oldChar in s with newChar
void hugin_utils::ControlPointErrorColour (const double cperr, double &r, double &g, double &b)
bool hugin_utils::FileExists (const std::string &filename)
 checks if file exists
std::string hugin_utils::GetAbsoluteFilename (const std::string &filename)
 returns the full absolute filename
bool hugin_utils::IsFileTypeSupported (const std::string &filename)
 return true, if file type by extension is supported by vigra
void hugin_utils::EnforceExtension (std::string &filename, const std::string &defaultExtension)
 check if filename contains extension, if not add default extension
std::string hugin_utils::GetDataDir ()
 returns the full path to the data directory
std::string hugin_utils::GetUserAppDataDir ()
 returns the directory for user specific Hugin settings, e.g.
bool hugin_utils::CreateContext (int *argcp, char **argv)
void hugin_utils::DestroyContext ()
bool hugin_utils::initGPU (int *argcp, char **argv)
 Try to initalise GLUT and GLEW, and create an OpenGL context for GPU stitching.
bool hugin_utils::wrapupGPU ()
 cleanup GPU settings
std::string hugin_utils::GetHuginVersion ()
 return a string with version numbers
std::string hugin_utils::GetICCDesc (const vigra::ImageImportInfo::ICCProfile &iccProfile)
 returns description of given icc profile
std::string hugin_utils::GetICCDesc (const cmsHPROFILE &profile)


static ContextSettings hugin_utils::context

Detailed Description

Pablo d'Angelo <pablo.dangelo@web.de>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this software. If not, see <http://www.gnu.org/licenses/>.

Definition in file utils.cpp.

Define Documentation

#define XP1   5.0f

Referenced by hugin_utils::ControlPointErrorColour().

#define XP2   10.0f

Referenced by hugin_utils::ControlPointErrorColour().

Generated on 20 Apr 2018 for Hugintrunk by  doxygen 1.4.7