OpenMS
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DimINT Class Referencefinal

Dimension implementation for intensity values. More...

#include <OpenMS/KERNEL/DimMapper.h>

Inheritance diagram for DimINT:
[legend]
Collaboration diagram for DimINT:
[legend]

Public Member Functions

 DimINT ()
 
std::unique_ptr< DimBaseclone () const override
 Copy derived objects to avoid slicing when dealing with pointers to DimBase. More...
 
ValueType map (const Peak1D &p) const override
 
ValueType map (const Peak2D &p) const override
 
ValueType map (const ChromatogramPeak &p) const override
 
ValueType map (const MSExperiment::ConstAreaIterator &it) const override
 
ValueType map (const MobilityPeak1D &p) const override
 
ValueType map (const MobilityPeak2D &p) const override
 
ValueType map (const MSSpectrum &spec, const Size index) const override
 obtain value from a certain point in a spectrum More...
 
ValueType map (const MSChromatogram &chrom, const Size index) const override
 obtain value from a certain point in a chromatogram More...
 
ValueType map (const Mobilogram &mb, const Size index) const override
 obtain value from a certain point in a mobilogram More...
 
ValueTypes map (const MSSpectrum &spec) const override
 
ValueTypes map (const MSChromatogram &chrom) const override
 
ValueType map (const BaseFeature &bf) const override
 
ValueType map (const PeptideIdentification &) const override
 
RangeBase map (const RangeAllType &rm) const override
 Return the min/max (range) for a certain dimension. More...
 
RangeBasemap (RangeAllType &rm) const override
 Return the min/max (range) for a certain dimension (i.e. a reference to the base class of rm) More...
 
void setRange (const RangeBase &in, RangeAllType &out) const override
 Set the min/max (range) in out for a certain dimension. More...
 
void fromXY (const ValueType in, Peak1D &p) const override
 set the intensity of a Peak1D More...
 
void fromXY (const ValueType in, ChromatogramPeak &p) const override
 set the intensity of a ChromatogramPeak More...
 
void fromXY (const ValueType in, MobilityPeak1D &p) const override
 set the intensity of a MobilityPeak1D More...
 
void fromXY (const ValueType in, MobilityPeak2D &p) const override
 set the intensity of a MobilityPeak2D More...
 
- Public Member Functions inherited from DimBase
 DimBase ()=delete
 No default c'tor. More...
 
 DimBase (DIM_UNIT unit)
 Custom c'tor with unit. More...
 
DimBaseoperator= (const DimBase &rhs)=default
 Assignment operator. More...
 
virtual ~DimBase () noexcept=default
 D'tor (needs to be virtual; we are holding pointers to base in DimMapper) More...
 
bool operator== (const DimBase &rhs) const
 Equality. More...
 
std::string_view getDimName () const
 Name of the dimension, e.g. 'RT [s]'. More...
 
std::string_view getDimNameShort () const
 Name of the dimension, e.g. 'RT'. More...
 
DIM_UNIT getUnit () const
 The unit of the dimension. More...
 
String formattedValue (const ValueType value) const
 Creates a short string representation with "UNIT: value", where value has a predefined precision (see valuePrecision()) More...
 
String formattedValue (ValueType value, const String &prefix) const
 like formattedValue() but with a custom unit prefix instead of the default one for the dim, e.g. "myText: 45.32" More...
 
int valuePrecision () const
 return the recommended precision for the current unit (2 digits for RT, 8 for m/z, etc) More...
 

Additional Inherited Members

- Public Types inherited from DimBase
using ValueType = double
 
using ValueTypes = std::vector< ValueType >
 
- Protected Attributes inherited from DimBase
DIM_UNIT unit_
 the unit of this dimension
More...
 

Detailed Description

Dimension implementation for intensity values.

This class implements the DimBase interface for the intensity dimension. It provides methods to access intensity values from various data structures and convert between intensity values and generic dimension values.

See also
DimBase

Constructor & Destructor Documentation

◆ DimINT()

DimINT ( )
inline

References OpenMS::INT.

Member Function Documentation

◆ clone()

std::unique_ptr<DimBase> clone ( ) const
inlineoverridevirtual

Copy derived objects to avoid slicing when dealing with pointers to DimBase.

Implements DimBase.

◆ fromXY() [1/4]

void fromXY ( const ValueType  in,
ChromatogramPeak p 
) const
inlineoverridevirtual

set the intensity of a ChromatogramPeak

Implements DimBase.

References ChromatogramPeak::setIntensity().

◆ fromXY() [2/4]

void fromXY ( const ValueType  in,
MobilityPeak1D p 
) const
inlineoverridevirtual

set the intensity of a MobilityPeak1D

Implements DimBase.

References MobilityPeak1D::setIntensity().

◆ fromXY() [3/4]

void fromXY ( const ValueType  in,
MobilityPeak2D p 
) const
inlineoverridevirtual

set the intensity of a MobilityPeak2D

Implements DimBase.

References MobilityPeak2D::setIntensity().

◆ fromXY() [4/4]

void fromXY ( const ValueType  in,
Peak1D p 
) const
inlineoverridevirtual

set the intensity of a Peak1D

Implements DimBase.

References Peak1D::setIntensity().

◆ map() [1/15]

ValueType map ( const BaseFeature bf) const
inlineoverridevirtual

Implements DimBase.

References Peak2D::getIntensity().

◆ map() [2/15]

ValueType map ( const ChromatogramPeak p) const
inlineoverridevirtual

Implements DimBase.

References ChromatogramPeak::getIntensity().

◆ map() [3/15]

ValueType map ( const MobilityPeak1D p) const
inlineoverridevirtual

Implements DimBase.

References MobilityPeak1D::getIntensity().

◆ map() [4/15]

ValueType map ( const MobilityPeak2D p) const
inlineoverridevirtual

Implements DimBase.

References MobilityPeak2D::getIntensity().

◆ map() [5/15]

ValueType map ( const Mobilogram mb,
const Size  index 
) const
inlineoverridevirtual

obtain value from a certain point in a mobilogram

Implements DimBase.

◆ map() [6/15]

ValueTypes map ( const MSChromatogram chrom) const
inlineoverridevirtual

obtain vector of same length as spec; one element per peak

Exceptions
Exception::InvalidRangeif elements do not support the dimension

Implements DimBase.

◆ map() [7/15]

ValueType map ( const MSChromatogram chrom,
const Size  index 
) const
inlineoverridevirtual

obtain value from a certain point in a chromatogram

Implements DimBase.

◆ map() [8/15]

ValueType map ( const MSExperiment::ConstAreaIterator it) const
inlineoverridevirtual

Implements DimBase.

◆ map() [9/15]

ValueTypes map ( const MSSpectrum spec) const
inlineoverridevirtual

obtain vector of same length as spec; one element per peak

Exceptions
Exception::InvalidRangeif elements do not support the dimension

Implements DimBase.

◆ map() [10/15]

ValueType map ( const MSSpectrum spec,
const Size  index 
) const
inlineoverridevirtual

obtain value from a certain point in a spectrum

Implements DimBase.

◆ map() [11/15]

ValueType map ( const Peak1D p) const
inlineoverridevirtual

Implements DimBase.

References Peak1D::getIntensity().

◆ map() [12/15]

ValueType map ( const Peak2D p) const
inlineoverridevirtual

Implements DimBase.

References Peak2D::getIntensity().

◆ map() [13/15]

ValueType map ( const PeptideIdentification ) const
inlineoverridevirtual

Implements DimBase.

◆ map() [14/15]

RangeBase map ( const RangeAllType rm) const
inlineoverridevirtual

Return the min/max (range) for a certain dimension.

Implements DimBase.

References RangeManager< RangeBases >::getRangeForDim(), and OpenMS::INT.

◆ map() [15/15]

RangeBase& map ( RangeAllType rm) const
inlineoverridevirtual

Return the min/max (range) for a certain dimension (i.e. a reference to the base class of rm)

Implements DimBase.

References RangeManager< RangeBases >::getRangeForDim(), and OpenMS::INT.

◆ setRange()

void setRange ( const RangeBase in,
RangeAllType out 
) const
inlineoverridevirtual

Set the min/max (range) in out for a certain dimension.

Implements DimBase.