#include <SegmentTransformation.hxx>
Definition at line 42 of file 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. | |
InControl | mOnCtrl |
Control to state whether a particular transformation is on or off. | |
Segment * | mInput |
Segment * | mOutput |
int | mCurrentInputFrame |
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::AttachIn | ( | Segment & | data | ) | [inline] |
Definition at line 73 of file SegmentTransformation.hxx.
References mInput.
Referenced by CLAM::SMSTransformationChain::ConcreteStart().
void CLAM::SegmentTransformation::AttachOut | ( | Segment & | data | ) | [inline] |
Definition at line 74 of file SegmentTransformation.hxx.
References mOutput.
Referenced by CLAM::SMSTransformationChain::ConcreteStart().
void CLAM::SegmentTransformation::WrapFrameTransformation | ( | FrameTransformation * | trans | ) |
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.
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 bool CLAM::SegmentTransformation::DoWithSegments | ( | void | ) | [inline, virtual] |
Supervised Do() function.
It calls the non-supervised Do that receives Segment as input and output.
Definition at line 104 of file SegmentTransformation.hxx.
References Do(), mInput, and mOutput.
Referenced by CLAM::SMSTransformationChain::DoChildren().
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(), and CLAM::SegmentSMSTimeStretch::Do().
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::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.
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.
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(), CLAM::SegmentSMSMorph::Do(), and DoWithSegments().
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.
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().
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().
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.
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.
Internally stored configuration.
Reimplemented in CLAM::SegmentSMSMorph.
Definition at line 50 of file SegmentTransformation.hxx.
Referenced by ConcreteConfigure(), GetConfig(), and UpdateControlValueFromBPF().
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(), CLAM::SegmentSMSTimeStretch::ConcreteConfigure(), Do(), CLAM::SegmentSMSMorph::SegmentSMSMorph(), and SegmentTransformation().
InControl 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::mInput [protected] |
Definition at line 62 of file SegmentTransformation.hxx.
Referenced by AttachIn(), Do(), DoWithSegments(), GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::HaveFinished(), IsLastFrame(), and SegmentTransformation().
Segment* CLAM::SegmentTransformation::mOutput [protected] |
Definition at line 63 of file SegmentTransformation.hxx.
Referenced by AttachOut(), DoWithSegments(), IsLastFrame(), CLAM::SegmentSMSTimeStretch::IsLastFrame(), and SegmentTransformation().
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().
int CLAM::SegmentTransformation::mCurrentInputFrame [protected] |
Definition at line 159 of file SegmentTransformation.hxx.
Referenced by CLAM::SegmentSMSTimeStretch::ConcreteStart(), Do(), CLAM::SegmentSMSTimeStretch::Do(), GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::GetCurrentFrame(), CLAM::SegmentSMSTimeStretch::HaveFinished(), CLAM::SegmentSMSTimeStretch::SegmentSMSTimeStretch(), SegmentTransformation(), and CLAM::SegmentSMSTimeStretch::UpdateTimeAndIndex().