Hugin trunk 0.1
Loading...
Searching...
No Matches
FindPanoDialog.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 _FINDPANODIALOG_H
27#define _FINDPANODIALOG_H
28
29#include <vector>
30#include "panoinc_WX.h"
31#include "panoinc.h"
32#include "BatchFrame.h"
33#include <wx/filepicker.h>
34
35extern "C"
36{
37#include "tiff.h"
38#include "tiffio.h"
39}
40
41class PossiblePano;
42
51class FindPanoDialog : public wxDialog
52{
53public:
58
59protected:
61 void OnButtonClose(wxCommandEvent& e);
63 void OnButtonStart(wxCommandEvent& e);
65 void OnButtonSend(wxCommandEvent& e);
67 void OnClose(wxCloseEvent& e);
69 void OnSelectPossiblePano(wxCommandEvent &e);
73 void OnRemoveImage(wxCommandEvent &e);
75 void OnSplitPanos(wxCommandEvent &e);
78
79private:
95 wxListCtrl* m_thumbsList;
98
99 std::vector<PossiblePano*> m_panos;
104
105 void EnableButtons(const bool state);
106 void SearchInDir(wxString dirstring, const bool includeSubdir, const bool loadDistortion, const bool loadVignetting, const size_t minNumberImages, const size_t maxTimeDiff);
107 void CleanUpPanolist();
108};
109
111{
112 bool operator() (const HuginBase::SrcPanoImage* img1, const HuginBase::SrcPanoImage* img2) const;
113};
114
115typedef std::set<HuginBase::SrcPanoImage*, SortFilename> ImageSet;
116
118{
119public:
138 const unsigned int GetImageCount() const
139 {
140 return m_images.size();
141 };
143 const wxString GetItemString(const wxString BasePath) const;
145 const wxString GetFilestring(const wxString BasePath, const bool stripExtension=false) const;
160 void PopulateListCtrl(wxListCtrl* list, wxImageList* thumbs, wxArrayString& tooltips);
162 void RemoveImage(const unsigned int index);
165 PossiblePano* SplitPano(const unsigned int index);
166
167private:
173 void UpdateDateTimes();
174
175 std::string m_make;
176 std::string m_camera;
177 std::string m_lens;
182 vigra::Size2D m_size;
184};
185
186#endif //_FINDPANODIALOG_H
Batch processor for Hugin with GUI.
std::set< HuginBase::SrcPanoImage *, SortFilename > ImageSet
Dialog for finding panorama in given directory.
wxArrayString m_tooltips
void OnSelectPossiblePano(wxCommandEvent &e)
event to populate information on the right
wxCheckBox * m_cb_subdir
wxSpinCtrl * m_sc_minNumberImages
void SearchInDir(wxString dirstring, const bool includeSubdir, const bool loadDistortion, const bool loadVignetting, const size_t minNumberImages, const size_t maxTimeDiff)
wxStaticText * m_statustext
BatchFrame * m_batchframe
wxDirPickerCtrl * m_dirPicker
TIFFErrorHandler m_oldtiffwarning
wxChoice * m_ch_naming
void OnClose(wxCloseEvent &e)
prevents closing window when running detection
wxSpinCtrl * m_sc_maxTimeDiff
void OnButtonStart(wxCommandEvent &e)
start/stops detections
wxCheckListBox * m_list_pano
wxImageList * m_thumbs
wxCheckBox * m_cb_createLinks
wxButton * m_button_start
void OnSplitPanos(wxCommandEvent &e)
event handler to split into 2 panos
void OnListMouseMove(wxMouseEvent &e)
mouse move handler for tooltips
std::vector< PossiblePano * > m_panos
void OnRemoveImage(wxCommandEvent &e)
event handler to remove selected image from list
void EnableButtons(const bool state)
wxListCtrl * m_thumbsList
wxCheckBox * m_cb_loadVignetting
wxButton * m_button_close
void OnButtonClose(wxCommandEvent &e)
closes window
wxButton * m_button_send
void OnButtonSend(wxCommandEvent &e)
add selected projects to queue
wxCheckBox * m_cb_loadDistortion
void OnListItemRightClick(wxListEvent &e)
event handler for context menu
~FindPanoDialog()
destructor, saves size and position
wxChoice * m_ch_blender
All variables of a source image.
void UpdateDateTimes()
updates the internal date/time representations
wxString GeneratePanorama(NamingConvention nc, bool createLinks, HuginBase::PanoramaOptions::BlendingMechanism defaultBlender)
generates the panorama file from this set of images
PossiblePano * SplitPano(const unsigned int index)
split pano into 2 subpanos, index is used as first image of second pano
wxString GetStartString()
return the start date/time as string
NamingConvention
enumeration for different naming conventions, must be match combobox in ressource
wxString GetFocalLength()
returns the focal length as string
std::string m_make
std::string m_lens
wxDateTime m_dt_start
bool GetNewProjectFilename(NamingConvention nc, const wxString basePath, wxFileName &projectFile)
returns a given filename, which does not already exists
const wxString GetFilestring(const wxString BasePath, const bool stripExtension=false) const
returns a string with the filename of the first and last file
wxString GetCameraName()
returns the camera name
void PopulateListCtrl(wxListCtrl *list, wxImageList *thumbs, wxArrayString &tooltips)
add all images to wxListCtrl
void RemoveImage(const unsigned int index)
removes the image at given index
~PossiblePano()
destructor, cleans up used variables
wxString GetDuration()
returns the duration as string
wxString GetLensName()
returns the lens name
std::string m_camera
void AddSrcPanoImage(HuginBase::SrcPanoImage *img)
adds the given SrcPanoImage to this pano-group
vigra::Size2D m_size
PossiblePano()
constructor, init values
wxDateTime m_dt_end
ImageSet m_images
const unsigned int GetImageCount() const
returns number of images in this group
bool BelongsTo(HuginBase::SrcPanoImage *img, const wxTimeSpan max_time_diff)
return true, if the image could belong to the given PossiblePano, it checks camera maker and model,...
const wxDateTime GetDateTime(const HuginBase::SrcPanoImage *img)
does some reformating date/time format
const wxString GetItemString(const wxString BasePath) const
returns a string which contains description of this pano
include file for the hugin project
include file for the hugin project
bool operator()(const HuginBase::SrcPanoImage *img1, const HuginBase::SrcPanoImage *img2) const
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