Hugintrunk
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. More... | |
~CreateBrightImgDlg () | |
destructor, save position More... | |
bool | SetImage (const wxString &filename, wxString &errorMsg) |
load the image, return true on success, otherwise false, error cause is in errorMsg More... | |
wxArrayString | GetTempFiles () const |
Protected Member Functions | |
void | OnOk (wxCommandEvent &e) |
process all images More... | |
void | OnCreateExposureLevels (wxCommandEvent &e) |
update listbox with new exposure values More... | |
void | OnExposureSelected (wxListEvent &e) |
one exposure selected More... | |
void | OnExposureChecked (wxListEvent &e) |
prevent checking of exposure value 0 More... | |
void | OnSize (wxSizeEvent &e) |
handler called when size of control was changed More... | |
Private Member Functions | |
double | GetExposureStepWidth () const |
returns the current selected exposure step width More... | |
void | RescaleImage () |
create rescaled image More... | |
void | CreatewxBitmap (const vigra::BRGBImage &img) |
create the wxBitmap version and apply color profiles More... | |
bool | CreateAndSaveExposureCorrectedImage (const wxString &filename, const double correction) |
create the exposure corrected image and save it to the file More... | |
long | GetCheckedItemCount () |
return the number of checked exposures More... | |
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 More... | |
vigra::BRGBImage | m_scaledImg |
current image as vigra::RGBImage More... | |
wxBitmap | m_scaledwxBitmap |
current image as wxBitmap More... | |
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(), and hugin_utils::RestoreFramePosition().
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 274 of file CreateBrightImgDlg.cpp.
References CreateBrightVersion(), vigra::exportImageAlpha(), HuginQueue::GetExternalProgram(), HUGIN_CONV_FILENAME, celeste::info(), m_filename, m_image, vigra_ext::pow(), vigra_ext::srcImage(), vigra_ext::srcImageRange(), and HuginQueue::wxEscapeFilename().
Referenced by OnOk().
|
private |
create the wxBitmap version and apply color profiles
Definition at line 252 of file CreateBrightImgDlg.cpp.
References HuginBase::Color::CorrectImage(), HuginBase::Color::detail::GetMonitorProfile(), m_image, m_previewBitmap, and m_scaledwxBitmap.
Referenced by OnExposureSelected(), and RescaleImage().
|
private |
return the number of checked exposures
Definition at line 338 of file CreateBrightImgDlg.cpp.
References m_exposuresListBox.
Referenced by OnOk().
|
private |
returns the current selected exposure step width
Definition at line 215 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.
Referenced by EnfusePanel::OnCreateFile().
|
protected |
update listbox with new exposure values
Definition at line 160 of file CreateBrightImgDlg.cpp.
References GetExposureStepWidth(), m_exposures, m_exposuresListBox, m_levelChoice, and OnExposureChecked().
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, and m_scaledwxBitmap.
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, and m_tempFiles.
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, and RescaleImage().
Referenced by CreateBrightImgDlg().
|
private |
create rescaled image
Definition at line 231 of file CreateBrightImgDlg.cpp.
References CreateBrightVersion(), CreatewxBitmap(), vigra_ext::destImageRange(), m_currentExposure, m_image, m_previewBitmap, m_scaledImg, and vigra_ext::srcImageRange().
Referenced by OnSize(), and SetImage().
bool CreateBrightImgDlg::SetImage | ( | const wxString & | filename, |
wxString & | errorMsg | ||
) |
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, celeste::info(), m_filename, m_image, m_previewBitmap, m_scaledwxBitmap, and RescaleImage().
Referenced by EnfusePanel::OnCreateFile().
|
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().
|
private |
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().
|
private |
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().