Hugintrunk
0.1
|
The PreviewColorPickerTool allows to select a region in the panorama which should be grey. More...
#include <PreviewColorPickerTool.h>
Public Member Functions | |
PreviewColorPickerTool (ToolHelper *helper) | |
constructor More... | |
void | Activate () |
Switch on a tool. More... | |
void | MouseButtonEvent (wxMouseEvent &e) |
process mouse button events More... | |
Public Member Functions inherited from Tool | |
Tool (ToolHelper *helper) | |
Construct keeping a pointer to a PreviewToolHelper. More... | |
virtual | ~Tool () |
virtual void | MouseMoveEvent (double x, double y, wxMouseEvent &e) |
Notify when the mouse pointer has moved over the panorama preview. More... | |
virtual void | MouseWheelEvent (wxMouseEvent &e) |
Notify of a mouse wheel event on the panorama preview. More... | |
virtual void | ImagesUnderMouseChangedEvent () |
Notify when the images directly underneath the mouse pointer have changed. More... | |
virtual void | KeypressEvent (int keycode, int modifiers, bool pressed) |
Notify of a Keypress event. More... | |
virtual void | BeforeDrawImagesEvent () |
Draw using OpenGL anything the tool requires underneath the images. More... | |
virtual void | AfterDrawImagesEvent () |
Draw (using OpenGL) images above the others. More... | |
virtual void | ReallyAfterDrawImagesEvent () |
Draw (using OpenGL) the overlays, e.g. crop highlights, guides. More... | |
virtual bool | BeforeDrawImageEvent (unsigned int image) |
Draw what the tool requires just before a given image is drawn. More... | |
virtual void | AfterDrawImageEvent (unsigned int image) |
Notification called just after the image was drawn normally. More... | |
virtual void | MarkDirty () |
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 |
Additional Inherited Members | |
Protected Attributes inherited from Tool | |
ToolHelper * | helper |
The PreviewToolHelper that uses the same preview window and panorama as the tool should. More... | |
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.
|
inlineexplicit |
constructor
Definition at line 40 of file PreviewColorPickerTool.h.
|
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 42 of file PreviewColorPickerTool.cpp.
References Tool::helper, ToolHelper::MOUSE_PRESS, ToolHelper::NotifyMe(), and ToolHelper::SetStatusMessage().
|
private |
Definition at line 65 of file PreviewColorPickerTool.cpp.
References CalcCorrectionForImage(), ColorPickerSize, HuginBase::PTools::Transform::createTransform(), HuginBase::Panorama::getActiveImages(), HuginBase::Panorama::getImage(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), Tool::helper, HuginBase::SrcPanoImage::isInside(), m_blue, m_count, m_red, HuginBase::PTools::Transform::transformImgCoord(), hugin_utils::TDiff2D< T >::x, and hugin_utils::TDiff2D< T >::y.
Referenced by MouseButtonEvent().
|
private |
Definition at line 103 of file PreviewColorPickerTool.cpp.
References ColorPickerSize, vigra::omp::copyImage(), vigra_ext::EMoR::createEMoRLUT(), vigra_ext::destImage(), vigra_ext::enforceMonotonicity(), HuginBase::ImageCache::getImage(), HuginBase::Panorama::getImage(), HuginBase::ImageCache::getInstance(), HuginBase::Panorama::getOptions(), ToolHelper::GetPanoramaPtr(), Tool::helper, m_blue, m_count, m_red, HuginBase::PanoramaOptions::OUTPUT_LDR, HuginBase::PanoramaOptions::outputExposureValue, HuginBase::PanoramaOptions::outputMode, vigra_ext::pow(), vigra_ext::srcImageRange(), and vigra_ext::transformImageSpatial().
Referenced by CalcCorrection().
|
virtual |
process mouse button events
Reimplemented from Tool.
Definition at line 49 of file PreviewColorPickerTool.cpp.
References CalcCorrection(), ToolHelper::GetMousePanoPosition(), ToolHelper::GetPreviewFrame(), Tool::helper, ToolHelper::IsMouseOverPano(), m_blue, m_count, m_red, and GLPreviewFrame::UpdateGlobalWhiteBalance().
|
private |
Definition at line 46 of file PreviewColorPickerTool.h.
Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().
|
private |
Definition at line 47 of file PreviewColorPickerTool.h.
Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().
|
private |
Definition at line 45 of file PreviewColorPickerTool.h.
Referenced by CalcCorrection(), CalcCorrectionForImage(), and MouseButtonEvent().