Hugin trunk 0.1
Loading...
Searching...
No Matches
EnfusePanel.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 ENFUSEPANEL_H
27#define ENFUSEPANEL_H
28
29#include "panoinc_WX.h"
30#include <wx/propgrid/propgrid.h>
31#include "PreviewWindow.h"
34
38class EnfusePanel : public wxPanel
39{
40public:
44 bool Create(wxWindow* parent, MyExecPanel* logPanel);
46 void AddFile(const wxString& filename);
48 void OnProcessFinished(wxCommandEvent& e);
49
50protected:
52 void OnAddFiles(wxCommandEvent& e);
53 void OnRemoveFile(wxCommandEvent& e);
54 void OnCreateFile(wxCommandEvent& e);
56 void OnFileSelectionChanged(wxCommandEvent& e);
57 void OnFileCheckStateChanged(wxCommandEvent& e);
58 void OnLoadSetting(wxCommandEvent& e);
59 void OnSaveSetting(wxCommandEvent& e);
60 void OnResetSetting(wxCommandEvent& e);
61 void OnGeneratePreview(wxCommandEvent& e);
62 void OnGenerateOutput(wxCommandEvent& e);
63 void OnZoom(wxCommandEvent& e);
65 void OnImageLoaded(HuginBase::ImageCache::EntryPtr entry, std::string filename);
66
67private:
71 void ExecuteEnfuse();
81 void EnableFileButtons();
83 long GetCheckedItemCount() const;
85 void EnableOutputButtons(bool enable);
87 void CleanUpTempFiles();
88 // member variables
89 wxListCtrl* m_fileListCtrl{ nullptr };
97 std::string m_selectedImage;
100 bool m_cleanupOutput = false;
101
103};
104
105#endif // ENFUSEPANEL_H
declaration of PreviewWindow class
panel for enfuse GUI
Definition EnfusePanel.h:39
void PopulateEnfuseOptions()
fill the PropertyGrid with all enfuse options
PreviewWindow * m_preview
Definition EnfusePanel.h:92
bool Create(wxWindow *parent, MyExecPanel *logPanel)
creates the control and populates all controls with their settings
void OnZoom(wxCommandEvent &e)
wxPropertyGrid * m_enfuseOptions
Definition EnfusePanel.h:90
void OnCreateFile(wxCommandEvent &e)
HuginBase::ImageCache::RequestPtr m_imgRequest
Definition EnfusePanel.h:96
void AddFile(const wxString &filename)
adds the given file to the list
void OnAddFiles(wxCommandEvent &e)
event handler
void OnProcessFinished(wxCommandEvent &e)
call at the end of the enfuse command, to load result back and enable buttons again
void OnFileListChar(wxKeyEvent &e)
void OnRemoveFile(wxCommandEvent &e)
void OnGenerateOutput(wxCommandEvent &e)
void OnImageLoaded(HuginBase::ImageCache::EntryPtr entry, std::string filename)
called when is image is fully loaded to display image in wxStaticBitmap
void CleanUpTempFiles()
delete all temporary files, to be called mainly at end
std::string m_selectedImage
Definition EnfusePanel.h:97
void EnableOutputButtons(bool enable)
enable/disable output buttons
void ExecuteEnfuseExiftool()
build the command line and execute enfuse and exiftool afterwards
long GetCheckedItemCount() const
return the number of check images
void OnGeneratePreview(wxCommandEvent &e)
~EnfusePanel()
destructor, save state and settings
wxString GetEnfuseOptions()
build string with all enfuse options from values in wxPropertyGrid this are the mainly the fusion opt...
MyExecPanel * m_logWindow
Definition EnfusePanel.h:94
void OnFileCheckStateChanged(wxCommandEvent &e)
wxString GetEnfuseCommandLine()
get the full commandline for enfuse without program, but with files and output options,...
wxStaticBitmap * m_previewSelectedImage
Definition EnfusePanel.h:95
wxArrayString m_tempFiles
Definition EnfusePanel.h:99
wxArrayString m_outputFilenames
Definition EnfusePanel.h:98
void OnLoadSetting(wxCommandEvent &e)
wxListCtrl * m_fileListCtrl
Definition EnfusePanel.h:89
wxArrayString m_files
Definition EnfusePanel.h:91
void ExecuteEnfuse()
build the command line and execute enfuse command
void OnSaveSetting(wxCommandEvent &e)
wxNotebook * m_enfuse_preview_notebook
Definition EnfusePanel.h:93
void EnableFileButtons()
enable/disable the file(s) remove and create buttons depending on selection of wxListCtrl
bool m_cleanupOutput
void OnResetSetting(wxCommandEvent &e)
void OnFileSelectionChanged(wxCommandEvent &e)
std::shared_ptr< Request > RequestPtr
Reference counted request for an image to load.
Definition ImageCache.h:151
std::shared_ptr< Entry > EntryPtr
a shared pointer to the entry
Definition ImageCache.h:112
preview window
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.
Definition threshold.h:41