PreviewColorPickerTool Class Reference

The PreviewColorPickerTool allows to select a region in the panorama which should be grey. More...

#include <PreviewColorPickerTool.h>

Inheritance diagram for PreviewColorPickerTool:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PreviewColorPickerTool (ToolHelper *helper)
 constructor
void Activate ()
 Switch on a tool.
void MouseButtonEvent (wxMouseEvent &e)
 process mouse button events

Private Member Functions

void CalcCorrection (hugin_utils::FDiff2D pos)
void CalcCorrectionForImage (unsigned int i, vigra::Point2D pos)

Private Attributes

double m_red
double m_blue
unsigned int m_count

Detailed Description

The PreviewColorPickerTool allows to select a region in the panorama which should be grey.

In the selected region it calculates the new red multiplier and blue multiplier to get a grey region.

Definition at line 36 of file PreviewColorPickerTool.h.


Constructor & Destructor Documentation

PreviewColorPickerTool::PreviewColorPickerTool ToolHelper helper  )  [inline]
 

constructor

Definition at line 40 of file PreviewColorPickerTool.h.


Member Function Documentation

void PreviewColorPickerTool::Activate  )  [virtual]
 

Switch on a tool.

Inherited classes also register events they want to respond to with the PreviewToolHelper. As events are lost when the tool is deactivated without notification to the PreviewTool, things from the last activation can be cleaned up here too.

Implements Tool.

Definition at line 41 of file PreviewColorPickerTool.cpp.

References ToolHelper::NotifyMe(), and ToolHelper::SetStatusMessage().

void PreviewColorPickerTool::CalcCorrection hugin_utils::FDiff2D  pos  )  [private]
 

Definition at line 64 of file PreviewColorPickerTool.cpp.

References CalcCorrectionForImage(), ColorPickerSize, HuginBase::PTools::Transform::createTransform(), hugin_utils::FDiff2D, HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), HuginBase::SrcPanoImage::isInside(), m_blue, m_count, m_red, HuginBase::PTools::Transform::transformImgCoord(), HuginBase::UIntSet, hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.

Referenced by MouseButtonEvent().

void PreviewColorPickerTool::CalcCorrectionForImage unsigned int  i,
vigra::Point2D  pos
[private]
 

Definition at line 102 of file PreviewColorPickerTool.cpp.

References ColorPickerSize, vigra_ext::EMoR::createEMoRLUT(), vigra_ext::destImage(), vigra_ext::enforceMonotonicity(), HuginBase::ImageCache::getImage(), HuginBase::Panorama::getImage(), HuginBase::ImageCache::getInstance(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), m_blue, m_count, m_red, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, vigra_ext::pow(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setHDROutput(), HuginBase::Photometric::InvResponseTransform< VTIn, VTOut >::setOutput(), vigra_ext::srcImageRange(), and vigra_ext::transformImageSpatial().

Referenced by CalcCorrection().

void PreviewColorPickerTool::MouseButtonEvent wxMouseEvent &  e  )  [virtual]
 

process mouse button events

Reimplemented from Tool.

Definition at line 48 of file PreviewColorPickerTool.cpp.

References CalcCorrection(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetPreviewFrame(), ToolHelper::IsMouseOverPano(), m_blue, m_count, m_red, and GLPreviewFrame::UpdateGlobalWhiteBalance().


Member Data Documentation

double PreviewColorPickerTool::m_blue [private]
 

Definition at line 46 of file PreviewColorPickerTool.h.

Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().

unsigned int PreviewColorPickerTool::m_count [private]
 

Definition at line 47 of file PreviewColorPickerTool.h.

Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().

double PreviewColorPickerTool::m_red [private]
 

Definition at line 45 of file PreviewColorPickerTool.h.

Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().


The documentation for this class was generated from the following files:
Generated on Fri Sep 19 01:25:45 2014 for Hugintrunk by  doxygen 1.3.9.1