OpenMS
ChromatogramPeak Class Reference

A 1-dimensional raw data point or peak for chromatograms. More...

#include <OpenMS/KERNEL/ChromatogramPeak.h>

Collaboration diagram for ChromatogramPeak:
[legend]

Classes

struct  IntensityLess
 Comparator by intensity. More...
 
struct  PositionLess
 Comparator by position. As this class has dimension 1, this is basically an alias for RTLess. More...
 
struct  RTLess
 Comparator by RT position. More...
 

Public Types

Type definitions
enum  { DIMENSION = 1 }
 Dimension. More...
 
typedef double IntensityType
 Intensity type. More...
 
typedef DPosition< 1 > PositionType
 Position type. More...
 
typedef double CoordinateType
 Coordinate type. More...
 

Public Member Functions

Constructors and Destructor
 ChromatogramPeak ()
 Default constructor. More...
 
 ChromatogramPeak (const ChromatogramPeak &p)
 Copy constructor. More...
 
 ChromatogramPeak (const PositionType retention_time, const IntensityType intensity)
 Constructor with position and intensity. More...
 
 ~ChromatogramPeak ()
 Destructor. More...
 
Accessors
IntensityType getIntensity () const
 Non-mutable access to the data point intensity (height) More...
 
void setIntensity (IntensityType intensity)
 Mutable access to the data point intensity (height) More...
 
CoordinateType getRT () const
 Non-mutable access to RT. More...
 
void setRT (CoordinateType rt)
 Mutable access to RT. More...
 
CoordinateType getPos () const
 Alias for getRT() More...
 
void setPos (CoordinateType pos)
 Alias for setRT() More...
 
PositionType const & getPosition () const
 Non-mutable access to the position. More...
 
PositionTypegetPosition ()
 Mutable access to the position. More...
 
void setPosition (PositionType const &position)
 Mutable access to the position. More...
 
ChromatogramPeakoperator= (const ChromatogramPeak &rhs)
 Assignment operator. More...
 
bool operator== (const ChromatogramPeak &rhs) const
 Equality operator. More...
 
bool operator!= (const ChromatogramPeak &rhs) const
 Equality operator. More...
 

Protected Attributes

Comparator classes.

These classes implement binary predicates that can be used to compare two peaks with respect to their intensities, positions.

PositionType position_
 The data point position. More...
 
IntensityType intensity_
 The data point intensity. More...
 

Detailed Description

A 1-dimensional raw data point or peak for chromatograms.

This datastructure is intended for chromatograms.

Member Typedef Documentation

◆ CoordinateType

typedef double CoordinateType

Coordinate type.

◆ IntensityType

typedef double IntensityType

Intensity type.

◆ PositionType

typedef DPosition<1> PositionType

Position type.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Dimension.

Enumerator
DIMENSION 

Constructor & Destructor Documentation

◆ ChromatogramPeak() [1/3]

ChromatogramPeak ( )
inline

Default constructor.

◆ ChromatogramPeak() [2/3]

ChromatogramPeak ( const ChromatogramPeak p)
inline

Copy constructor.

◆ ChromatogramPeak() [3/3]

ChromatogramPeak ( const PositionType  retention_time,
const IntensityType  intensity 
)
inline

Constructor with position and intensity.

◆ ~ChromatogramPeak()

~ChromatogramPeak ( )
inline

Destructor.

Note
The destructor is non-virtual although many classes are derived from ChromatogramPeak. This is intentional, since otherwise we would "waste" space for a vtable pointer in each instance. Normally you should not derive other classes from ChromatogramPeak (unless you know what you are doing, of course).

Member Function Documentation

◆ getIntensity()

IntensityType getIntensity ( ) const
inline

Non-mutable access to the data point intensity (height)

Referenced by DimINT::map(), and ChromatogramPeak::IntensityLess::operator()().

◆ getPos()

CoordinateType getPos ( ) const
inline

◆ getPosition() [1/2]

PositionType& getPosition ( )
inline

Mutable access to the position.

◆ getPosition() [2/2]

PositionType const& getPosition ( ) const
inline

Non-mutable access to the position.

Referenced by ChromatogramPeak::PositionLess::operator()().

◆ getRT()

CoordinateType getRT ( ) const
inline

Non-mutable access to RT.

Referenced by DimRT::map(), and ChromatogramPeak::RTLess::operator()().

◆ operator!=()

bool operator!= ( const ChromatogramPeak rhs) const
inline

Equality operator.

References OpenMS::Internal::operator==().

◆ operator=()

ChromatogramPeak& operator= ( const ChromatogramPeak rhs)
inline

Assignment operator.

References ChromatogramPeak::intensity_, and ChromatogramPeak::position_.

◆ operator==()

bool operator== ( const ChromatogramPeak rhs) const
inline

Equality operator.

References ChromatogramPeak::intensity_, and ChromatogramPeak::position_.

◆ setIntensity()

void setIntensity ( IntensityType  intensity)
inline

Mutable access to the data point intensity (height)

Referenced by ChromatogramTools::convertSpectraToChromatograms(), and DimINT::fromXY().

◆ setPos()

void setPos ( CoordinateType  pos)
inline

Alias for setRT()

◆ setPosition()

void setPosition ( PositionType const &  position)
inline

Mutable access to the position.

◆ setRT()

void setRT ( CoordinateType  rt)
inline

Mutable access to RT.

Referenced by ChromatogramTools::convertSpectraToChromatograms(), and DimRT::fromXY().

Member Data Documentation

◆ intensity_

IntensityType intensity_
protected

The data point intensity.

Referenced by ChromatogramPeak::operator=(), and ChromatogramPeak::operator==().

◆ position_

PositionType position_
protected

The data point position.

Referenced by ChromatogramPeak::operator=(), and ChromatogramPeak::operator==().