Hugin trunk 0.1
Loading...
Searching...
No Matches
StackerPanel.h
Go to the documentation of this file.
1// -*- c-basic-offset: 4 -*-
10/* This is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
14 *
15 * This software is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public
21 * License along with this software. If not, see
22 * <http://www.gnu.org/licenses/>.
23 *
24 */
25
26#ifndef STACKERANEL_H
27#define STACKERANEL_H
28
29#include "panoinc_WX.h"
30#include "PreviewWindow.h"
31#include <vector>
33
37class StackerPanel : public wxPanel
38{
39public:
40 struct FileInfo
41 {
42 public:
43 FileInfo(const wxString& file, const wxString& new_name, const wxString& new_path, const size_t& new_width, const size_t& new_height)
44 {
45 fullFilename = file;
46 name = new_name;
47 path = new_path;
50 isChecked = true;
51 };
53 size_t width, height;
55 };
56 typedef std::vector<FileInfo> FileInfoVector;
60 bool Create(wxWindow* parent, MyExecPanel* logPanel);
62 void AddFile(const wxString& filename);
64 void OnProcessFinished(wxCommandEvent& e);
65
66protected:
68 void OnAddFiles(wxCommandEvent& e);
69 void OnAddDirectory(wxCommandEvent& e);
70 void OnRemoveFile(wxCommandEvent& e);
72 void OnFileSelectionChanged(wxCommandEvent& e);
75 void OnModeChanged(wxCommandEvent& e);
76 void OnGeneratePreview(wxCommandEvent& e);
77 void OnGenerateOutput(wxCommandEvent& e);
78 void OnZoom(wxCommandEvent& e);
79
80private:
82 void ExecuteStacker();
92 void EnableFileButtons();
94 long GetCheckedItemCount() const;
96 void EnableOutputButtons(bool enable);
98 void CleanUpTempFiles();
100 void SortList();
102 void FillFileList();
103 void AddFileInfo(const FileInfo& info);
104 // member variables
105 wxListCtrl* m_fileListCtrl{ nullptr };
115 bool m_cleanupOutput = false;
116 // store current sorting column
117 long m_sortCol{ -1 };
118 bool m_sortAscending{ true };
119
121};
122
123#endif // STACKERPANEL_H
declaration of PreviewWindow class
preview window
panel for stacker GUI
void OnRemoveFile(wxCommandEvent &e)
void SortList()
sort filename list
PreviewWindow * m_preview
long GetCheckedItemCount() const
return the number of check images
void OnZoom(wxCommandEvent &e)
void AddFileInfo(const FileInfo &info)
void CleanUpTempFiles()
delete all temporary files, to be called mainly at end
void OnAddDirectory(wxCommandEvent &e)
wxSpinCtrlDouble * m_winsorTrim
void OnFileColumnHeaderClick(wxListEvent &e)
void OnProcessFinished(wxCommandEvent &e)
call at the end of the enfuse command, to load result back and enable buttons again
void OnFileCheckStateChanged(wxListEvent &e)
void ExecuteStackerExiftool()
build the command line and execute enfuse and exiftool afterwards
wxListCtrl * m_fileListCtrl
wxSpinCtrl * m_sigmaMaxIter
void EnableOutputButtons(bool enable)
enable/disable output buttons
void OnFileListChar(wxKeyEvent &e)
bool Create(wxWindow *parent, MyExecPanel *logPanel)
creates the control and populates all controls with their settings
std::vector< FileInfo > FileInfoVector
wxChoice * m_modeChoice
FileInfoVector m_files
void OnModeChanged(wxCommandEvent &e)
void FillFileList()
fill the list from internal file list
void AddFile(const wxString &filename)
adds the given file to the list
wxArrayString m_outputFilenames
void EnableFileButtons()
enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl
MyExecPanel * m_logWindow
void ExecuteStacker()
build the command line and execute enfuse command
void OnGenerateOutput(wxCommandEvent &e)
wxString GetStackerOptions()
build string with all stacker options from values in wxPropertyGrid this are the mainly the fusion op...
void OnGeneratePreview(wxCommandEvent &e)
~StackerPanel()
destructor, save state and settings
wxArrayString m_tempFiles
void OnAddFiles(wxCommandEvent &e)
event handler
wxString GetStackerCommandLine()
get the full commandline for enfuse without program, but with files and output options,...
void OnFileSelectionChanged(wxCommandEvent &e)
wxSpinCtrlDouble * m_sigma
include file for the hugin project
FileInfo(const wxString &file, const wxString &new_name, const wxString &new_path, const size_t &new_width, const size_t &new_height)
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.
Definition threshold.h:41