|
Hugin trunk 0.1
|
Dialog for create brighter and/or darker versions of an image. More...
#include <CreateBrightImgDlg.h>

Public Member Functions | |
| CreateBrightImgDlg (wxWindow *parent) | |
| Constructor, read from xrc ressource; restore position. | |
| ~CreateBrightImgDlg () | |
| destructor, save position | |
| bool | SetImage (const wxString &filename, wxString &errorMsg) |
| load the image, return true on success, otherwise false, error cause is in errorMsg | |
| wxArrayString | GetTempFiles () const |
Protected Member Functions | |
| void | OnOk (wxCommandEvent &e) |
| process all images | |
| void | OnCreateExposureLevels (wxCommandEvent &e) |
| update listbox with new exposure values | |
| void | OnExposureSelected (wxListEvent &e) |
| one exposure selected | |
| void | OnExposureChecked (wxListEvent &e) |
| prevent checking of exposure value 0 | |
| void | OnSize (wxSizeEvent &e) |
| handler called when size of control was changed | |
Private Member Functions | |
| double | GetExposureStepWidth () const |
| returns the current selected exposure step width | |
| void | RescaleImage () |
| create rescaled image | |
| void | CreatewxBitmap (const vigra::BRGBImage &img) |
| create the wxBitmap version and apply color profiles | |
| bool | CreateAndSaveExposureCorrectedImage (const wxString &filename, const double correction) |
| create the exposure corrected image and save it to the file | |
| long | GetCheckedItemCount () |
| return the number of checked exposures | |
Private Attributes | |
| wxChoice * | m_stepWidthChoice { nullptr } |
| wxChoice * | m_levelChoice { nullptr } |
| wxListCtrl * | m_exposuresListBox { nullptr } |
| wxStaticBitmap * | m_previewBitmap { nullptr } |
| std::vector< double > | m_exposures |
| ImageCache::EntryPtr | m_image |
| image cache entry for current image | |
| vigra::BRGBImage | m_scaledImg |
| current image as vigra::RGBImage | |
| wxBitmap | m_scaledwxBitmap |
| current image as wxBitmap | |
| double | m_currentExposure { 0 } |
| wxArrayString | m_tempFiles |
| wxString | m_filename |
Dialog for create brighter and/or darker versions of an image.
Definition at line 36 of file CreateBrightImgDlg.h.
| CreateBrightImgDlg::CreateBrightImgDlg | ( | wxWindow * | parent | ) |
Constructor, read from xrc ressource; restore position.
Definition at line 55 of file CreateBrightImgDlg.cpp.
References m_exposuresListBox, m_levelChoice, m_previewBitmap, m_stepWidthChoice, OnCreateExposureLevels(), OnExposureChecked(), OnExposureSelected(), OnOk(), OnSize(), hugin_utils::RestoreFramePosition(), and threshold().
| CreateBrightImgDlg::~CreateBrightImgDlg | ( | ) |
destructor, save position
Definition at line 80 of file CreateBrightImgDlg.cpp.
References hugin_utils::StoreFramePosition().
|
private |
create the exposure corrected image and save it to the file
Definition at line 281 of file CreateBrightImgDlg.cpp.
References CreateBrightVersion(), vigra::exportImageAlpha(), HuginQueue::GetExternalProgram(), HUGIN_CONV_FILENAME, m_filename, m_image, threshold(), and HuginQueue::wxEscapeFilename().
Referenced by OnOk().
create the wxBitmap version and apply color profiles
Definition at line 253 of file CreateBrightImgDlg.cpp.
References HuginBase::Color::CorrectImage(), m_image, m_previewBitmap, m_scaledwxBitmap, and threshold().
Referenced by OnExposureSelected(), and RescaleImage().
|
private |
return the number of checked exposures
Definition at line 345 of file CreateBrightImgDlg.cpp.
References m_exposuresListBox, and threshold().
Referenced by OnOk().
|
private |
returns the current selected exposure step width
Definition at line 216 of file CreateBrightImgDlg.cpp.
References m_stepWidthChoice.
Referenced by OnCreateExposureLevels().
| wxArrayString CreateBrightImgDlg::GetTempFiles | ( | ) | const |
Definition at line 118 of file CreateBrightImgDlg.cpp.
References m_tempFiles.
|
protected |
update listbox with new exposure values
Definition at line 160 of file CreateBrightImgDlg.cpp.
References GetExposureStepWidth(), m_exposures, m_exposuresListBox, m_levelChoice, OnExposureChecked(), and threshold().
Referenced by CreateBrightImgDlg().
|
protected |
prevent checking of exposure value 0
Definition at line 199 of file CreateBrightImgDlg.cpp.
References m_exposuresListBox.
Referenced by CreateBrightImgDlg(), and OnCreateExposureLevels().
|
protected |
one exposure selected
Definition at line 180 of file CreateBrightImgDlg.cpp.
References CreateBrightVersion(), CreatewxBitmap(), m_currentExposure, m_exposures, m_exposuresListBox, m_previewBitmap, m_scaledImg, m_scaledwxBitmap, and threshold().
Referenced by CreateBrightImgDlg().
|
protected |
process all images
Definition at line 123 of file CreateBrightImgDlg.cpp.
References CreateAndSaveExposureCorrectedImage(), GetCheckedItemCount(), HuginQueue::GetConfigTempDir(), hugin_utils::HuginMessageBox(), m_exposures, m_exposuresListBox, m_tempFiles, and threshold().
Referenced by CreateBrightImgDlg().
|
protected |
handler called when size of control was changed
Definition at line 208 of file CreateBrightImgDlg.cpp.
References m_previewBitmap, m_scaledwxBitmap, RescaleImage(), and threshold().
Referenced by CreateBrightImgDlg().
|
private |
create rescaled image
Definition at line 232 of file CreateBrightImgDlg.cpp.
References CreateBrightVersion(), CreatewxBitmap(), m_currentExposure, m_image, m_previewBitmap, m_scaledImg, and threshold().
Referenced by OnSize(), and SetImage().
load the image, return true on success, otherwise false, error cause is in errorMsg
Definition at line 86 of file CreateBrightImgDlg.cpp.
References HUGIN_CONV_FILENAME, m_filename, m_image, m_previewBitmap, m_scaledwxBitmap, RescaleImage(), and threshold().
|
private |
Definition at line 81 of file CreateBrightImgDlg.h.
Referenced by OnExposureSelected(), and RescaleImage().
|
private |
Definition at line 74 of file CreateBrightImgDlg.h.
Referenced by OnCreateExposureLevels(), OnExposureSelected(), and OnOk().
|
private |
Definition at line 71 of file CreateBrightImgDlg.h.
Referenced by CreateBrightImgDlg(), GetCheckedItemCount(), OnCreateExposureLevels(), OnExposureChecked(), OnExposureSelected(), and OnOk().
|
private |
Definition at line 83 of file CreateBrightImgDlg.h.
Referenced by CreateAndSaveExposureCorrectedImage(), and SetImage().
|
private |
image cache entry for current image
Definition at line 76 of file CreateBrightImgDlg.h.
Referenced by CreateAndSaveExposureCorrectedImage(), CreatewxBitmap(), RescaleImage(), and SetImage().
Definition at line 70 of file CreateBrightImgDlg.h.
Referenced by CreateBrightImgDlg(), and OnCreateExposureLevels().
|
private |
Definition at line 72 of file CreateBrightImgDlg.h.
Referenced by CreateBrightImgDlg(), CreatewxBitmap(), OnExposureSelected(), OnSize(), RescaleImage(), and SetImage().
|
private |
current image as vigra::RGBImage
Definition at line 78 of file CreateBrightImgDlg.h.
Referenced by OnExposureSelected(), and RescaleImage().
|
private |
current image as wxBitmap
Definition at line 80 of file CreateBrightImgDlg.h.
Referenced by CreatewxBitmap(), OnExposureSelected(), OnSize(), and SetImage().
Definition at line 69 of file CreateBrightImgDlg.h.
Referenced by CreateBrightImgDlg(), and GetExposureStepWidth().
|
private |
Definition at line 82 of file CreateBrightImgDlg.h.
Referenced by GetTempFiles(), and OnOk().