Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
Bial::Signal Class Reference

Signal handeling declaration. More...

#include <Signal.hpp>

Collaboration diagram for Bial::Signal:
Collaboration graph

Public Member Functions

 Signal ()
 Basic constructor. More...
 
 Signal (size_t data_size, double data_minimum=0.0, double data_step=1.0)
 Basic constructor. All frequencies are initiated with 0.0. More...
 
template<class D >
 Signal (Vector< D > &new_frequency, double data_minimum=0.0, double data_step=1.0)
 Basic constructor. More...
 
template<class D >
 Signal (Vector< D > &new_frequency, Vector< D > &new_data)
 Basic constructor. More...
 
 Signal (const Signal &sgn)
 Copy Constructor. More...
 
 Signal (Signal &&)=default
 Move Constructor. More...
 
Signaloperator= (const Signal &other)
 Assigns 'other'signal to this signal. More...
 
Signaloperator= (Signal &&)=default
 Assigns 'other'signal to this signal, moving the content. More...
 
const double & operator[] (size_t bin) const
 Returns frequency at bin 'bin'. More...
 
double & operator[] (size_t p)
 Returns a reference to bin 'bin'. More...
 
size_t Size () const
 Returns the number of bins. More...
 
size_t size () const
 Returns the number of bins. More...
 
size_t Bins () const
 Returns the number of bins. Same as Size( ) method. More...
 
const double * Data () const
 Returns signal data. More...
 
double * Data ()
 Returns signal data. More...
 
const double * data () const
 Returns signal data. More...
 
double * data ()
 Returns signal data. More...
 
template<class D >
void Data (Vector< D > val)
 Assigns a copy of val to data. Frequency vector remains unchanged. More...
 
const double * Frequency () const
 Returns a pointer to the signal data. More...
 
double * Frequency ()
 Returns a pointer to the signal data. More...
 
void Frequency (Vector< double > val)
 Assigns a copy of val to frequency. Data vector remains unchanged. More...
 
double MinimumFrequency (size_t min_bin=0) const
 Returns the minimum frequency contained in bins from min_bin to the last bin (including the extremities). More...
 
double MinimumFrequency (size_t min_bin, size_t max_bin) const
 Returns the minimum frequency contained in bins from min_bin to max_bin (including the extremities). More...
 
double MaximumFrequency (size_t min_bin=0) const
 Returns the maximum frequency contained in bins from min_bin to the last bin (including the extremities). More...
 
double MaximumFrequency (size_t min_bin, size_t max_bin) const
 Returns the maximum frequency contained in bins from min_bin to max_bin (including the extremities). More...
 
size_t MinimumFrequencyBin (size_t min_bin=0) const
 Returns the bin of the minimum frequency contained in bins from min_bin to the last bin (including the extremities). More...
 
size_t MinimumFrequencyBin (size_t min_bin, size_t max_bin) const
 Returns the bin of the minimum frequency contained in bins from min_bin to max_bin (including the extremities). More...
 
size_t MaximumFrequencyBin (size_t min_bin=0) const
 Returns the bin of the maximum frequency contained in bins from min_bin to the last bin (including the extremities). More...
 
size_t MaximumFrequencyBin (size_t min_bin, size_t max_bin) const
 Returns the bin of the maximum frequency contained in bins from min_bin to max_bin (including the extremities). More...
 
size_t Bin (double val) const
 Returns the closest bin into which 'val' would fall. More...
 
void Bin (size_t bin, double val)
 Sets value "val" to histogram bin "bin". More...
 
const double & Data (size_t bin) const
 Returns data corresponding to the input bin. More...
 
double & Data (size_t bin)
 Assigns value to data bin. More...
 
template<class O >
void Print (O &os) const
 Prints signal containts to output stream os. It prints a pair composed by frequency and value per line. More...
 

Detailed Description

Signal handeling declaration.

Definition at line 20 of file Signal.hpp.

Constructor & Destructor Documentation

Bial::Signal::Signal ( )

Basic constructor.

Date
2012/Sep/11
Parameters
none.
Returns
none.
Warning
none.
Bial::Signal::Signal ( size_t  data_size,
double  data_minimum = 0.0,
double  data_step = 1.0 
)

Basic constructor. All frequencies are initiated with 0.0.

Date
2012/Sep/11
Parameters
data_sizeNumber of samples.
data_minimumMinimum data value.
data_stepData step between two consecutive samples.
Returns
none.
Warning
none.
template<class D >
Bial::Signal::Signal ( Vector< D > &  new_frequency,
double  data_minimum = 0.0,
double  data_step = 1.0 
)

Basic constructor.

Date
2012/Sep/11
Parameters
new_frequencyFrequency to be assigned to the signal.
data_minimumMinimum data value.
data_stepData step between two consecutive samples.
Returns
none.
Warning
none.
template<class D >
Bial::Signal::Signal ( Vector< D > &  new_frequency,
Vector< D > &  new_data 
)

Basic constructor.

Date
2013/Oct/04
Parameters
new_frequencyFrequency to be assigned to the signal.
new_dataData to be assigned to the signal.
Returns
none.
Warning
none.
Bial::Signal::Signal ( const Signal sgn)

Copy Constructor.

Date
2015/May/08
Version
1.0.00
Parameters
filenameFile name.
Returns
none.
Warning
none.
Bial::Signal::Signal ( Signal &&  )
default

Move Constructor.

Date
2015/May/08
Version
1.0.00
Parameters
sgnOther signal.
Returns
none.
Warning
none.

Member Function Documentation

size_t Bial::Signal::Bin ( double  val) const

Returns the closest bin into which 'val' would fall.

Date
2012/Sep/11
Parameters
valData value.
Returns
The closest bin into which 'val' would fall.
Warning
none.
void Bial::Signal::Bin ( size_t  bin,
double  val 
)

Sets value "val" to histogram bin "bin".

Date
2012/Sep/11
Parameters
binthe bin to be set.
valData value.
Returns
none.
Warning
none.
size_t Bial::Signal::Bins ( ) const

Returns the number of bins. Same as Size( ) method.

Date
2012/Sep/13
Parameters
none.
Returns
The number of bins.
Warning
none.
const double* Bial::Signal::Data ( ) const

Returns signal data.

Date
2012/Sep/13
Parameters
none.
Returns
Signal data.
Warning
none.
double* Bial::Signal::Data ( )

Returns signal data.

Date
2015/Mar/05
Parameters
none.
Returns
Signal data.
Warning
none.
const double* Bial::Signal::data ( ) const

Returns signal data.

Date
2015/Mar/05
Parameters
none.
Returns
Signal data.
Warning
none.
double* Bial::Signal::data ( )

Returns signal data.

Date
2015/Mar/05
Parameters
none.
Returns
Signal data.
Warning
none.
template<class D >
void Bial::Signal::Data ( Vector< D >  val)

Assigns a copy of val to data. Frequency vector remains unchanged.

Date
2012/Sep/13
Parameters
valA Vector to be assigned.
Returns
none.
Warning
Frequency vector size must match.
const double& Bial::Signal::Data ( size_t  bin) const

Returns data corresponding to the input bin.

Date
2012/Sep/11
Parameters
binData bin.
Returns
Data corresponding to the input bin.
Warning
Does not verify data vector bounds.
double& Bial::Signal::Data ( size_t  bin)

Assigns value to data bin.

Date
2012/Sep/11
Parameters
binData bin.
valData value.
Returns
none.
Warning
Does not verify data vector bounds.
const double* Bial::Signal::Frequency ( ) const

Returns a pointer to the signal data.

Date
2012/Sep/13
Parameters
none.
Returns
A pointer to the signal data.
Warning
none.
double* Bial::Signal::Frequency ( )

Returns a pointer to the signal data.

Date
2015/Mar/15
Parameters
none.
Returns
A pointer to the signal data.
Warning
none.
void Bial::Signal::Frequency ( Vector< double >  val)

Assigns a copy of val to frequency. Data vector remains unchanged.

Date
2012/Sep/13
Parameters
valA Vector to be assigned.
Returns
none.
Warning
Data vector must match.
double Bial::Signal::MaximumFrequency ( size_t  min_bin = 0) const

Returns the maximum frequency contained in bins from min_bin to the last bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
Returns
The maximum frequency contained in bins from min_bin to the last bin (including the extremities).
Warning
none.
double Bial::Signal::MaximumFrequency ( size_t  min_bin,
size_t  max_bin 
) const

Returns the maximum frequency contained in bins from min_bin to max_bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
max_binright most bin.
Returns
The maximum frequency contained in bins from min_bin to max_bin (including the extremities).
Warning
none.
size_t Bial::Signal::MaximumFrequencyBin ( size_t  min_bin = 0) const

Returns the bin of the maximum frequency contained in bins from min_bin to the last bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
Returns
The bin of the maximum frequency contained in bins from min_bin to the last bin (including the extremities).
Warning
none.
size_t Bial::Signal::MaximumFrequencyBin ( size_t  min_bin,
size_t  max_bin 
) const

Returns the bin of the maximum frequency contained in bins from min_bin to max_bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
max_binright most bin.
Returns
The bin of the maximum frequency contained in bins from min_bin to max_bin (including the extremities).
Warning
none.
double Bial::Signal::MinimumFrequency ( size_t  min_bin = 0) const

Returns the minimum frequency contained in bins from min_bin to the last bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
Returns
The minimum frequency contained from min_bin to the last bin (including the extremities).
Warning
none.
double Bial::Signal::MinimumFrequency ( size_t  min_bin,
size_t  max_bin 
) const

Returns the minimum frequency contained in bins from min_bin to max_bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
max_binright most bin.
Returns
The minimum frequency contained in bins from min_bin to max_bin (including the extremities).
Warning
none.
size_t Bial::Signal::MinimumFrequencyBin ( size_t  min_bin = 0) const

Returns the bin of the minimum frequency contained in bins from min_bin to the last bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
Returns
The bin of the minimum frequency contained in bins from min_bin to the last bin (including the extremities).
Warning
none.
size_t Bial::Signal::MinimumFrequencyBin ( size_t  min_bin,
size_t  max_bin 
) const

Returns the bin of the minimum frequency contained in bins from min_bin to max_bin (including the extremities).

Date
2012/Sep/13
Parameters
min_binleft most bin.
max_binright most bin.
Returns
The bin of the minimum frequency contained in bins from min_bin to max_bin (including the extremities).
Warning
none.
Signal& Bial::Signal::operator= ( const Signal other)

Assigns 'other'signal to this signal.

Date
2015/May/08
Parameters
otherSignal to be assigned to this.
Returns
none.
Warning
none.
Signal& Bial::Signal::operator= ( Signal &&  )
default

Assigns 'other'signal to this signal, moving the content.

Date
2015/May/08
Parameters
otherSignal to be assigned to this.
Returns
none.
Warning
none.
const double& Bial::Signal::operator[] ( size_t  bin) const

Returns frequency at bin 'bin'.

Date
2012/Sep/13
Parameters
binBin to be acessed.
Returns
Frequency at bin 'bin'.
Warning
Signal bounds are not verified.
double& Bial::Signal::operator[] ( size_t  p)

Returns a reference to bin 'bin'.

Date
2012/Sep/13
Parameters
binBin to be acessed.
Returns
Reference to bin 'bin'.
Warning
Signal bounds are not verified. Minimum sampling frequency is NOT automatically updated.
Signal range does NOT increase automatically either.
template<class O >
void Bial::Signal::Print ( O &  os) const

Prints signal containts to output stream os. It prints a pair composed by frequency and value per line.

Date
2012/Sep/14
Parameters
osan output stream.
Returns
none.
Warning
none.
size_t Bial::Signal::Size ( ) const

Returns the number of bins.

Date
2012/Sep/13
Parameters
none.
Returns
The number of bins.
Warning
none.
size_t Bial::Signal::size ( ) const

Returns the number of bins.

Date
2013/Oct/04
Parameters
none.
Returns
The number of bins.
Warning
none.

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