TuttleOFX  1
tuttle::plugin::histogramKeyer::OverlayData Class Reference

#include <OverlayData.hpp>

Collaboration diagram for tuttle::plugin::histogramKeyer::OverlayData:

Public Types

typedef boost::gil::rgba32f_view_t SView

Public Member Functions

 OverlayData (const OfxPointI &size, const int nbSteps, const int nbStepsCurvesFromSelection)
void clearSelection ()
void clearAll (const OfxPointI &size)
bool isImageSizeModified (const OfxPointI &size) const
void computeFullData (OFX::Clip *clipSrc, const OfxTime time, const OfxPointD &renderScale, const bool selectionOnly=false)
void computeCurveFromSelectionData (OFX::Clip *clipSrc, const OfxTime time, const OfxPointD &renderScale)
void setNbStep (const std::size_t nbStep)
bool isCurrentTimeModified (const OfxTime time) const
void resetCurvesFromSelectionData ()

Data Fields

HistogramBufferData _data
HistogramBufferData _selectionData
HistogramBufferData _curveFromSelection
AverageBarData _averageData
bool_2d _imgBool
OfxTime _currentTime
std::size_t _vNbStep
std::size_t _vNbStepCurveFromSelection
bool _isComputing
bool _isDataInvalid

Private Member Functions

void computeHistogramBufferData (HistogramBufferData &data, SView &srcView, const OfxTime time, const bool isSelection=false)
void correctHistogramBufferData (HistogramBufferData &toCorrect) const
void resetHistogramBufferData (HistogramBufferData &toReset) const
 Set each values of the vector to null.
void computeAverages ()
void resetHistogramData ()
void resetHistogramSelectionData ()
void resetAverages ()
void removeSelection ()
void correctVector (HistogramVector &v) const
void resetVectortoZero (HistogramVector &v, const std::size_t size) const
 Set each values of the vector to null.
int computeAnAverage (const HistogramVector &selection_v) const

Private Attributes

OfxPointI _size

Detailed Description

Definition at line 159 of file OverlayData.hpp.


Member Typedef Documentation

typedef boost::gil::rgba32f_view_t tuttle::plugin::histogramKeyer::OverlayData::SView

Definition at line 162 of file OverlayData.hpp.


Constructor & Destructor Documentation

tuttle::plugin::histogramKeyer::OverlayData::OverlayData ( const OfxPointI size,
const int  nbSteps,
const int  nbStepsCurvesFromSelection 
)

Create a new empty data structure from scratch (data is null)

Parameters:
size: size of the current source clip (width*height)

Definition at line 16 of file OverlayData.cpp.

References clearAll().

Here is the call graph for this function:


Member Function Documentation

void tuttle::plugin::histogramKeyer::OverlayData::clearAll ( const OfxPointI size) [inline]
void tuttle::plugin::histogramKeyer::OverlayData::clearSelection ( ) [inline]
int tuttle::plugin::histogramKeyer::OverlayData::computeAnAverage ( const HistogramVector selection_v) const [private]

Compute a specific channel average

Parameters:
selection_vvector which contain the selection histogram
Returns:

Definition at line 126 of file OverlayData.cpp.

Referenced by computeAverages().

void tuttle::plugin::histogramKeyer::OverlayData::computeCurveFromSelectionData ( OFX::Clip clipSrc,
const OfxTime  time,
const OfxPointD renderScale 
)
void tuttle::plugin::histogramKeyer::OverlayData::computeFullData ( OFX::Clip clipSrc,
const OfxTime  time,
const OfxPointD renderScale,
const bool  selectionOnly = false 
)
void tuttle::plugin::histogramKeyer::OverlayData::computeHistogramBufferData ( HistogramBufferData data,
SView srcView,
const OfxTime  time,
const bool  isSelection = false 
) [private]

Update selection areas buffer to selection histograms overlay

Parameters:
argsneeded to have current time

Definition at line 31 of file OverlayData.cpp.

References _imgBool, _size, tuttle::plugin::histogramKeyer::HistogramBufferData::_step, _vNbStep, correctHistogramBufferData(), terry::algorithm::transform_pixels(), OfxPointI::x, and OfxPointI::y.

Referenced by computeFullData().

Here is the call graph for this function:

void tuttle::plugin::histogramKeyer::OverlayData::correctVector ( HistogramVector v) const [private]

Replace vector null values by average (better for histogram display)

Parameters:
vvector to modify

Definition at line 97 of file OverlayData.cpp.

Referenced by correctHistogramBufferData().

bool tuttle::plugin::histogramKeyer::OverlayData::isCurrentTimeModified ( const OfxTime  time) const
bool tuttle::plugin::histogramKeyer::OverlayData::isImageSizeModified ( const OfxPointI imgSize) const

Image size checker

Warning:
HACK changeClip method doesn't work in nuke when time of source clip is changed so we have to check size of imgBool all the time

Check size (verify that imgBool always has the good size

Definition at line 302 of file OverlayData.cpp.

References _size, OfxPointI::x, and OfxPointI::y.

Referenced by computeCurveFromSelectionData(), computeFullData(), and tuttle::plugin::histogramKeyer::HistogramKeyerOverlay::draw().

void tuttle::plugin::histogramKeyer::OverlayData::removeSelection ( ) [private]

Definition at line 270 of file OverlayData.cpp.

References _imgBool, _size, OfxPointI::x, and OfxPointI::y.

void tuttle::plugin::histogramKeyer::OverlayData::resetCurvesFromSelectionData ( )

HistoramData management

Reset the data (all values to 0)

Parameters:
sizesize of the current source clip

Definition at line 252 of file OverlayData.cpp.

References _curveFromSelection, tuttle::plugin::histogramKeyer::HistogramBufferData::_step, _vNbStepCurveFromSelection, and resetHistogramBufferData().

Referenced by computeCurveFromSelectionData().

Here is the call graph for this function:

void tuttle::plugin::histogramKeyer::OverlayData::resetHistogramData ( ) [private]

Reset the data (all values to 0)

Parameters:
sizesize of the current source clip

Definition at line 241 of file OverlayData.cpp.

References _data, tuttle::plugin::histogramKeyer::HistogramBufferData::_step, _vNbStep, and resetHistogramBufferData().

Referenced by computeFullData().

Here is the call graph for this function:

void tuttle::plugin::histogramKeyer::OverlayData::resetHistogramSelectionData ( ) [private]

Reset the data (all values to 0)

Parameters:
sizesize of the current source clip

Definition at line 263 of file OverlayData.cpp.

References _selectionData, tuttle::plugin::histogramKeyer::HistogramBufferData::_step, _vNbStep, and resetHistogramBufferData().

Referenced by computeFullData().

Here is the call graph for this function:

void tuttle::plugin::histogramKeyer::OverlayData::resetVectortoZero ( HistogramVector v,
const std::size_t  numberOfStep 
) const [private]

Set each values of the vector to null.

Parameters:
vvector to reset
numberOfStepnumber of step (size of the vector)

Definition at line 53 of file OverlayData.cpp.

Referenced by resetHistogramBufferData().

void tuttle::plugin::histogramKeyer::OverlayData::setNbStep ( const std::size_t  nbStep) [inline]

Field Documentation


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