28#include <wx/busyinfo.h>
63 wxXmlResource::Get()->LoadDialog(
this,
batchframe,
"generate_sequence_dialog");
70 this->SetLabel(wxString::Format(
_(
"Generating sequence from %s"),
m_filename.c_str()));
112 wxCommandEvent
dummy;
122 XRCCTRL(*
this,
"sequence_naming",
wxChoice)->SetSelection(
config->Read(
"/GenerateSequenceDialog/NamingConvention", 0l));
138 config->Write(
"/GenerateSequenceDialog/NamingConvention",
XRCCTRL(*
this,
"sequence_naming",
wxChoice)->GetSelection());
192 wxDirDialog dlg(
this,
_(
"Specify a directory to search for projects in"),
392 .
Text(
_(
"Generating preview list. Please wait..."))
397 std::vector<wxArrayString>
fileList;
399 wxTextCtrl* preview =
XRCCTRL(*
this,
"sequence_preview", wxTextCtrl);
409 text.Append(
_(
"No matching sub-directories found."));
416 text.Append(wxString::Format(
_(
"Panorama %d"),
i));
432 text.Append(
" <-- ");
433 text.Append(
_(
"File not found"));
440 text.Append(
_(
"This panorama will be skipped becaused of missing files."));
445 preview->SetValue(
text);
504 mask = f1.GetName() +
"-" + f2.GetName();
534 mask = mask.Append(
"_%d");
556 .
Text(
_(
"Generating panorama files. Please wait..."))
560 std::vector<wxArrayString>
fileList;
wxArrayString GetAllSubDirectories(const wxString baseDir)
return a list of all sub-directories
bool GetNewProjectFilename(long index, const HuginBase::Panorama &pano, const wxString basePath, wxFileName &projectFile, unsigned int currentIndex)
generate filename from given settings and panorama append a number if file already exists
void ApplyTemplate(const HuginBase::Panorama &pano, HuginBase::Panorama &newPano)
copy the image files from pano to newPano -> this corresponds to apply the template newPano to pano t...
wxString GetNumberString(size_t x, size_t width)
return given number as string with given number of digits
Definition of GenerateSequenceDialog class.
void AddArrayToList(const wxArrayString &fileList, Project::Target target)
BatchFrame * m_batchframe
~GenerateSequenceDialog()
destructor, saves size and position
wxChoice * m_choiceSubDir
wxStaticText * m_originalImage
wxButton * m_changeAllImagesTemplate
wxSpinCtrl * m_spinCounterI_offset
wxButton * m_changeImageTemplate
void FillImagesList()
fill the images list with current values
wxSpinCtrl * m_spinCounterX_end
wxSpinCtrl * m_spinCounterX_step
void ReadPTOFile()
read pto template from file
void OnUpdateCounters(wxSpinEvent &e)
update all spin controls with current numbers
void OnImageListSelected(wxListEvent &e)
image in list ctrl selected
wxArrayString m_mappedFilenames
void OnGenerateAssistantPanorama(wxCommandEvent &e)
generate assistant sequence button
wxSpinCtrl * m_spinCounterP_end
wxSpinCtrl * m_spinCounterX_offset
void OnUpdateAllImagesTemplate(wxCommandEvent &e)
update images filename template for all images
wxSpinCtrl * m_spinCounterP_step
void OnGeneratePreview(wxCommandEvent &e)
generate preview
void GenerateFileList(wxArrayString &panoSubDirs, std::vector< wxArrayString > &fileList)
generate a list of all panorama and images in panoramas
void OnGenerateStitchingPanorama(wxCommandEvent &e)
generate stitching sequence button
wxSpinCtrl * m_spinCounterI_step
wxListCtrl * m_imagesListCtrl
void DoGeneratePanorama(const Project::Target target)
generates all panoramas and add them to the batch queue with given queue target
wxTextCtrl * m_imageTemplate
void OnSelectBasePath(wxCommandEvent &e)
show select directory dialog
wxTextCtrl * m_subDirTextCtrl
void OnUpdateImageTemplate(wxCommandEvent &e)
update image filename template on selected image
void OnSelectSubDir(wxCommandEvent &e)
select which sub-directory should be used
wxSpinCtrl * m_spinCounterI_end
HuginBase::Panorama m_pano
bool IsValidPanorama() const
return true if given template is a valid pto file, if not the dialog should not be used
wxArrayString m_orignalFilenames
void UpdateCounters()
update all counters, enable/disable end value and calculate end values
wxSpinCtrl * m_spinCounterP_offset
GenerateSequenceDialog(BatchFrame *batchframe, wxString xrcPrefix, wxString ptoFilename)
Constructor, read from xrc ressource; restore last uses settings, size and position.
Memento class for a Panorama object.
bool loadPTScript(std::istream &i, int &ptoVersion, const std::string &prefix="")
load a Hugin file
const SrcPanoImage & getImage(std::size_t nr) const
get a panorama image, counting starts with 0
void setMemento(const PanoramaMemento &memento)
set the internal state
void setCtrlPoints(const CPVector &points)
set all control points (Ippei: Is this supposed to be 'add' method?)
SrcPanoImage getSrcImage(unsigned imgNr) const
get a description of a source image
unsigned int addImage(const SrcPanoImage &img)
the the number for a specific image
void setSrcImage(unsigned int nr, const SrcPanoImage &img)
set input image parameters
virtual void updateVariables(const VariableMapVector &vars)
Set the variables.
Panorama duplicate() const
duplicate the panorama
std::size_t getNrOfImages() const
number of images.
All variables of a source image.
bool checkImageSizeKnown()
check if the image size is known, if try to load the information from the file
void resize(const vigra::Size2D &size, VariableMap *potentialLinkedVars)
"resize" image, adjusts all distortion coefficients for usage with a source image of size size potent...
wxString getDefaultProjectName(const HuginBase::Panorama &pano, const wxString filenameTemplate)
gets the default project name, as defined in the preferences
#define DEBUG_ASSERT(cond)
std::vector< VariableMap > VariableMapVector
std::vector< ControlPoint > CPVector
int HuginMessageBox(const wxString &message, const wxString &caption, int style, wxWindow *parent)
void StoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
std::string getPathPrefix(const std::string &filename)
Get the path to a filename.
void RestoreFramePosition(wxTopLevelWindow *frame, const wxString &basename, const bool ignoreMaximize)
include file for the hugin project
std::vector< deghosting::BImagePtr > threshold(const std::vector< deghosting::FImagePtr > &inputImages, const double threshold, const uint16_t flags)
Threshold function used for creating alpha masks for images.