Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Functions
HuginQueue Namespace Reference

Namespaces

 detail
 

Classes

class  NormalCommand
 normal command for queue, processing is stopped if an error occurred in program More...
 
class  OptionalCommand
 optional command for queue, processing of queue is always continued, also if an error occurred More...
 

Typedefs

typedef std::vector
< NormalCommand * > 
CommandQueue
 

Functions

CommandQueueGetAssistantCommandQueue (const HuginBase::Panorama &pano, const wxString &ExePath, const wxString &project)
 generates the command queue for running the assistant More...
 
CommandQueueGetAssistantCommandQueueUserDefined (const HuginBase::Panorama &pano, const wxString &ExePath, const wxString &project, const wxString &assistantSetting, wxArrayString &tempFilesDelete, std::ostream &errStream)
 generates the command queue for running the assistant More...
 
bool RunCommandsQueue (CommandQueue *queue, size_t threads, bool dryRun)
 execute the given, set environment variable OMP_NUM_THREADS to threads (ignored for 0) after running the function the queue is cleared More...
 
void CleanQueue (CommandQueue *queue)
 clean the queue, delete all entries, but not the queue itself More...
 
wxString GetInternalProgram (const wxString &bindir, const wxString &name)
 return path and name of external program, which comes bundled with Hugin More...
 
wxString GetExternalProgram (wxConfigBase *config, const wxString &bindir, const wxString &name)
 return path and name of external program, which can be overwritten by the user More...
 
wxString wxStringFromCDouble (double val, int precision=-1)
 convert double to wxString, it is always using a '. More...
 
const wxString GetSettingString (wxConfigBase *setting, const wxString &name, const wxString defaultValue=wxEmptyString)
 read a string from setting and remove all whitespaces More...
 
const wxString GetSettingStringTranslated (wxConfigBase *setting, const wxString &name, const wxString defaultValue=wxEmptyString)
 read a translated string from settings and remove all whitespaces More...
 
const wxString GetConfigTempDir (const wxConfigBase *config)
 return the temp dir from the preferences, ensure that it ends with path separator More...
 
template<class str >
str wxEscapeFilename (const str &arg)
 special escaping routine for CommandQueues More...
 
CommandQueueGetStitchingCommandQueue (const HuginBase::Panorama &pano, const wxString &ExePath, const wxString &project, const wxString &prefix, wxString &statusText, wxArrayString &outputFiles, wxArrayString &tempFilesDelete, std::ostream &errStream)
 generates the command queue for stitching a pano it will also generate the necessary exiftool argfiles More...
 
CommandQueueGetStitchingCommandQueueUserOutput (const HuginBase::Panorama &pano, const wxString &ExePath, const wxString &project, const wxString &prefix, const wxString &outputSettings, wxString &statusText, wxArrayString &outputFiles, wxArrayString &tempFilesDelete, std::ostream &errStream)
 generates the command queue for stitching a pano, the commands are parsed from the given executor output file More...
 
wxString GetQuotedFilenamesString (const wxArrayString &files)
 return a wxString with all files in files quoted More...
 

Typedef Documentation

typedef std::vector<NormalCommand*> HuginQueue::CommandQueue

Definition at line 61 of file Executor.h.

Function Documentation

WXIMPEX void HuginQueue::CleanQueue ( CommandQueue *  queue)

clean the queue, delete all entries, but not the queue itself

Definition at line 118 of file Executor.cpp.

Referenced by HuginQueue::detail::AddBlenderCommand(), GetAssistantCommandQueueUserDefined(), GetStitchingCommandQueueUserOutput(), and RunCommandsQueue().

WXIMPEX CommandQueue * HuginQueue::GetAssistantCommandQueue ( const HuginBase::Panorama pano,
const wxString &  ExePath,
const wxString &  project 
)

generates the command queue for running the assistant

Parameters
[in]panocontains to panorama structure for which the queue should generated
[in]ExePathbase path to all used utilities
[in]projectname of the project file, the assistant modifies the given file
Returns
pointer to CommandQueue

Definition at line 39 of file AssistantExecutor.cpp.

References HuginBase::Panorama::getCtrlPoints(), GetInternalProgram(), HuginBase::Panorama::getNrOfCtrlPoints(), HuginBase::Panorama::getNrOfImages(), hugin_utils::GetUserAppDataDir(), HUGIN_ASS_AUTO_CPCLEAN, HUGIN_ASS_LINEFIND, HUGIN_ASS_PANO_DOWNSIZE_FACTOR, HUGIN_CELESTE_AUTO, HUGIN_CELESTE_FILTER, HUGIN_CELESTE_THRESHOLD, HuginGraph::ImageGraph::IsConnected(), hugin_utils::roundi(), wxEscapeFilename(), wxStringFromCDouble(), and HuginBase::ControlPoint::X.

Referenced by RunStitchPanel::DetectProject(), HuginExecutor::OnRun(), and MainFrame::RunAssistant().

WXIMPEX CommandQueue * HuginQueue::GetAssistantCommandQueueUserDefined ( const HuginBase::Panorama pano,
const wxString &  ExePath,
const wxString &  project,
const wxString &  assistantSetting,
wxArrayString &  tempFilesDelete,
std::ostream &  errStream 
)

generates the command queue for running the assistant

Parameters
[in]panocontains to panorama structure for which the queue should generated
[in]ExePathbase path to all used utilities
[in]projectname of the project file, the assistant modifies the given file
[in]assistantSettingassistant file from which the settings should be reads
errStreamoutput stream on which the error should be written
Returns
pointer to CommandQueue

Definition at line 148 of file AssistantExecutor.cpp.

References CleanQueue(), GetConfigTempDir(), HuginBase::Panorama::getCtrlPoints(), GetExternalProgram(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getNrOfCtrlPoints(), HuginBase::Panorama::getNrOfImages(), GetSettingString(), GetSettingStringTranslated(), HUGIN_CONV_FILENAME, HuginGraph::ImageGraph::IsConnected(), wxEscapeFilename(), and HuginBase::ControlPoint::X.

Referenced by RunStitchPanel::DetectProject(), HuginExecutor::OnRun(), and MainFrame::RunAssistant().

WXIMPEX const wxString HuginQueue::GetConfigTempDir ( const wxConfigBase *  config)

return the temp dir from the preferences, ensure that it ends with path separator

Definition at line 302 of file Executor.cpp.

Referenced by HuginQueue::detail::GenerateFinalArgfile(), and GetAssistantCommandQueueUserDefined().

WXIMPEX wxString HuginQueue::GetExternalProgram ( wxConfigBase *  config,
const wxString &  bindir,
const wxString &  name 
)
WXIMPEX wxString HuginQueue::GetInternalProgram ( const wxString &  bindir,
const wxString &  name 
)
WXIMPEX wxString HuginQueue::GetQuotedFilenamesString ( const wxArrayString &  files)

return a wxString with all files in files quoted

return a single string of all given files quoted

Definition at line 1574 of file StitchingExecutor.cpp.

References wxEscapeFilename().

Referenced by HuginQueue::detail::GetQuotedFilenamesStringForVerdandi(), GetStitchingCommandQueue(), GetStitchingCommandQueueUserOutput(), and HuginExecutor::OnRun().

WXIMPEX const wxString HuginQueue::GetSettingString ( wxConfigBase *  setting,
const wxString &  name,
const wxString  defaultValue 
)

read a string from setting and remove all whitespaces

Definition at line 281 of file Executor.cpp.

Referenced by GetAssistantCommandQueueUserDefined(), GetSettingStringTranslated(), and GetStitchingCommandQueueUserOutput().

WXIMPEX const wxString HuginQueue::GetSettingStringTranslated ( wxConfigBase *  setting,
const wxString &  name,
const wxString  defaultValue 
)

read a translated string from settings and remove all whitespaces

Definition at line 288 of file Executor.cpp.

References GetSettingString().

Referenced by ChangeUserDefinedSequenceDialog::FillUserDefinedChoice(), GetAssistantCommandQueueUserDefined(), GetStitchingCommandQueueUserOutput(), and MainFrame::MainFrame().

WXIMPEX CommandQueue * HuginQueue::GetStitchingCommandQueue ( const HuginBase::Panorama pano,
const wxString &  ExePath,
const wxString &  project,
const wxString &  prefix,
wxString &  statusText,
wxArrayString &  outputFiles,
wxArrayString &  tempFilesDelete,
std::ostream &  errStream 
)

generates the command queue for stitching a pano it will also generate the necessary exiftool argfiles

Parameters
[in]panopanorama structure containing the input project
[in]ExePathExePath base path to all used utilities
[in]projectname of the project file, which contains the pano data (should by in sync with pano, to prevent double loading of the data)
[in]prefixprefix of the output, should only contain the filename part
[out]statusTextcontains a short status text, can be printed before the queue is actually executed, useful for bug reports
[out]outputFilesarray of all output files, contains also the temporary files created during stitching (used for detecting of overwritting files)
[out]tempFilesDeletearray with all temporary files which should be deleted at the end
errStreamoutput stream on which the error should be written
Returns
pointer to CommandQueue

Definition at line 398 of file StitchingExecutor.cpp.

References HuginQueue::detail::AddEdgeFillCommand(), HuginQueue::detail::AddToArray(), HuginBase::PanoramaOptions::blendMode, HuginBase::PanoramaOptions::colorReferenceImage, HuginBase::PanoramaOptions::edgeFillMode, HuginBase::PanoramaOptions::ENBLEND_BLEND, HuginBase::PanoramaOptions::enblendOptions, HuginBase::PanoramaOptions::enfuseOptions, fill_set(), HuginQueue::detail::GenerateFinalArgfile(), HuginBase::Panorama::getActiveImages(), hugin_utils::GetDataDir(), HuginBase::getExposureLayers(), GetExternalProgram(), HuginBase::getHDRStacks(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getImage(), HuginBase::getImagesinROI(), GetInternalProgram(), HuginQueue::detail::GetNumberedFilename(), HuginBase::Panorama::getOptions(), GetQuotedFilenamesString(), HuginQueue::detail::GetQuotedFilenamesStringForVerdandi(), HuginBase::PanoramaOptions::getROI(), HuginBase::PanoramaOptions::getWidth(), HuginBase::PanoramaOptions::HDRMERGE_AVERAGE, HuginBase::PanoramaOptions::hdrMergeMode, HuginBase::PanoramaOptions::hdrmergeOptions, HUGIN_CONV_FILENAME, HUGIN_NONA_USEGPU, HUGIN_USE_EXIFTOOL, HuginBase::PanoramaOptions::INTERNAL_BLEND, HuginBase::PanoramaOptions::keepEdgeFillInput, HuginBase::PanoramaOptions::NO_EDGE_FILL, HuginBase::PanoramaOptions::NONA, HuginBase::PanoramaOptions::outputHDRBlended, HuginBase::PanoramaOptions::outputHDRLayers, HuginBase::PanoramaOptions::outputHDRStacks, HuginBase::PanoramaOptions::outputImageType, HuginBase::PanoramaOptions::outputImageTypeCompression, HuginBase::PanoramaOptions::outputImageTypeHDR, HuginBase::PanoramaOptions::outputLayersCompression, HuginBase::PanoramaOptions::outputLDRBlended, HuginBase::PanoramaOptions::outputLDRExposureBlended, HuginBase::PanoramaOptions::outputLDRExposureLayers, HuginBase::PanoramaOptions::outputLDRExposureLayersFused, HuginBase::PanoramaOptions::outputLDRExposureRemapped, HuginBase::PanoramaOptions::outputLDRLayers, HuginBase::PanoramaOptions::outputLDRStacks, HuginQueue::detail::PrintDetailInfo(), HuginBase::PanoramaOptions::quality, HuginBase::PanoramaOptions::remapper, HuginBase::PanoramaOptions::remapUsingGPU, HuginBase::PanoramaOptions::tiffCompression, HuginBase::PanoramaOptions::verdandiOptions, and wxEscapeFilename().

Referenced by HuginExecutor::OnRun(), and RunStitchPanel::StitchProject().

WXIMPEX CommandQueue * HuginQueue::GetStitchingCommandQueueUserOutput ( const HuginBase::Panorama pano,
const wxString &  ExePath,
const wxString &  project,
const wxString &  prefix,
const wxString &  outputSettings,
wxString &  statusText,
wxArrayString &  outputFiles,
wxArrayString &  tempFilesDelete,
std::ostream &  errStream 
)

generates the command queue for stitching a pano, the commands are parsed from the given executor output file

Parameters
[in]panopanorama structure containing the input project
[in]ExePathExePath base path to all used utilities
[in]projectname of the project file, which contains the pano data (should by in sync with pano, to prevent double loading of the data)
[in]prefixprefix of the output, should only contain the filename part
[in]outputSettingsread the output sequence from this file
[out]statusTextcontains a short status text, can be printed before the queue is actually executed, useful for bug reports
[out]outputFilesarray of all output files, contains also the temporary files created during stitching (used for detecting of overwritting files)
[out]tempFilesDeletearray with all temporary files which should be deleted at the end
errStreamoutput stream on which the error should be written
Returns
pointer to CommandQueue

Definition at line 1113 of file StitchingExecutor.cpp.

References HuginQueue::detail::AddBlenderCommand(), HuginQueue::detail::AddToArray(), CleanQueue(), fill_set(), HuginBase::Panorama::getActiveImages(), HuginBase::getExposureLayers(), GetExternalProgram(), HuginBase::getHDRStacks(), HuginBase::PanoramaOptions::getHeight(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getImage(), HuginBase::getImagesinROI(), GetInternalProgram(), HuginQueue::detail::GetNumberedFilename(), HuginBase::Panorama::getOptions(), GetQuotedFilenamesString(), HuginBase::PanoramaOptions::getROI(), GetSettingString(), GetSettingStringTranslated(), HuginBase::PanoramaOptions::getWidth(), HUGIN_CONV_FILENAME, HuginQueue::detail::ReplacePrefixPlaceholder(), HuginQueue::detail::ReplaceWidthHeightPlaceHolder(), and wxEscapeFilename().

Referenced by HuginExecutor::OnRun(), and RunStitchPanel::StitchProject().

WXIMPEX bool HuginQueue::RunCommandsQueue ( CommandQueue *  queue,
size_t  threads,
bool  dryRun 
)

execute the given, set environment variable OMP_NUM_THREADS to threads (ignored for 0) after running the function the queue is cleared

Definition at line 83 of file Executor.cpp.

References CleanQueue(), and vigra_ext::log().

Referenced by HuginExecutor::OnRun().

template<class str >
str HuginQueue::wxEscapeFilename ( const str &  arg)
WXIMPEX wxString HuginQueue::wxStringFromCDouble ( double  val,
int  precision = -1 
)

convert double to wxString, it is always using a '.

' as decimal separator

Definition at line 238 of file Executor.cpp.

References hugin_utils::doubleTowxString().

Referenced by GetAssistantCommandQueue().