Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
StackerPanel Class Reference

panel for stacker GUI More...

#include <StackerPanel.h>

Inheritance diagram for StackerPanel:
Inheritance graph

Classes

struct  FileInfo
 

Public Types

typedef std::vector< FileInfoFileInfoVector
 

Public Member Functions

 ~StackerPanel ()
 destructor, save state and settings More...
 
bool Create (wxWindow *parent, MyExecPanel *logPanel)
 creates the control and populates all controls with their settings More...
 
void AddFile (const wxString &filename)
 adds the given file to the list More...
 
void OnProcessFinished (wxCommandEvent &e)
 call at the end of the enfuse command, to load result back and enable buttons again More...
 

Protected Member Functions

void OnAddFiles (wxCommandEvent &e)
 event handler More...
 
void OnAddDirectory (wxCommandEvent &e)
 
void OnRemoveFile (wxCommandEvent &e)
 
void OnFileListChar (wxKeyEvent &e)
 
void OnFileSelectionChanged (wxCommandEvent &e)
 
void OnFileCheckStateChanged (wxListEvent &e)
 
void OnFileColumnHeaderClick (wxListEvent &e)
 
void OnModeChanged (wxCommandEvent &e)
 
void OnGeneratePreview (wxCommandEvent &e)
 
void OnGenerateOutput (wxCommandEvent &e)
 
void OnZoom (wxCommandEvent &e)
 

Private Member Functions

void ExecuteStacker ()
 build the command line and execute enfuse command More...
 
void ExecuteStackerExiftool ()
 build the command line and execute enfuse and exiftool afterwards More...
 
wxString GetStackerOptions ()
 build string with all stacker options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames More...
 
wxString GetStackerCommandLine ()
 get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename More...
 
void EnableFileButtons ()
 enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl More...
 
long GetCheckedItemCount () const
 return the number of check images More...
 
void EnableOutputButtons (bool enable)
 enable/disable output buttons More...
 
void CleanUpTempFiles ()
 delete all temporary files, to be called mainly at end More...
 
void SortList ()
 sort filename list More...
 
void FillFileList ()
 fill the list from internal file list More...
 
void AddFileInfo (const FileInfo &info)
 

Private Attributes

wxListCtrl * m_fileListCtrl { nullptr }
 
wxChoice * m_modeChoice { nullptr }
 
wxSpinCtrlDouble * m_winsorTrim { nullptr }
 
wxSpinCtrlDouble * m_sigma { nullptr }
 
wxSpinCtrl * m_sigmaMaxIter { nullptr }
 
FileInfoVector m_files
 
PreviewWindowm_preview { nullptr }
 
MyExecPanelm_logWindow { nullptr }
 
wxArrayString m_outputFilenames
 
wxArrayString m_tempFiles
 
bool m_cleanupOutput = false
 
long m_sortCol { -1 }
 
bool m_sortAscending { true }
 

Detailed Description

panel for stacker GUI

Definition at line 37 of file StackerPanel.h.

Member Typedef Documentation

typedef std::vector<FileInfo> StackerPanel::FileInfoVector

Definition at line 56 of file StackerPanel.h.

Constructor & Destructor Documentation

StackerPanel::~StackerPanel ( )

destructor, save state and settings

Definition at line 190 of file StackerPanel.cpp.

References CleanUpTempFiles(), m_fileListCtrl, m_modeChoice, m_sigma, m_sigmaMaxIter, m_sortAscending, m_sortCol, and m_winsorTrim.

Member Function Documentation

void StackerPanel::AddFile ( const wxString &  filename)

adds the given file to the list

Definition at line 293 of file StackerPanel.cpp.

References AddFileInfo(), EnableOutputButtons(), GetCheckedItemCount(), celeste::info(), and m_files.

Referenced by OnAddDirectory(), OnAddFiles(), and StackerDropTarget::OnDropFiles().

void StackerPanel::AddFileInfo ( const FileInfo info)
private
void StackerPanel::CleanUpTempFiles ( )
private

delete all temporary files, to be called mainly at end

Definition at line 794 of file StackerPanel.cpp.

References m_tempFiles.

Referenced by OnProcessFinished(), and ~StackerPanel().

bool StackerPanel::Create ( wxWindow *  parent,
MyExecPanel logPanel 
)
void StackerPanel::EnableFileButtons ( )
private

enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl

Definition at line 768 of file StackerPanel.cpp.

References m_fileListCtrl.

Referenced by Create(), OnFileSelectionChanged(), and OnRemoveFile().

void StackerPanel::EnableOutputButtons ( bool  enable)
private

enable/disable output buttons

Definition at line 788 of file StackerPanel.cpp.

Referenced by AddFile(), Create(), ExecuteStacker(), ExecuteStackerExiftool(), OnFileCheckStateChanged(), OnProcessFinished(), and OnRemoveFile().

void StackerPanel::ExecuteStacker ( )
private
void StackerPanel::ExecuteStackerExiftool ( )
private
void StackerPanel::FillFileList ( )
private

fill the list from internal file list

Definition at line 803 of file StackerPanel.cpp.

References AddFileInfo(), celeste::info(), m_fileListCtrl, m_files, and SortList().

Referenced by OnRemoveFile().

long StackerPanel::GetCheckedItemCount ( ) const
private

return the number of check images

Definition at line 774 of file StackerPanel.cpp.

References m_fileListCtrl.

Referenced by AddFile(), OnFileCheckStateChanged(), and OnRemoveFile().

wxString StackerPanel::GetStackerCommandLine ( )
private

get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename

Definition at line 698 of file StackerPanel.cpp.

References HuginQueue::GetConfigTempDir(), GetStackerOptions(), hugin_utils::HuginMessageBox(), m_fileListCtrl, m_files, m_outputFilenames, m_tempFiles, and hugin_utils::wxQuoteFilename().

Referenced by ExecuteStacker(), and ExecuteStackerExiftool().

wxString StackerPanel::GetStackerOptions ( )
private

build string with all stacker options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames

Definition at line 663 of file StackerPanel.cpp.

References m_sigma, m_sigmaMaxIter, and m_winsorTrim.

Referenced by GetStackerCommandLine().

void StackerPanel::OnAddDirectory ( wxCommandEvent &  e)
protected

Definition at line 367 of file StackerPanel.cpp.

References AddFile(), SelectDirectoryFileDialog::GetFilenames(), m_fileListCtrl, and SortList().

Referenced by Create().

void StackerPanel::OnAddFiles ( wxCommandEvent &  e)
protected

event handler

Definition at line 309 of file StackerPanel.cpp.

References AddFile(), GetFileDialogImageFilters(), m_fileListCtrl, and SortList().

Referenced by Create().

void StackerPanel::OnFileCheckStateChanged ( wxListEvent &  e)
protected

Definition at line 455 of file StackerPanel.cpp.

References EnableOutputButtons(), GetCheckedItemCount(), m_fileListCtrl, and m_files.

Referenced by Create().

void StackerPanel::OnFileColumnHeaderClick ( wxListEvent &  e)
protected

Definition at line 462 of file StackerPanel.cpp.

References m_fileListCtrl, m_sortAscending, m_sortCol, and SortList().

Referenced by Create().

void StackerPanel::OnFileListChar ( wxKeyEvent &  e)
protected

Definition at line 416 of file StackerPanel.cpp.

References m_fileListCtrl.

Referenced by Create().

void StackerPanel::OnFileSelectionChanged ( wxCommandEvent &  e)
protected

Definition at line 449 of file StackerPanel.cpp.

References EnableFileButtons().

Referenced by Create().

void StackerPanel::OnGenerateOutput ( wxCommandEvent &  e)
protected
void StackerPanel::OnGeneratePreview ( wxCommandEvent &  e)
protected

Definition at line 492 of file StackerPanel.cpp.

References ExecuteStacker(), HuginQueue::GetConfigTempDir(), m_cleanupOutput, and m_outputFilenames.

Referenced by Create().

void StackerPanel::OnModeChanged ( wxCommandEvent &  e)
protected

Definition at line 479 of file StackerPanel.cpp.

References m_modeChoice, m_sigma, m_sigmaMaxIter, and m_winsorTrim.

Referenced by Create().

void StackerPanel::OnProcessFinished ( wxCommandEvent &  e)

call at the end of the enfuse command, to load result back and enable buttons again

Definition at line 644 of file StackerPanel.cpp.

References CleanUpTempFiles(), EnableOutputButtons(), m_cleanupOutput, m_outputFilenames, m_preview, and PreviewWindow::setImage().

Referenced by ToolboxFrame::OnQueueProgress().

void StackerPanel::OnRemoveFile ( wxCommandEvent &  e)
protected
void StackerPanel::OnZoom ( wxCommandEvent &  e)
protected

Definition at line 610 of file StackerPanel.cpp.

References DEBUG_ERROR, m_preview, and PreviewWindow::setScale().

Referenced by Create().

void StackerPanel::SortList ( )
private

sort filename list

Definition at line 861 of file StackerPanel.cpp.

References m_fileListCtrl, m_files, m_sortAscending, and m_sortCol.

Referenced by FillFileList(), OnAddDirectory(), OnAddFiles(), and OnFileColumnHeaderClick().

Member Data Documentation

bool StackerPanel::m_cleanupOutput = false
private

Definition at line 115 of file StackerPanel.h.

Referenced by OnGenerateOutput(), OnGeneratePreview(), and OnProcessFinished().

wxListCtrl* StackerPanel::m_fileListCtrl { nullptr }
private
FileInfoVector StackerPanel::m_files
private
MyExecPanel* StackerPanel::m_logWindow { nullptr }
private

Definition at line 112 of file StackerPanel.h.

Referenced by Create(), ExecuteStacker(), and ExecuteStackerExiftool().

wxChoice* StackerPanel::m_modeChoice { nullptr }
private

Definition at line 106 of file StackerPanel.h.

Referenced by Create(), OnModeChanged(), and ~StackerPanel().

wxArrayString StackerPanel::m_outputFilenames
private
PreviewWindow* StackerPanel::m_preview { nullptr }
private

Definition at line 111 of file StackerPanel.h.

Referenced by Create(), OnProcessFinished(), and OnZoom().

wxSpinCtrlDouble* StackerPanel::m_sigma { nullptr }
private

Definition at line 108 of file StackerPanel.h.

Referenced by Create(), GetStackerOptions(), OnModeChanged(), and ~StackerPanel().

wxSpinCtrl* StackerPanel::m_sigmaMaxIter { nullptr }
private

Definition at line 109 of file StackerPanel.h.

Referenced by Create(), GetStackerOptions(), OnModeChanged(), and ~StackerPanel().

bool StackerPanel::m_sortAscending { true }
private

Definition at line 118 of file StackerPanel.h.

Referenced by Create(), OnFileColumnHeaderClick(), SortList(), and ~StackerPanel().

long StackerPanel::m_sortCol { -1 }
private

Definition at line 117 of file StackerPanel.h.

Referenced by Create(), OnFileColumnHeaderClick(), SortList(), and ~StackerPanel().

wxArrayString StackerPanel::m_tempFiles
private

Definition at line 114 of file StackerPanel.h.

Referenced by CleanUpTempFiles(), and GetStackerCommandLine().

wxSpinCtrlDouble* StackerPanel::m_winsorTrim { nullptr }
private

Definition at line 107 of file StackerPanel.h.

Referenced by Create(), GetStackerOptions(), OnModeChanged(), and ~StackerPanel().


The documentation for this class was generated from the following files: