Hugin trunk 0.1
Loading...
Searching...
No Matches
CreateBrightImgDlg.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 _CREATEBRIGHTIMGDIALOG_H
27#define _CREATEBRIGHTIMGDIALOG_H
28
29#include "panoinc_WX.h"
30#include <vector>
31#include <vigra/imagecontainer.hxx>
33
36class CreateBrightImgDlg : public wxDialog
37{
38public:
40 CreateBrightImgDlg(wxWindow *parent);
44 bool SetImage(const wxString& filename, wxString& errorMsg);
46protected:
48 void OnOk(wxCommandEvent & e);
50 void OnCreateExposureLevels(wxCommandEvent& e);
56 void OnSize(wxSizeEvent& e);
57private:
59 double GetExposureStepWidth() const;
61 void RescaleImage();
63 void CreatewxBitmap(const vigra::BRGBImage& img);
65 bool CreateAndSaveExposureCorrectedImage(const wxString& filename, const double correction);
68 // pointer to controls
71 wxListCtrl* m_exposuresListBox{ nullptr };
73 // vector of all exposure values
74 std::vector<double> m_exposures;
76 ImageCache::EntryPtr m_image;
78 vigra::BRGBImage m_scaledImg;
81 double m_currentExposure{ 0 };
84};
85
86#endif //_CREATEBRIGHTIMGDIALOG_H
Dialog for create brighter and/or darker versions of an image.
void OnSize(wxSizeEvent &e)
handler called when size of control was changed
wxStaticBitmap * m_previewBitmap
long GetCheckedItemCount()
return the number of checked exposures
wxArrayString m_tempFiles
bool CreateAndSaveExposureCorrectedImage(const wxString &filename, const double correction)
create the exposure corrected image and save it to the file
std::vector< double > m_exposures
~CreateBrightImgDlg()
destructor, save position
void OnOk(wxCommandEvent &e)
process all images
void OnCreateExposureLevels(wxCommandEvent &e)
update listbox with new exposure values
void CreatewxBitmap(const vigra::BRGBImage &img)
create the wxBitmap version and apply color profiles
void OnExposureChecked(wxListEvent &e)
prevent checking of exposure value 0
void OnExposureSelected(wxListEvent &e)
one exposure selected
ImageCache::EntryPtr m_image
image cache entry for current image
void RescaleImage()
create rescaled image
bool SetImage(const wxString &filename, wxString &errorMsg)
load the image, return true on success, otherwise false, error cause is in errorMsg
double GetExposureStepWidth() const
returns the current selected exposure step width
wxBitmap m_scaledwxBitmap
current image as wxBitmap
wxArrayString GetTempFiles() const
wxListCtrl * m_exposuresListBox
vigra::BRGBImage m_scaledImg
current image as vigra::RGBImage
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