Hugin trunk 0.1
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Functions
HuginQueue Namespace Reference

Namespaces

namespace  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
 
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
 
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
 
void CleanQueue (CommandQueue *queue)
 clean the queue, delete all entries, but not the queue itself
 
wxString GetInternalProgram (const wxString &bindir, const wxString &name)
 return path and name of external program, which comes bundled with Hugin
 
wxString GetExternalProgram (wxConfigBase *config, const wxString &bindir, const wxString &name)
 return path and name of external program, which can be overwritten by the user
 
wxString wxStringFromCDouble (double val, int precision=-1)
 convert double to wxString, it is always using a '.
 
const wxString GetSettingString (wxConfigBase *setting, const wxString &name, const wxString defaultValue=wxEmptyString)
 read a string from setting and remove all whitespaces
 
const wxString GetSettingStringTranslated (wxConfigBase *setting, const wxString &name, const wxString defaultValue=wxEmptyString)
 read a translated string from settings and remove all whitespaces
 
const wxString GetConfigTempDir (const wxConfigBase *config)
 return the temp dir from the preferences, ensure that it ends with path separator
 
template<class str >
str wxEscapeFilename (const str &arg)
 special escaping routine for CommandQueues
 
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
 
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
 
wxString GetQuotedFilenamesString (const wxArrayString &files)
 return a wxString with all files in files quoted
 

Typedef Documentation

◆ CommandQueue

Definition at line 61 of file Executor.h.

Function Documentation

◆ CleanQueue()

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

◆ GetAssistantCommandQueue()

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, hugin_utils::roundi(), threshold(), wxEscapeFilename(), wxStringFromCDouble(), and HuginBase::ControlPoint::X.

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

◆ GetAssistantCommandQueueUserDefined()

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, threshold(), wxEscapeFilename(), and HuginBase::ControlPoint::X.

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

◆ GetConfigTempDir()

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

◆ GetExternalProgram()

WXIMPEX wxString HuginQueue::GetExternalProgram ( wxConfigBase config,
const wxString bindir,
const wxString name 
)

◆ GetInternalProgram()

WXIMPEX wxString HuginQueue::GetInternalProgram ( const wxString bindir,
const wxString name 
)

◆ GetQuotedFilenamesString()

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 1591 of file StitchingExecutor.cpp.

References threshold(), and wxEscapeFilename().

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

◆ GetSettingString()

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.

References threshold().

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

◆ GetSettingStringTranslated()

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(), and threshold().

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

◆ GetStitchingCommandQueue()

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 415 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(), GetExternalProgram(), HuginBase::PanoramaOptions::getHFOV(), HuginBase::Panorama::getImage(), 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, threshold(), HuginBase::PanoramaOptions::tiffCompression, HuginBase::PanoramaOptions::verdandiOptions, and wxEscapeFilename().

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

◆ GetStitchingCommandQueueUserOutput()

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 1130 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(), 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(), threshold(), and wxEscapeFilename().

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

◆ RunCommandsQueue()

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

Referenced by HuginExecutor::OnRun().

◆ wxEscapeFilename()

template<class str >
str HuginQueue::wxEscapeFilename ( const str arg)

◆ wxStringFromCDouble()

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(), and threshold().

Referenced by GetAssistantCommandQueue().