|
Hugin trunk 0.1
|
namespace for various utils More...
Classes | |
| struct | ContextSettings |
| class | DisableWindow |
| helper class, it disables the control/window in the constructor and automatically enables it back in destructor, create this DisableWindow class on the stack, this disables the control, when the variable goes out of scope the connected control is automatically enabled again More... | |
| struct | TDiff2D |
Typedefs | |
| typedef std::unique_ptr< wxMessageDialogBase > | MessageDialog |
| 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 "echar, 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 "". | |
| WXIMPEX wxString | GetFormattedTimeSpan (const wxTimeSpan &timeSpan) |
| void | RestoreFramePosition (wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize) |
| void | StoreFramePosition (wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize) |
| void | RestoreFramePositionOnly (wxTopLevelWindow *frame, const wxString &basename) |
| void | StoreFramePositionOnly (wxTopLevelWindow *frame, const wxString &basename) |
| int | HuginMessageBox (const wxString &message, const wxString &caption, int style, wxWindow *parent) |
| MessageDialog | GetMessageDialog (const wxString &message, const wxString &caption, int style, wxWindow *parent) |
| bool | AskUserOverwrite (const wxString &filename, const wxString &caption, wxWindow *parent) |
| ask user if the given file should be overwritten, return true if the user confirmed the overwritting | |
| 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]. | |
| int | _gcd (int a, int b) |
| int | gcd (int a, int b) |
| function to calculate greated common divisor using Euclidean algorithm both arguments should be >=0 | |
| double | round (double x) |
| float | roundf (float x) |
| int | ceili (double x) |
| int | floori (double x) |
| template<class T > | |
| int | roundi (T x) |
| 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. | |
| template<class T > | |
| 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 > | |
| 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. | |
| template<class str > | |
| str | quoteStringInternal (const str &arg, const str "echar, 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::string > | SplitString (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 | |
| bool | StringContainsCaseInsensitive (const std::string &s1, const std::string &s2) |
| check if s1 contains s2 using case insensitive comparison | |
| 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 | |
| bool | IsFileTypeSupported (const std::string &filename) |
| return true, if file type by extension is supported by vigra | |
| void | EnforceExtension (std::string &filename, const std::string &defaultExtension) |
| check if filename contains extension, if not add default extension | |
| std::string | GetOutputFilename (const std::string &out, const std::string &in, const std::string &suffix) |
| construct output filename, if ouput is known return this value otherwise use the input filename and append the suffix before the extension | |
| std::string | GetDataDir () |
| returns the full path to the data directory | |
| std::string | GetHomeDir () |
| 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) |
| bool | IsLinearICCProfile (const vigra::ImageImportInfo::ICCProfile &iccProfile) |
| return true if icc profile is linear one, otherwise return false | |
| std::vector< std::string > | GetRawExtensions () |
| return vector of known extensions of raw files, all lower case | |
| bool | IsRawExtension (const std::string testExt) |
| return true if extension belongs to a raw file | |
| bool | CheckInterpolator (int value) |
| check that interpolator number is valid | |
| 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 "echar, const str &replacements) |
Variables | |
| static ContextSettings | context |
namespace for various utils
Definition at line 162 of file hugin_math.h.
| typedef std::unique_ptr<wxMessageDialogBase> hugin_utils::MessageDialog |
| WXIMPEX bool hugin_utils::AskUserOverwrite | ( | const wxString & | filename, |
| const wxString & | caption, | ||
| wxWindow * | parent | ||
| ) |
ask user if the given file should be overwritten, return true if the user confirmed the overwritting
Definition at line 233 of file wxutils.cpp.
References HuginMessageBox(), and threshold().
Referenced by MaskEditorPanel::OnMaskSave(), wxGraphTools::GraphPopupWindow::OnRightDown(), LensCalFrame::OnSaveProject(), MainFrame::OnSaveProjectAs(), PerspectivePanel::OnSavePTO(), SaveLensParametersToIni(), and LensCalFrame::SaveLensToIni().
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 229 of file hugin_math.h.
References roundi(), and threshold().
Definition at line 60 of file hugin_math.h.
References threshold().
Referenced by HuginBase::estimateImageAlpha().
check that interpolator number is valid
check that given interpolator number is valid
Definition at line 986 of file utils.cpp.
References vigra_ext::INTERP_AABOX, vigra_ext::INTERP_AACUBIC, vigra_ext::INTERP_AALANCZOS, vigra_ext::INTERP_AATRIANGLE, vigra_ext::INTERP_BILINEAR, vigra_ext::INTERP_CUBIC, vigra_ext::INTERP_NEAREST_NEIGHBOUR, vigra_ext::INTERP_SINC_1024, vigra_ext::INTERP_SINC_256, vigra_ext::INTERP_SPLINE_16, vigra_ext::INTERP_SPLINE_36, and vigra_ext::INTERP_SPLINE_64.
Referenced by HuginBase::PanoramaMemento::loadPTScript(), and main().
| IMPEX void hugin_utils::ControlPointErrorColour | ( | const double | cperr, |
| double & | r, | ||
| double & | g, | ||
| double & | b | ||
| ) |
Definition at line 341 of file utils.cpp.
References threshold(), XP1, and XP2.
Referenced by PreviewControlPointTool::AfterDrawImagesEvent(), PreviewLayoutLinesTool::LineDetails::draw(), and CPImagesComboBox::OnDrawItem().
Definition at line 776 of file utils.cpp.
References hugin_utils::ContextSettings::colormap, hugin_utils::ContextSettings::context, context, hugin_utils::ContextSettings::display, threshold(), hugin_utils::ContextSettings::visualInfo, and hugin_utils::ContextSettings::window.
Referenced by initGPU().
| void hugin_utils::DestroyContext | ( | ) |
Definition at line 819 of file utils.cpp.
References hugin_utils::ContextSettings::colormap, hugin_utils::ContextSettings::context, context, hugin_utils::ContextSettings::display, threshold(), hugin_utils::ContextSettings::visualInfo, and hugin_utils::ContextSettings::window.
Referenced by initGPU(), and wrapupGPU().
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 228 of file utils.cpp.
References threshold().
Referenced by doubleTowxString(), GLPreviewFrame::panoramaChanged(), PreviewFrame::panoramaChanged(), HuginBase::SrcPanoImage::readEXIF(), HuginBase::Nona::SetAdvancedOption(), and PanoPanel::UpdateDisplay().
Definition at line 31 of file wxPlatform.cpp.
References doubleToString(), and threshold().
Referenced by LensCalFrame::AddImages(), HFOVDialog::HFOVDialog(), ImageVariableDialog::InitValues(), ImagesTreeCtrl::OnBeginEdit(), HFOVDialog::OnCropFactorChanged(), HFOVDialog::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), HFOVDialog::OnLoadLensParameters(), CPListFrame::OnSelectButton(), ImagesPanel::OnSelectionChanged(), HFOVDialog::OnTypeChanged(), LensCalFrame::Optimize(), ImagesPanel::panoramaChanged(), LensCalFrame::ParametersToDisplay(), LoadLensDBDialog::SetAperture(), SaveLensDBDialog::SetAperture(), LoadLensDBDialog::SetFocalLength(), SaveLensDBDialog::SetFocalLength(), PerspectivePanel::SetImage(), LoadLensDBDialog::SetSubjectDistance(), SaveLensDBDialog::SetSubjectDistance(), PreferencesDialog::UpdateDisplayData(), ImagesTreeCtrl::UpdateGroupText(), ImagesTreeCtrl::UpdateImageText(), and HuginQueue::wxStringFromCDouble().
| 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(), and threshold().
Referenced by HuginBase::StraightenPanorama::calcStraighteningRotation().
| IMPEX void hugin_utils::EnforceExtension | ( | std::string & | filename, |
| const std::string & | defaultExtension | ||
| ) |
check if filename contains extension, if not add default extension
Definition at line 411 of file utils.cpp.
References getExtension(), stripExtension(), and threshold().
Referenced by main().
Escape dangerous chars in makefile strings/filenames (space),#,=.
Definition at line 143 of file platform.h.
References quoteStringInternal(), and threshold().
| double hugin_utils::euclid_dist | ( | InputIterator1 | first1, |
| InputIterator1 | last1, | ||
| InputIterator2 | first2 | ||
| ) |
calculate squared Euclidean distance between two vectors.
Definition at line 195 of file hugin_math.h.
References threshold().
checks if file exists
Definition at line 362 of file utils.cpp.
References threshold().
Referenced by HuginBase::LensDB::LensDB::Database::Database(), GenerateThumbnail(), GetAbsoluteFilename(), PanoDetector::loadProject(), main(), BrowsePTOFilesDialog::ParsePTOFile(), PrintImageInfo(), reduceFilesToHDR(), and StackImagesAndMask().
Definition at line 65 of file hugin_math.h.
References threshold().
Referenced by HuginBase::CalculateCPStatisticsRadial::calcCtrlPntsRadiStats(), HuginBase::estimateImageAlpha(), PanoOutputDialog::PanoOutputDialog(), WinsorMeanStacker< ValueType >::Trim(), PanoPanel::UpdateDisplay(), PreferencesDialog::UpdateDisplayData(), and GLPreviewFrame::UpdateRoiDisplay().
function to calculate greated common divisor using Euclidean algorithm both arguments should be >=0
Definition at line 35 of file hugin_math.cpp.
References _gcd(), and threshold().
Referenced by PanoPanel::UpdateDisplay(), and GLPreviewFrame::UpdateRoiDisplay().
returns the full absolute filename
@TODO replace realpath with function with works without this hack
Definition at line 368 of file utils.cpp.
References FileExists(), and threshold().
Referenced by CreateMissingImages(), main(), PTOCopyMove(), and ReadPanoramaOptionsFromIni().
| IMPEX std::string hugin_utils::GetCurrentTimeString | ( | ) |
| IMPEX std::string hugin_utils::GetDataDir | ( | ) |
returns the full path to the data directory
Definition at line 441 of file utils.cpp.
References threshold().
Referenced by RTRawImport::GetCmdQueueForReference(), HuginQueue::GetStitchingCommandQueue(), ImageVariablesExpressionDialog::ImageVariablesExpressionDialog(), PanoDetector::LoadSVMModel(), main(), and HuginExecutor::OnCmdLineParsed().
Get extension of a filename.
Definition at line 99 of file utils.cpp.
References threshold().
Referenced by EnforceExtension(), GetOutputFilename(), IsFileTypeSupported(), main(), reduceFilesToHDR(), SetCompression(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch().
| WXIMPEX wxString hugin_utils::GetFormattedTimeSpan | ( | const wxTimeSpan & | timeSpan | ) |
Definition at line 29 of file wxutils.cpp.
References threshold().
Referenced by BrowsePTOFilesDialog::FillPanoInfo(), and PossiblePano::GetDuration().
| std::string hugin_utils::GetHomeDir | ( | ) |
Definition at line 477 of file utils.cpp.
References threshold().
Referenced by GetUserAppDataDir().
| IMPEX std::string hugin_utils::GetHuginVersion | ( | ) |
return a string with version numbers
Definition at line 907 of file utils.cpp.
References threshold().
Referenced by AboutDialog::AboutDialog(), HuginQueue::detail::GenerateFinalArgfile(), AboutDialog::GetSystemInformation(), main(), MainFrame::MainFrame(), RunStitchFrame::OnAbout(), HuginQueue::detail::PrintDetailInfo(), printVersion(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), usage(), and usage().
| IMPEX std::string hugin_utils::GetICCDesc | ( | const cmsHPROFILE & | profile | ) |
Definition at line 930 of file utils.cpp.
References StrTrim(), and threshold().
returns description of given icc profile
Definition at line 912 of file utils.cpp.
References GetICCDesc(), and threshold().
Referenced by GetICCDesc(), PrintImageInfo(), PanoCommand::wxAddImagesCmd::processPanorama(), and PanoCommand::wxLoadPTProjectCmd::processPanorama().
| WXIMPEX MessageDialog hugin_utils::GetMessageDialog | ( | const wxString & | message, |
| const wxString & | caption, | ||
| int | style, | ||
| wxWindow * | parent | ||
| ) |
Definition at line 212 of file wxutils.cpp.
References threshold().
Referenced by PanoPanel::CheckFreeSpace(), PanoPanel::CheckGoodSize(), MainFrame::CloseProject(), PanoOperation::AddImageOperation::GetInternalCommand(), BatchFrame::OnClose(), PanoDropTarget::OnDropFiles(), huginApp::OnInit(), CPEditorPanel::PointFineTune(), PanoCommand::wxAddImagesCmd::processPanorama(), and RunStitchPanel::StitchProject().
| IMPEX std::string hugin_utils::GetOutputFilename | ( | const std::string & | out, |
| const std::string & | in, | ||
| const std::string & | suffix | ||
| ) |
construct output filename, if ouput is known return this value otherwise use the input filename and append the suffix before the extension
Definition at line 420 of file utils.cpp.
References getExtension(), and threshold().
Referenced by main().
Get the path to a filename.
Definition at line 184 of file utils.cpp.
References threshold().
Referenced by CheckProjectFile(), CreateMissingImages(), GenerateSequenceDialog::DoGeneratePanorama(), GenerateThumbnail(), Papywizard::ImportPapywizardFile(), PanoDetector::loadProject(), main(), HuginExecutor::OnRun(), iCPApp::OnRun(), LensCalFrame::OnSaveProject(), MainFrame::OnSaveProject(), PerspectivePanel::OnSavePTO(), BrowsePTOFilesDialog::ParsePTOFile(), processPTO(), PTOCopyMove(), ReadPanoramaOptionsFromIni(), MainFrame::RunAssistant(), and PanoDetector::writeOutput().
| IMPEX std::vector< std::string > hugin_utils::GetRawExtensions | ( | ) |
return vector of known extensions of raw files, all lower case
return vector of known extensions of raw files, all in lower case
Definition at line 964 of file utils.cpp.
References threshold().
Referenced by GetFileDialogImageAndRawFilters(), IsRawExtension(), and IsRawExtension().
| 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
Definition at line 497 of file utils.cpp.
References GetHomeDir(), and threshold().
Referenced by ChangeUserDefinedSequenceDialog::FillAssistantUserDefined(), ChangeUserDefinedSequenceDialog::FillStitcherUserDefined(), SelectAspectRatioDialog::GetAspectRatioFilename(), HuginQueue::GetAssistantCommandQueue(), Batch::GetBatchFilename(), EditOutputIniDialog::GetIniFileName(), ImageVariablesExpressionDialog::ImageVariablesExpressionDialog(), HuginBase::LensDB::LensDB::LensDB(), MainFrame::MainFrame(), HuginExecutor::OnCmdLineParsed(), EnfusePanel::OnLoadSetting(), and EnfusePanel::OnSaveSetting().
| WXIMPEX int hugin_utils::HuginMessageBox | ( | const wxString & | message, |
| const wxString & | caption, | ||
| int | style, | ||
| wxWindow * | parent | ||
| ) |
Definition at line 176 of file wxutils.cpp.
References threshold().
Referenced by LensCalFrame::AddImages(), ImageVariableDialog::ApplyNewVariables(), OptimizePanel::AskApplyResult(), AskUserOverwrite(), BatchFrame::BatchFrame(), HDRMergeOptionsDialog::BuildCommandLineArgument(), RawImport::CheckExe(), PanoPanel::CheckGoodSize(), PanoPanel::CheckHasImages(), CheckInputs(), CheckLensStacks(), Batch::ClearBatch(), CPMessage(), RunStitchPanel::DetectProject(), GenerateSequenceDialog::DoGeneratePanorama(), PanoPanel::DoSendToBatch(), PanoPanel::DoStitch(), PanoPanel::DoUserDefinedStitch(), CPEditorPanel::estimateAndAddOtherPoint(), GetDataPath(), EnfusePanel::GetEnfuseCommandLine(), PanoOperation::AddImagesSeriesOperation::GetInternalCommand(), PanoOperation::ChangeLensOperation::GetInternalCommand(), PanoOperation::LoadLensOperation::GetInternalCommand(), PanoOperation::RemoveControlPointsOperation::GetInternalCommand(), PanoOperation::CleanControlPointsOperation::GetInternalCommand(), PanoOperation::CelesteOperation::GetInternalCommand(), PanoOperation::ChangeStackOperation::GetInternalCommand(), PerspectivePanel::GetPanorama(), ProjectListBox::GetProjectId(), StackerPanel::GetStackerCommandLine(), Batch::GetStatus(), MainFrame::GetSVMModel(), Papywizard::ImportPapywizardFile(), Batch::LoadBatchFile(), LoadLensParametersChoose(), MainFrame::LoadProjectFile(), CPEditorPanel::NewPointChange(), RunStitchFrame::OnAbout(), EditOutputIniDialog::OnAddSection(), BatchFrame::OnButtonChangePrefix(), FindPanoDialog::OnButtonClose(), BatchFrame::OnButtonGenerateSequence(), BatchFrame::OnButtonOpenWithHugin(), BatchFrame::OnButtonRemoveComplete(), BatchFrame::OnButtonRemoveFromList(), BatchFrame::OnButtonReset(), BatchFrame::OnButtonResetAll(), FindPanoDialog::OnButtonSend(), FindPanoDialog::OnButtonStart(), CPEditorPanel::OnCelesteButton(), CPEditorPanel::OnCleanCPButton(), PreferencesDialog::OnCPDetectorDelete(), PreferencesDialog::OnCPDetectorEdit(), GLPreviewFrame::OnCreateCP(), EnfusePanel::OnCreateFile(), HFOVDialog::OnCropFactorChanged(), GLPreviewFrame::OnDragChoice(), ImagesTreeCtrl::OnEndEdit(), PreferencesDialog::OnExifArgfile2Edit(), PreferencesDialog::OnExifArgfileEdit(), LensCalFrame::OnFindLines(), MainFrame::OnFineTuneAll(), HFOVDialog::OnFocalLengthChanged(), ImagesPanel::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), GLPreviewFrame::OnHideProjectionHints(), stitchApp::OnInit(), LensCalApp::OnInit(), huginApp::OnInit(), PTBatcherGUI::OnInit(), ToolboxApp::OnInit(), MainFrame::OnLoadingFailed(), MainFrame::OnLoadProject(), MaskEditorPanel::OnMaskLoad(), ImagesPanel::OnMaxEvDiffChanged(), MainFrame::OnMergeProject(), ImagesPanel::OnMinimumOverlapChanged(), MainFrame::OnMRUFiles(), GLPreviewFrame::OnNumTransform(), HFOVDialog::OnOk(), SaveLensDBDialog::OnOk(), CPDetectorDialog::OnOk(), RawImportDialog::OnOk(), ChangeUserDefinedSequenceDialog::OnOk(), CreateBrightImgDlg::OnOk(), SelectDirectoryFileDialog::OnOk(), MainFrame::OnOpenPTBatcher(), LensCalFrame::OnOptimize(), OptimizePanel::OnOptimizeButton(), OptimizePhotometricPanel::OnOptimizeButton(), RawImportProgress::OnProcessReferenceTerminate(), LensCalFrame::OnRefresh(), MainFrame::OnRemoveCPinMasks(), EditOutputIniDialog::OnRenameSection(), PreferencesDialog::OnRestoreDefaults(), ImageVariablesExpressionDialog::OnSave(), LensCalFrame::OnSaveLens(), LensCalFrame::OnSaveProject(), MainFrame::OnSaveProject(), EnfusePanel::OnSaveSetting(), MainFrame::OnSendToAssistantQueue(), MainFrame::OnSetGuiAdvanced(), MainFrame::OnSetGuiSimple(), LensCalFrame::OnShowDistortionGraph(), RTRawImport::ProcessAdditionalParameters(), PanoCommand::wxAddImagesCmd::processPanorama(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), PanoCommand::wxApplyTemplateCmd::processPanorama(), PTPrintErrorWX(), PerspectivePanel::ReadInputs(), Batch::RemoveProject(), Batch::RemoveProjectAtIndex(), MainFrame::RunAssistant(), ImagesPanel::RunCPGenerator(), OptimizePhotometricPanel::runOptimizer(), OptimizePanel::runOptimizer(), SaveLensParameters(), Batch::SetStatus(), GLViewer::SetUpContext(), RunStitchPanel::StitchProject(), str2double(), GLPreviewFrame::UpdateOverviewMode(), PreviewPanel::updatePreview(), and EditOutputIniDialog::WriteIni().
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.
Definition at line 845 of file utils.cpp.
References CreateContext(), DestroyContext(), stripPath(), and threshold().
Referenced by main().
return true, if file type by extension is supported by vigra
Definition at line 405 of file utils.cpp.
References getExtension(), threshold(), and tolower().
Referenced by main().
return true if icc profile is linear one, otherwise return false
Definition at line 940 of file utils.cpp.
References threshold().
Referenced by main(), and PanoCommand::wxAddImagesCmd::processPanorama().
return true if extension belongs to a raw file
Definition at line 970 of file utils.cpp.
References GetRawExtensions(), threshold(), and tolower().
Referenced by main().
Definition at line 187 of file hugin_math.h.
References threshold().
Referenced by HuginBase::CalculateOptimalScale::calcOptimalPanoScale(), HuginLines::GetFootpoint(), HuginBase::AllPointSampler::sampleAllPanoPoints(), and HuginBase::RandomPointSampler::sampleRandomPanoPoints().
Quote a filename, so that it is surrounded by "".
@BUG I don't know the escape char for windows
Definition at line 158 of file platform.h.
References quoteStringInternal(), and threshold().
Referenced by AutoPanoSift::automatch(), and AutoPanoKolor::automatch().
Try to escape special chars on windows and linux.
@BUG: 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 106 of file platform.h.
References quoteStringInternal(), and threshold().
| str hugin_utils::quoteStringInternal | ( | const str & | arg, |
| const str & | quotechar, | ||
| const str & | replacements | ||
| ) |
utility function; escapes characters in replacements with quotechar.
Definition at line 54 of file platform.h.
References threshold().
Referenced by escapeStringMake(), quoteFilename(), quoteString(), and quoteStringShell().
| str hugin_utils::QuoteStringInternal | ( | const str & | arg, |
| const str & | quotechar, | ||
| const str & | replacements | ||
| ) |
Definition at line 183 of file utils.h.
References threshold().
Try to escape special chars in a string used by a unix type shell.
@BUG: 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 128 of file platform.h.
References quoteStringInternal(), and threshold().
replace all characters oldChar in s with newChar
Definition at line 325 of file utils.cpp.
References threshold().
| WXIMPEX void hugin_utils::RestoreFramePosition | ( | wxTopLevelWindow * | frame, |
| const wxString & | basename, | ||
| const bool | ignoreMaximize | ||
| ) |
Definition at line 67 of file wxutils.cpp.
References DEBUG_TRACE, RestoreFramePositionOnly(), and threshold().
Referenced by BrowsePTOFilesDialog::BrowsePTOFilesDialog(), ChangeUserDefinedSequenceDialog::ChangeUserDefinedSequenceDialog(), CPDetectorDialog::CPDetectorDialog(), CPListFrame::CPListFrame(), CreateBrightImgDlg::CreateBrightImgDlg(), EditOutputIniDialog::EditOutputIniDialog(), FailedProjectsDialog::FailedProjectsDialog(), FindPanoDialog::FindPanoDialog(), GenerateSequenceDialog::GenerateSequenceDialog(), GLPreviewFrame::GLPreviewFrame(), ImageVariablesExpressionDialog::ImageVariablesExpressionDialog(), LoadLensDBDialog::LoadLensDBDialog(), MaskLoadDialog::MaskLoadDialog(), PreferencesDialog::OnExifArgfile2Edit(), PreferencesDialog::OnExifArgfileEdit(), LensCalApp::OnInit(), huginApp::OnInit(), ImageVariablesExpressionDialog::OnTest(), Papywizard::PapywizardImportDialog::PapywizardImportDialog(), PreferencesDialog::PreferencesDialog(), PreviewFrame::PreviewFrame(), RawImportDialog::RawImportDialog(), RawImportProgress::RawImportProgress(), SaveLensDBDialog::SaveLensDBDialog(), SelectAspectRatioDialog::SelectAspectRatioDialog(), SelectDirectoryFileDialog::SelectDirectoryFileDialog(), and ToolboxFrame::ToolboxFrame().
| WXIMPEX void hugin_utils::RestoreFramePositionOnly | ( | wxTopLevelWindow * | frame, |
| const wxString & | basename | ||
| ) |
Definition at line 143 of file wxutils.cpp.
References threshold().
Referenced by ImageVariableDialog::ImageVariableDialog(), PanoOutputDialog::PanoOutputDialog(), ResetDialog::ResetDialog(), and RestoreFramePosition().
Definition at line 50 of file hugin_math.h.
References threshold().
Referenced by wxGraphTools::Graph::TransformX(), wxGraphTools::Graph::TransformY(), and PreviewPanel::updatePreview().
Definition at line 55 of file hugin_math.h.
References threshold().
Definition at line 73 of file hugin_math.h.
References threshold().
Referenced by HuginLines::_getFilteredLines(), vigra_ext::ApplyGammaFunctor< vigra::UInt16, vigra::UInt8 >::ApplyGammaFunctor(), lfeat::CircularKeyPointDescriptor::assignOrientation(), AutoPanoSiftMultiRow::automatch(), lfeat::BoxFilter::BoxFilter(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcAlpha(), calcCircleROIFromPoints(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::calcSrcCoordImgs(), lfeat::KeyPointDetector::calcTrace(), HuginBase::Photometric::ResponseTransform< VTIn >::calcVigFactor(), HuginBase::Panorama::centerCropImage(), correctImage(), CPEvent::CPEvent(), createCtrlPoints(), lfeat::CircularKeyPointDescriptor::createDescriptor(), MaskEditorPanel::DisplayCrop(), PanoPanel::DoCalcFOV(), PanoPanel::DoCalcOptimalWidth(), DisplayedControlPoint::Draw(), DisplayedControlPoint::DrawLine(), DisplayedControlPoint::DrawLineSegment(), PreviewPanel::DrawOutline(), LensCalImageCtrl::DrawView(), HuginBase::estimateImageAlpha(), MyExecPanel::ExecNextQueue(), CPEditorPanel::FineTuneSelectedPoint(), HuginQueue::GetAssistantCommandQueue(), HuginBase::LensDB::LensDB::GetCrop(), CPImageCtrl::GetMagBitmap(), PerspectivePanel::GetPanorama(), HuginBase::CalculateOptimalScale::getResultOptimalWidth(), GreatCircleArc::GreatCircleArc(), loadPoints(), loadPointsC(), main(), PanoDetector::matchMultiRow(), GLViewer::MouseEnter(), GLViewer::MouseMotion(), CPEditorPanel::OnCPEvent(), GLPreviewFrame::OnCreateCP(), MainFrame::OnFineTuneAll(), GLPreviewFrame::OnFitPano(), PreviewFrame::OnFitPano(), LensCalImageCtrl::OnMouseEvent(), PanoOutputDialog::OnOk(), CPImageCtrl::OnPaint(), RawImportProgress::OnProcessReferenceTerminate(), MyExecPanel::OnProcessTerminated(), RawImportProgress::OnProgress(), PanoOutputDialog::PanoOutputDialog(), GLPreviewFrame::panoramaChanged(), PreviewFrame::panoramaChanged(), PointFineTuneProjectionAware(), print_result(), PanoCommand::CenterPanoCmd::processPanorama(), PanoCommand::StraightenPanoCmd::processPanorama(), ReadPanoramaOptionsFromIni(), HuginQueue::detail::ReplaceWidthHeightPlaceHolder(), LensCalImageCtrl::Resize(), CPImageCtrl::roundP(), HuginBase::FitPanorama::runAlgorithm(), HuginBase::PointSampler::sampleAndExtractPoints(), SetCanvas(), SetFOV(), HuginBase::PanoramaOptions::setVFOV(), HuginBase::PanoramaOptions::setWidth(), CPImageCtrl::showPosition(), hugin_utils::TDiff2D< T >::toDiff2D(), HuginBase::Nona::traceImageOutline(), MaskImageCtrl::UpdateCrop(), and PreferencesDialog::UpdateDisplayData().
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 170 of file hugin_math.h.
Referenced by vigra_ext::PointFineTune(), and VisualizationState::SetViewingCenter().
| 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 294 of file utils.cpp.
References StrTrim(), and threshold().
Referenced by EnableImages(), GetVigraImageFilter(), 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(), Parser::PanoParseExpression(), ParseImageLensStackString(), Parser::ParseVariableString(), SetCrop(), SetCropToImages(), and SetOutputType().
| T hugin_utils::sqr | ( | T | t | ) |
Definition at line 181 of file hugin_math.h.
References threshold().
Referenced by HuginLines::_getFilteredLines(), HuginBase::MaskPolygon::FindPointNearPos(), HuginLines::GetFootpoint(), MaskImageCtrl::OnLeftMouseUp(), MaskImageCtrl::OnRightMouseUp(), HuginBase::AllPointSampler::sampleAllPanoPoints(), HuginBase::RandomPointSampler::sampleRandomPanoPoints(), and MaskImageCtrl::UpdateCrop().
| T hugin_utils::sqr_dist | ( | InputIterator1 | first1, |
| InputIterator1 | last1, | ||
| InputIterator2 | first2, | ||
| T | res | ||
| ) |
calculate squared Euclidean distance between two vectors.
Definition at line 212 of file hugin_math.h.
References threshold().
| WXIMPEX void hugin_utils::StoreFramePosition | ( | wxTopLevelWindow * | frame, |
| const wxString & | basename, | ||
| const bool | ignoreMaximize | ||
| ) |
Definition at line 106 of file wxutils.cpp.
References DEBUG_TRACE, and threshold().
Referenced by PreferencesDialog::OnExifArgfile2Edit(), PreferencesDialog::OnExifArgfileEdit(), LoadLensDBDialog::OnOk(), SaveLensDBDialog::OnOk(), ImageVariablesExpressionDialog::OnOk(), SelectDirectoryFileDialog::OnOk(), ImageVariablesExpressionDialog::OnTest(), GLPreviewFrame::StorePositionAndSize(), BrowsePTOFilesDialog::~BrowsePTOFilesDialog(), ChangeUserDefinedSequenceDialog::~ChangeUserDefinedSequenceDialog(), CPDetectorDialog::~CPDetectorDialog(), CPListFrame::~CPListFrame(), CreateBrightImgDlg::~CreateBrightImgDlg(), EditOutputIniDialog::~EditOutputIniDialog(), FailedProjectsDialog::~FailedProjectsDialog(), FindPanoDialog::~FindPanoDialog(), GenerateSequenceDialog::~GenerateSequenceDialog(), ImageVariablesExpressionDialog::~ImageVariablesExpressionDialog(), LensCalFrame::~LensCalFrame(), MainFrame::~MainFrame(), MaskLoadDialog::~MaskLoadDialog(), Papywizard::PapywizardImportDialog::~PapywizardImportDialog(), PreferencesDialog::~PreferencesDialog(), PreviewFrame::~PreviewFrame(), RawImportDialog::~RawImportDialog(), RawImportProgress::~RawImportProgress(), SelectAspectRatioDialog::~SelectAspectRatioDialog(), and ToolboxFrame::~ToolboxFrame().
| WXIMPEX void hugin_utils::StoreFramePositionOnly | ( | wxTopLevelWindow * | frame, |
| const wxString & | basename | ||
| ) |
Definition at line 163 of file wxutils.cpp.
References threshold().
Referenced by ResetDialog::OnOk(), ImageVariableDialog::~ImageVariableDialog(), and PanoOutputDialog::~PanoOutputDialog().
Definition at line 37 of file wxPlatform.cpp.
References stringToDouble(), and threshold().
Referenced by ImageVariableDialog::ApplyNewVariables(), PanoPanel::HFOVChanged(), HFOVDialog::OnCropFactorChanged(), ImagesPanel::OnCropFactorChanged(), ImagesTreeCtrl::OnEndEdit(), GLPreviewFrame::OnExposureChanged(), PreviewFrame::OnExposureTextChanged(), HFOVDialog::OnFocalLengthChanged(), ImagesPanel::OnFocalLengthChanged(), HFOVDialog::OnHFOVChanged(), GLPreviewFrame::OnHFOVChanged(), ImagesPanel::OnMaxEvDiffChanged(), ImagesPanel::OnMinimumOverlapChanged(), PreviewFrame::OnNumTransform(), GLPreviewFrame::OnProjParameterChanged(), GLPreviewFrame::OnRangeCompressionChanged(), PreviewFrame::OnRangeCompressionTextChanged(), CPListFrame::OnSelectButton(), ImageVariableDialog::OnShowDistortionGraph(), ImageVariableDialog::OnShowResponseGraph(), ImageVariableDialog::OnShowVignettingGraph(), PreviewFrame::OnTextCtrlChanged(), CPEditorPanel::OnTextPointChange(), GLPreviewFrame::OnVFOVChanged(), PerspectivePanel::ReadInputs(), LensCalFrame::ReadInputs(), and PanoPanel::VFOVChanged().
| IMPEX bool hugin_utils::StringContainsCaseInsensitive | ( | const std::string & | s1, |
| const std::string & | s2 | ||
| ) |
check if s1 contains s2 using case insensitive comparison
Definition at line 335 of file utils.cpp.
References threshold().
Referenced by HuginBase::SrcPanoImage::readEXIF().
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.
Definition at line 114 of file utils.h.
References DEBUG_DEBUG, and threshold().
Referenced by HuginBase::SrcPanoImage::applyEXIFValues(), CheckDouble(), HuginBase::Nona::GetAdvancedOption(), 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(), main(), GLPreviewFrame::OnNumTransform(), ParseCoordinateRelativ(), Papywizard::ParseHeader(), BrowsePTOFilesDialog::ParsePTOFile(), Papywizard::ParseShoot(), HuginBase::PTScriptParsing::readVar(), SetExposure(), str2double(), str2double(), and PreferencesDialog::UpdateConfigData().
convert string to integer value, returns true, if sucessful
Definition at line 264 of file utils.cpp.
References StrTrim(), and threshold().
Referenced by CheckInt(), EnableImages(), IniParser::GetKey(), 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(), HuginBase::PanoramaMemento::loadPTScript(), main(), ParseCoordinateRelativ(), ParseSingleImage(), Parser::ParseVarNumber(), HuginBase::PTScriptParsing::readVar(), SetCanvas(), SetCropToImages(), and stringToUInt().
convert string to unsigned integer value, returns true, if sucessful
Definition at line 280 of file utils.cpp.
References stringToInt(), and threshold().
Referenced by HuginBase::PanoramaMemento::loadPTScript(), main(), and SetCrop().
remove extension of a filename
Definition at line 130 of file utils.cpp.
References threshold().
Referenced by EnforceExtension(), getKeyfilenameFor(), InputImage::getMaskFilename(), main(), reduceFilesToHDR(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch().
remove the path of a filename (mainly useful for gui display of filenames)
Definition at line 160 of file utils.cpp.
References threshold().
Referenced by HuginBase::Nona::TiffMultiLayerRemapper< ImageType, AlphaImageType >::finalizeOutputFile(), HuginBase::ImageCache::getImage(), getKeyfilenameFor(), HuginBase::Nona::FileRemapper< ImageType, AlphaType >::getRemapped(), HuginBase::ImageCache::getSmallImage(), initGPU(), main(), parseOptions(), PanoCommand::wxLoadPTProjectCmd::processPanorama(), ReadPanoramaOptionsFromIni(), AutoCtrlPointCreator::readUpdatedControlPoints(), HuginBase::Nona::remapImage(), HuginBase::Nona::RemappedPanoImage< RemapImage, AlphaImage >::remapImage(), HuginBase::Nona::detail::saveRemapped(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), and HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch().
remove trailing and leading white spaces and tabs
Definition at line 208 of file utils.cpp.
References threshold().
Referenced by HuginBase::Exiv2Helper::getExiv2ValueString(), HuginBase::Exiv2Helper::getExiv2ValueString(), GetICCDesc(), HuginBase::Exiv2Helper::getLensName(), main(), Parser::PanoParseExpression(), Parser::ParseSingleVar(), print_result(), ProcessSection(), IniParser::Read(), SetCrop(), SetOutputType(), SplitString(), and stringToInt().
|
inline |
convert a string to lowercase
Definition at line 49 of file stl_utils.h.
References threshold(), and tolower().
Referenced by CheckCondition(), IsFileTypeSupported(), IsRawExtension(), main(), Parser::ParseExpression(), parseOptions(), ProcessSection(), HuginBase::SrcPanoImage::readEXIF(), ReadProjectionNames(), reduceFilesToHDR(), HuginBase::Nona::SimpleStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::WeightedStitcher< ImageType, AlphaType >::stitch(), HuginBase::Nona::ReduceStitcher< ImageType, AlphaType >::stitch(), and tolower().
|
inline |
Definition at line 59 of file stl_utils.h.
References threshold(), and toupper().
Referenced by IniParser::GetKey(), iterateFileSystem(), main(), ProcessSection(), PTOCopyMove(), SetCompression(), and toupper().
cleanup GPU settings
Definition at line 901 of file utils.cpp.
References DestroyContext().
Referenced by main().
Quote a filename, so that it is surrounded by "".
@BUG I don't know the escape char for windows
Definition at line 82 of file wxPlatform.h.
References threshold(), and wxQuoteStringInternal().
Referenced by AutoPanoSift::automatch(), AutoPanoKolor::automatch(), AutoPanoSift::automatch(), AutoCtrlPointCreator::Cleanup(), PanoPanel::DoSendToBatch(), PanoPanel::DoStitch(), EnfusePanel::GetEnfuseCommandLine(), StackerPanel::GetStackerCommandLine(), MyExecuteCommandOnDialog(), and MainFrame::OnSendToAssistantQueue().
Try to escape special chars on windows and linux.
@BUG: 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 threshold(), and wxQuoteStringInternal().
Referenced by PanoPanel::DoSendToBatch().
| str hugin_utils::wxQuoteStringInternal | ( | const str & | arg, |
| const str & | quotechar, | ||
| const str & | replacements | ||
| ) |
Definition at line 36 of file wxPlatform.h.
References threshold().
Referenced by HuginQueue::wxEscapeFilename(), wxQuoteFilename(), and wxQuoteString().
|
static |
Definition at line 774 of file utils.cpp.
Referenced by CreateContext(), and DestroyContext().