Hugin trunk 0.1
Loading...
Searching...
No Matches
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
 
bool Create (wxWindow *parent, MyExecPanel *logPanel)
 creates the control and populates all controls with their settings
 
void AddFile (const wxString &filename)
 adds the given file to the list
 
void OnProcessFinished (wxCommandEvent &e)
 call at the end of the enfuse command, to load result back and enable buttons again
 

Protected Member Functions

void OnAddFiles (wxCommandEvent &e)
 event handler
 
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
 
void ExecuteStackerExiftool ()
 build the command line and execute enfuse and exiftool afterwards
 
wxString GetStackerOptions ()
 build string with all stacker options from values in wxPropertyGrid this are the mainly the fusion options without the filesnames

 
wxString GetStackerCommandLine ()
 get the full commandline for enfuse without program, but with files and output options, the output filename is read from m_outputFilename
 
void EnableFileButtons ()
 enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl
 
long GetCheckedItemCount () const
 return the number of check images
 
void EnableOutputButtons (bool enable)
 enable/disable output buttons
 
void CleanUpTempFiles ()
 delete all temporary files, to be called mainly at end
 
void SortList ()
 sort filename list
 
void FillFileList ()
 fill the list from internal file list
 
void AddFileInfo (const FileInfo &info)
 

Private Attributes

wxListCtrl * m_fileListCtrl { nullptr }
 
wxChoicem_modeChoice { nullptr }
 
wxSpinCtrlDoublem_winsorTrim { nullptr }
 
wxSpinCtrlDoublem_sigma { nullptr }
 
wxSpinCtrlm_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

◆ FileInfoVector

Definition at line 56 of file StackerPanel.h.

Constructor & Destructor Documentation

◆ ~StackerPanel()

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

Member Function Documentation

◆ AddFile()

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

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

◆ AddFileInfo()

void StackerPanel::AddFileInfo ( const FileInfo info)
private

◆ CleanUpTempFiles()

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

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

◆ Create()

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

◆ EnableFileButtons()

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

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

◆ EnableOutputButtons()

void StackerPanel::EnableOutputButtons ( bool  enable)
private

enable/disable output buttons

Definition at line 788 of file StackerPanel.cpp.

References threshold().

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

◆ ExecuteStacker()

void StackerPanel::ExecuteStacker ( )
private

◆ ExecuteStackerExiftool()

void StackerPanel::ExecuteStackerExiftool ( )
private

◆ FillFileList()

void StackerPanel::FillFileList ( )
private

fill the list from internal file list

Definition at line 803 of file StackerPanel.cpp.

References AddFileInfo(), m_fileListCtrl, m_files, and SortList().

Referenced by OnRemoveFile().

◆ GetCheckedItemCount()

long StackerPanel::GetCheckedItemCount ( ) const
private

return the number of check images

Definition at line 774 of file StackerPanel.cpp.

References m_fileListCtrl, and threshold().

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

◆ GetStackerCommandLine()

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

Referenced by ExecuteStacker(), and ExecuteStackerExiftool().

◆ GetStackerOptions()

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

Referenced by GetStackerCommandLine().

◆ OnAddDirectory()

void StackerPanel::OnAddDirectory ( wxCommandEvent &  e)
protected

Definition at line 367 of file StackerPanel.cpp.

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

Referenced by Create().

◆ OnAddFiles()

void StackerPanel::OnAddFiles ( wxCommandEvent &  e)
protected

event handler

Definition at line 309 of file StackerPanel.cpp.

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

Referenced by Create().

◆ OnFileCheckStateChanged()

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

◆ OnFileColumnHeaderClick()

void StackerPanel::OnFileColumnHeaderClick ( wxListEvent e)
protected

Definition at line 462 of file StackerPanel.cpp.

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

Referenced by Create().

◆ OnFileListChar()

void StackerPanel::OnFileListChar ( wxKeyEvent e)
protected

Definition at line 416 of file StackerPanel.cpp.

References m_fileListCtrl, and threshold().

Referenced by Create().

◆ OnFileSelectionChanged()

void StackerPanel::OnFileSelectionChanged ( wxCommandEvent &  e)
protected

Definition at line 449 of file StackerPanel.cpp.

References EnableFileButtons().

Referenced by Create().

◆ OnGenerateOutput()

void StackerPanel::OnGenerateOutput ( wxCommandEvent &  e)
protected

◆ OnGeneratePreview()

void StackerPanel::OnGeneratePreview ( wxCommandEvent &  e)
protected

◆ OnModeChanged()

void StackerPanel::OnModeChanged ( wxCommandEvent &  e)
protected

Definition at line 479 of file StackerPanel.cpp.

References m_modeChoice, m_sigma, m_sigmaMaxIter, m_winsorTrim, and threshold().

Referenced by Create().

◆ OnProcessFinished()

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

Referenced by ToolboxFrame::OnQueueProgress().

◆ OnRemoveFile()

void StackerPanel::OnRemoveFile ( wxCommandEvent &  e)
protected

◆ OnZoom()

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

◆ SortList()

void StackerPanel::SortList ( )
private

sort filename list

Definition at line 861 of file StackerPanel.cpp.

References m_fileListCtrl, m_files, m_sortAscending, m_sortCol, and threshold().

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

Member Data Documentation

◆ m_cleanupOutput

bool StackerPanel::m_cleanupOutput = false
private

Definition at line 115 of file StackerPanel.h.

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

◆ m_fileListCtrl

wxListCtrl* StackerPanel::m_fileListCtrl { nullptr }
private

◆ m_files

FileInfoVector StackerPanel::m_files
private

◆ m_logWindow

MyExecPanel* StackerPanel::m_logWindow { nullptr }
private

Definition at line 112 of file StackerPanel.h.

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

◆ m_modeChoice

wxChoice* StackerPanel::m_modeChoice { nullptr }
private

Definition at line 106 of file StackerPanel.h.

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

◆ m_outputFilenames

wxArrayString StackerPanel::m_outputFilenames
private

◆ m_preview

PreviewWindow* StackerPanel::m_preview { nullptr }
private

Definition at line 111 of file StackerPanel.h.

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

◆ m_sigma

wxSpinCtrlDouble* StackerPanel::m_sigma { nullptr }
private

Definition at line 108 of file StackerPanel.h.

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

◆ m_sigmaMaxIter

wxSpinCtrl* StackerPanel::m_sigmaMaxIter { nullptr }
private

Definition at line 109 of file StackerPanel.h.

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

◆ m_sortAscending

bool StackerPanel::m_sortAscending { true }
private

Definition at line 118 of file StackerPanel.h.

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

◆ m_sortCol

long StackerPanel::m_sortCol { -1 }
private

Definition at line 117 of file StackerPanel.h.

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

◆ m_tempFiles

wxArrayString StackerPanel::m_tempFiles
private

Definition at line 114 of file StackerPanel.h.

Referenced by CleanUpTempFiles(), and GetStackerCommandLine().

◆ m_winsorTrim

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: