Hugintrunk  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
CreateBrightImgDlg Class Reference

Dialog for create brighter and/or darker versions of an image. More...

#include <CreateBrightImgDlg.h>

Inheritance diagram for CreateBrightImgDlg:
Inheritance graph

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
 

Detailed Description

Dialog for create brighter and/or darker versions of an image.

Definition at line 36 of file CreateBrightImgDlg.h.

Constructor & Destructor Documentation

CreateBrightImgDlg::CreateBrightImgDlg ( wxWindow *  parent)
CreateBrightImgDlg::~CreateBrightImgDlg ( )

destructor, save position

Definition at line 80 of file CreateBrightImgDlg.cpp.

References hugin_utils::StoreFramePosition().

Member Function Documentation

bool CreateBrightImgDlg::CreateAndSaveExposureCorrectedImage ( const wxString &  filename,
const double  correction 
)
private
void CreateBrightImgDlg::CreatewxBitmap ( const vigra::BRGBImage &  img)
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().

long CreateBrightImgDlg::GetCheckedItemCount ( )
private

return the number of checked exposures

Definition at line 338 of file CreateBrightImgDlg.cpp.

References m_exposuresListBox.

Referenced by OnOk().

double CreateBrightImgDlg::GetExposureStepWidth ( ) const
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().

void CreateBrightImgDlg::OnCreateExposureLevels ( wxCommandEvent &  e)
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().

void CreateBrightImgDlg::OnExposureChecked ( wxListEvent &  e)
protected

prevent checking of exposure value 0

Definition at line 199 of file CreateBrightImgDlg.cpp.

References m_exposuresListBox.

Referenced by CreateBrightImgDlg(), and OnCreateExposureLevels().

void CreateBrightImgDlg::OnExposureSelected ( wxListEvent &  e)
protected
void CreateBrightImgDlg::OnOk ( wxCommandEvent &  e)
protected
void CreateBrightImgDlg::OnSize ( wxSizeEvent &  e)
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().

void CreateBrightImgDlg::RescaleImage ( )
private
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().

Member Data Documentation

double CreateBrightImgDlg::m_currentExposure { 0 }
private

Definition at line 81 of file CreateBrightImgDlg.h.

Referenced by OnExposureSelected(), and RescaleImage().

std::vector<double> CreateBrightImgDlg::m_exposures
private

Definition at line 74 of file CreateBrightImgDlg.h.

Referenced by OnCreateExposureLevels(), OnExposureSelected(), and OnOk().

wxListCtrl* CreateBrightImgDlg::m_exposuresListBox { nullptr }
private
wxString CreateBrightImgDlg::m_filename
private

Definition at line 83 of file CreateBrightImgDlg.h.

Referenced by CreateAndSaveExposureCorrectedImage(), and SetImage().

ImageCache::EntryPtr CreateBrightImgDlg::m_image
private

image cache entry for current image

Definition at line 76 of file CreateBrightImgDlg.h.

Referenced by CreateAndSaveExposureCorrectedImage(), CreatewxBitmap(), RescaleImage(), and SetImage().

wxChoice* CreateBrightImgDlg::m_levelChoice { nullptr }
private

Definition at line 70 of file CreateBrightImgDlg.h.

Referenced by CreateBrightImgDlg(), and OnCreateExposureLevels().

wxStaticBitmap* CreateBrightImgDlg::m_previewBitmap { nullptr }
private
vigra::BRGBImage CreateBrightImgDlg::m_scaledImg
private

current image as vigra::RGBImage

Definition at line 78 of file CreateBrightImgDlg.h.

Referenced by OnExposureSelected(), and RescaleImage().

wxBitmap CreateBrightImgDlg::m_scaledwxBitmap
private

current image as wxBitmap

Definition at line 80 of file CreateBrightImgDlg.h.

Referenced by CreatewxBitmap(), OnExposureSelected(), OnSize(), and SetImage().

wxChoice* CreateBrightImgDlg::m_stepWidthChoice { nullptr }
private

Definition at line 69 of file CreateBrightImgDlg.h.

Referenced by CreateBrightImgDlg(), and GetExposureStepWidth().

wxArrayString CreateBrightImgDlg::m_tempFiles
private

Definition at line 82 of file CreateBrightImgDlg.h.

Referenced by GetTempFiles(), and OnOk().


The documentation for this class was generated from the following files: