#include <SegmentTransformation.hxx>
Public Member Functions | |
void | AttachIn (Segment &data) |
void | AttachOut (Segment &data) |
void | WrapFrameTransformation (FrameTransformation *) |
virtual bool | ConcreteConfigure (const ProcessingConfig &c) |
Configuration change method. | |
const ProcessingConfig & | GetConfig () const |
Configuration getter. | |
SegmentTransformation () | |
Base constructor of class. | |
SegmentTransformation (const SegmentTransformationConfig &c) | |
Constructor with an object of SegmentTransformationConfig class by parameter. | |
virtual | ~SegmentTransformation () |
virtual bool | DoWithSegments (void) |
Supervised Do() function. | |
virtual bool | UpdateControlValueFromBPF (TData pos) |
Method to update the Amount control from an existing BPF configured in the configuration phase. | |
virtual bool | IsLastFrame () |
Returns true if there are no more frames to read from input. | |
bool | ConcreteStart () |
Overriding default method to initialize input frame counter. | |
Public Attributes | |
InControlPublisher | mAmountCtrl |
Control for the amount of the concrete transformation that will be applied. | |
Protected Member Functions | |
virtual bool | Do (const Frame &in, Frame &out) |
bool | Do () |
Supervised mode execution method (using ports). | |
const char * | GetClassName () const |
Override it in every subclass and retur the name of that class. | |
void | AddFramesToOutputIfInputIsLonger (int frameindex, const Segment &in, Segment &out) |
virtual bool | Do (const Segment &in, Segment &out) |
Unsupervised Do function, receives a Segment as input and output. | |
virtual const Frame & | GetCurrentFrame (const Segment &in) |
formerly corresponded to UnwrappedProcessingData | |
virtual Frame & | GetCurrentFrame (Segment &out) |
formerly corresponded to UnwrappedProcessingData | |
Protected Attributes | |
SegmentTransformationConfig | mConfig |
Internally stored configuration. | |
bool | mUseTemporalBPF |
Boolean member that indicates whether BPF or single value is to be used. | |
FloatInControl | mOnCtrl |
Control to state whether a particular transformation is on or off. | |
Segment * | mInput |
Segment * | mOutput |
int | mCurrentInputFrame |
Definition at line 42 of file SegmentTransformation.hxx.
CLAM::SegmentTransformation::SegmentTransformation | ( | ) |
Base constructor of class.
Calls Configure method with a SegmentTransformationConfig initialised by default
Definition at line 32 of file SegmentTransformation.cxx.
References mCurrentInputFrame, mInput, mOutput, and mUseTemporalBPF.
CLAM::SegmentTransformation::SegmentTransformation | ( | const SegmentTransformationConfig & | c | ) |
Constructor with an object of SegmentTransformationConfig class by parameter.
c | SegmentTransformationConfig object created by the user |
Definition at line 43 of file SegmentTransformation.cxx.
References CLAM::Processing::Configure(), mCurrentInputFrame, mInput, mOutput, and mUseTemporalBPF.
CLAM::SegmentTransformation::~SegmentTransformation | ( | ) | [virtual] |
Definition at line 55 of file SegmentTransformation.cxx.
void CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger | ( | int | frameindex, | |
const Segment & | in, | |||
Segment & | out | |||
) | [inline, protected] |
Definition at line 128 of file SegmentTransformation.hxx.
References CLAM::Segment::AddFrame(), CLAM::Segment::GetFrame(), and CLAM::Segment::GetnFrames().
Referenced by Do().
void CLAM::SegmentTransformation::AttachIn | ( | Segment & | data | ) | [inline] |
Definition at line 73 of file SegmentTransformation.hxx.
References mInput.
void CLAM::SegmentTransformation::AttachOut | ( | Segment & | data | ) | [inline] |
Definition at line 74 of file SegmentTransformation.hxx.
References mOutput.
bool CLAM::SegmentTransformation::ConcreteConfigure | ( | const ProcessingConfig & | c | ) | [virtual] |
Configuration change method.
Note that the Amount Control is initialized from the the values in the configuration. Appart from that the member boolean variable that indicates whether a BPF is used is also initialized and the On/Off control also.
The | ProcessingConfig object |
Reimplemented from CLAM::Processing.
Reimplemented in CLAM::SegmentSMSMorph, and CLAM::SegmentSMSTimeStretch.
Definition at line 94 of file SegmentTransformation.cxx.
References CLAM::Processing::CopyAsConcreteConfig(), CLAM::InControlPublisher::DoControl(), mAmountCtrl, mConfig, and mUseTemporalBPF.
bool CLAM::SegmentTransformation::ConcreteStart | ( | void | ) | [virtual] |
Overriding default method to initialize input frame counter.
Reimplemented from CLAM::Processing.
Reimplemented in CLAM::SegmentSMSMorph, and CLAM::SegmentSMSTimeStretch.
Definition at line 139 of file SegmentTransformation.cxx.
Unsupervised Do function, receives a Segment as input and output.
This overload is the one called from the supervised Do(). Note that if BPF parameter is used, the Amount control is also updated.
input | the Segment that is input to the transformation | |
out | the Segment that is output from the transformation. |
Reimplemented in CLAM::SegmentSMSMorph, and CLAM::SegmentSMSTimeStretch.
Definition at line 61 of file SegmentTransformation.cxx.
References AddFramesToOutputIfInputIsLonger(), CLAM_ASSERT, Do(), CLAM::FrameTransformation::Do(), CLAM::Segment::GetFrame(), CLAM::Segment::GetnFrames(), CLAM::Segment::mCurrentFrameIndex, mCurrentInputFrame, mInput, mUseTemporalBPF, and UpdateControlValueFromBPF().
bool CLAM::SegmentTransformation::Do | ( | ) | [inline, protected, virtual] |
Supervised mode execution method (using ports).
Implements CLAM::Processing.
Reimplemented in CLAM::SegmentSMSMorph, CLAM::SegmentSMSTimeStretch, and CLAM::SMSTransformationChainIO.
Definition at line 124 of file SegmentTransformation.hxx.
Referenced by Do(), and DoWithSegments().
virtual bool CLAM::SegmentTransformation::Do | ( | const Frame & | in, | |
Frame & | out | |||
) | [inline, protected, virtual] |
Reimplemented in CLAM::SegmentSMSMorph, CLAM::SegmentSMSTimeStretch, and CLAM::SMSTransformationChainIO.
Definition at line 123 of file SegmentTransformation.hxx.
virtual bool CLAM::SegmentTransformation::DoWithSegments | ( | void | ) | [inline, virtual] |
const char* CLAM::SegmentTransformation::GetClassName | ( | ) | const [inline, protected, virtual] |
Override it in every subclass and retur the name of that class.
Implements CLAM::Processing.
Reimplemented in CLAM::SegmentSMSMorph, and CLAM::SegmentSMSTimeStretch.
Definition at line 125 of file SegmentTransformation.hxx.
const ProcessingConfig& CLAM::SegmentTransformation::GetConfig | ( | ) | const [inline, virtual] |
Configuration getter.
Gets the configuration parameters used to create the object.
Reimplemented from CLAM::Processing.
Reimplemented in CLAM::SegmentSMSMorph.
Definition at line 86 of file SegmentTransformation.hxx.
References mConfig.
virtual Frame& CLAM::SegmentTransformation::GetCurrentFrame | ( | Segment & | out | ) | [inline, protected, virtual] |
formerly corresponded to UnwrappedProcessingData
Reimplemented in CLAM::SegmentSMSTimeStretch.
Definition at line 151 of file SegmentTransformation.hxx.
References CLAM::Segment::AddFrame(), CLAM::Segment::GetFrame(), CLAM::Segment::GetnFrames(), mCurrentInputFrame, and mInput.
virtual const Frame& CLAM::SegmentTransformation::GetCurrentFrame | ( | const Segment & | in | ) | [inline, protected, virtual] |
formerly corresponded to UnwrappedProcessingData
Reimplemented in CLAM::SegmentSMSTimeStretch.
Definition at line 145 of file SegmentTransformation.hxx.
References CLAM::Segment::GetFrame(), and mCurrentInputFrame.
bool CLAM::SegmentTransformation::IsLastFrame | ( | ) | [virtual] |
Returns true if there are no more frames to read from input.
Reimplemented in CLAM::SegmentSMSTimeStretch.
Definition at line 125 of file SegmentTransformation.cxx.
References CLAM::Segment::DeleteFrame(), CLAM::Segment::GetnFrames(), CLAM::Segment::mCurrentFrameIndex, mInput, and mOutput.
bool CLAM::SegmentTransformation::UpdateControlValueFromBPF | ( | TData | pos | ) | [virtual] |
Method to update the Amount control from an existing BPF configured in the configuration phase.
Reimplemented in CLAM::SegmentSMSMorph.
Definition at line 114 of file SegmentTransformation.cxx.
References CLAM::InControlPublisher::DoControl(), mAmountCtrl, and mConfig.
Referenced by Do().
void CLAM::SegmentTransformation::WrapFrameTransformation | ( | FrameTransformation * | trans | ) |
Definition at line 26 of file SegmentTransformation.cxx.
References CLAM_ASSERT.
Control for the amount of the concrete transformation that will be applied.
This control value can be manually updated or automatically from the values in the BPF envelope-like configuration parameter.
Definition at line 69 of file SegmentTransformation.hxx.
Referenced by ConcreteConfigure(), and UpdateControlValueFromBPF().
Internally stored configuration.
Reimplemented in CLAM::SegmentSMSMorph.
Definition at line 50 of file SegmentTransformation.hxx.
Referenced by ConcreteConfigure(), GetConfig(), and UpdateControlValueFromBPF().
int CLAM::SegmentTransformation::mCurrentInputFrame [protected] |
Definition at line 159 of file SegmentTransformation.hxx.
Referenced by Do(), GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), and SegmentTransformation().
Segment* CLAM::SegmentTransformation::mInput [protected] |
Definition at line 62 of file SegmentTransformation.hxx.
Referenced by AttachIn(), Do(), DoWithSegments(), GetCurrentFrame(), IsLastFrame(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), and SegmentTransformation().
FloatInControl CLAM::SegmentTransformation::mOnCtrl [protected] |
Control to state whether a particular transformation is on or off.
This control may be used as a bypass when the transformation is connected in a Chain.
Definition at line 60 of file SegmentTransformation.hxx.
Segment* CLAM::SegmentTransformation::mOutput [protected] |
Definition at line 63 of file SegmentTransformation.hxx.
Referenced by AttachOut(), DoWithSegments(), IsLastFrame(), and SegmentTransformation().
bool CLAM::SegmentTransformation::mUseTemporalBPF [protected] |
Boolean member that indicates whether BPF or single value is to be used.
This is not a control because it is not supposed to change un run-time. It is rather a configuration parameter that can be automatically extracted from mConfig but it is placed here to make it more explicit.
Definition at line 56 of file SegmentTransformation.hxx.
Referenced by ConcreteConfigure(), Do(), and SegmentTransformation().