CLAM::SpectrumProduct Class Reference

#include <SpectrumProduct.hxx>

Inheritance diagram for CLAM::SpectrumProduct:

CLAM::Processing

List of all members.


Detailed Description

This class performs the product of two Spectrum processing data objects.

Its primary use will be to allow frecuency domain filtering, by taking the frecuency response as one of its inputs. (It implements the funcionality provided in the old CCLAMApplyFDFilter class).

It Allows any possible attribute configuration in its inputs and in its output, but it performs faster when prototype configuration of the data is specified using SetPrototypes(...), in certain situations:

Todo:
Possible optimisations (which require more states):

The BPFxBPF product is being thought. If both BPFs have the same range and point possition, the way to go is obvious, but in other situations it is not so simple. Whe should probably merge both BPFs, into a new BPF.

Definition at line 69 of file SpectrumProduct.hxx.


Public Member Functions

 SpectrumProduct (const Config &c=Config())
virtual ~SpectrumProduct ()
bool Do ()
 Supervised mode execution method (using ports).
bool Do (Spectrum &in1, Spectrum &in2, Spectrum &out)
bool SetPrototypes (const Spectrum &in1, const Spectrum &in2, const Spectrum &out)
 Change the internal type state.
bool SetPrototypes ()
bool UnsetPrototypes ()
bool MayDisableExecution () const

Public Attributes

InPort< SpectrummInput1
InPort< SpectrummInput2
OutPort< SpectrummOutput

Constructor & Destructor Documentation

CLAM::SpectrumProduct::SpectrumProduct ( const Config c = Config()  ) 

Definition at line 41 of file SpectrumProduct.cxx.

References CLAM::Processing::Configure().

CLAM::SpectrumProduct::~SpectrumProduct (  )  [virtual]

Definition at line 51 of file SpectrumProduct.cxx.


Member Function Documentation

bool CLAM::SpectrumProduct::Do (  )  [virtual]

Supervised mode execution method (using ports).

Returns:
A boolean telling whether it has been output

Implements CLAM::Processing.

Definition at line 103 of file SpectrumProduct.cxx.

References CLAM_DEBUG_ASSERT, CLAM::Spectrum::GetSize(), mInput1, mInput2, mOutput, and CLAM::Spectrum::SetSize().

bool CLAM::SpectrumProduct::Do ( Spectrum in1,
Spectrum in2,
Spectrum out 
)

Definition at line 55 of file SpectrumProduct.cxx.

References CLAM_ASSERT, CLAM_DEBUG_ASSERT, and CLAM::Processing::IsRunning().

bool CLAM::SpectrumProduct::SetPrototypes ( const Spectrum in1,
const Spectrum in2,
const Spectrum out 
)

Change the internal type state.

Apart from prototype configuration, the Size, Scale and SpectralRange attributes of each Spectrum are also checked.

Definition at line 124 of file SpectrumProduct.cxx.

References CLAM::SpecTypeFlags::bComplex, CLAM::SpecTypeFlags::bMagPhase, CLAM::SpecTypeFlags::bMagPhaseBPF, CLAM::SpecTypeFlags::bPolar, CLAM_ASSERT, CLAM::EScale::eLinear, CLAM::EScale::eLog, CLAM::Spectrum::GetConfig(), CLAM::Spectrum::GetSize(), and CLAM::Spectrum::GetType().

bool CLAM::SpectrumProduct::SetPrototypes (  ) 

Definition at line 310 of file SpectrumProduct.cxx.

References CLAM_ASSERT.

bool CLAM::SpectrumProduct::UnsetPrototypes (  ) 

Definition at line 316 of file SpectrumProduct.cxx.

bool CLAM::SpectrumProduct::MayDisableExecution (  )  const [inline]

Definition at line 136 of file SpectrumProduct.hxx.


Member Data Documentation

Definition at line 110 of file SpectrumProduct.hxx.

Referenced by Do().

Definition at line 111 of file SpectrumProduct.hxx.

Referenced by Do().

Definition at line 112 of file SpectrumProduct.hxx.

Referenced by Do().


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

Generated on Tue Aug 12 22:33:48 2008 for CLAM by  doxygen 1.5.5