CLAM::SegmentTransformation Class Reference

#include <SegmentTransformation.hxx>

List of all members.

Public Member Functions

void AttachIn (Segment &data)
void AttachOut (Segment &data)
void WrapFrameTransformation (FrameTransformation *)
virtual bool ConcreteConfigure (const ProcessingConfig &c)
 Configuration change method.
const ProcessingConfigGetConfig () 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 FrameGetCurrentFrame (const Segment &in)
 formerly corresponded to UnwrappedProcessingData
virtual FrameGetCurrentFrame (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.
SegmentmInput
SegmentmOutput
int mCurrentInputFrame

Detailed Description

Definition at line 42 of file SegmentTransformation.hxx.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

void CLAM::SegmentTransformation::AddFramesToOutputIfInputIsLonger ( int  frameindex,
const Segment in,
Segment out 
) [inline, protected]
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.

Parameters:
The ProcessingConfig object
Returns:
True if the cast has been commited correctly

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.

bool CLAM::SegmentTransformation::Do ( const Segment in,
Segment out 
) [protected, virtual]

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.

Parameters:
input the Segment that is input to the transformation
out the Segment that is output from the transformation.
Returns:
Boolean value, whether the process has finished successfully or not.

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).

Returns:
A boolean telling whether it has been output

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]
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.

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.

Returns:
Const reference to the configuration object. The usual way to perform a configuration change in the processing object is to take a copy of this reference, to change it and to send it with the Configure method. If not overriden, it returns a NullProcessingConfig.

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.


Member Data Documentation

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().

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.

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().


The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3