![]() |
OpenMS
|
Advanced range manager for MS spectra with separate ranges for each MS level. More...
#include <OpenMS/KERNEL/SpectrumRangeManager.h>
Public Types | |
using | BaseType = RangeManager< RangeMZ, RangeIntensity, RangeMobility, RangeRT > |
Base type. More... | |
![]() | |
using | ThisRangeType = RangeManager< RangeBases... > |
Public Member Functions | |
SpectrumRangeManager ()=default | |
Default constructor. More... | |
SpectrumRangeManager (const SpectrumRangeManager &source)=default | |
Copy constructor. More... | |
SpectrumRangeManager (SpectrumRangeManager &&source)=default | |
Move constructor. More... | |
SpectrumRangeManager & | operator= (const SpectrumRangeManager &source)=default |
Assignment operator. More... | |
SpectrumRangeManager & | operator= (SpectrumRangeManager &&source)=default |
Move assignment operator. More... | |
~SpectrumRangeManager ()=default | |
Destructor. More... | |
void | clearRanges () |
Clears all ranges (global and MS level-specific) More... | |
void | extend (const BaseType &other, UInt ms_level=0) |
Extends the ranges with the ranges of another range manager. More... | |
const BaseType & | byMSLevel (UInt ms_level=0) const |
Gets the ranges for a specific MS level. More... | |
std::set< UInt > | getMSLevels () const |
Gets all MS levels for which specific ranges exist. More... | |
void | extendRT (double rt, UInt ms_level=0) |
Extends the RT range with an MS level parameter. More... | |
void | extendMZ (double mz, UInt ms_level=0) |
Extends the m/z range with an MS level parameter. More... | |
void | extendUnsafe (const MSSpectrum &spectrum, UInt ms_level=0) |
Extends the ranges with the ranges of a spectrum using an MS level parameter. More... | |
![]() | |
bool | operator== (const RangeManager &rhs) const |
bool | operator!= (const RangeManager &rhs) const |
bool | assignUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
auto & | assign (const RangeManager< RangeBasesOther... > &rhs) |
bool | extendUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
void | extend (const RangeManager< RangeBasesOther... > &rhs) |
void | scaleBy (const double factor) |
calls RangeBase::scale() for each dimension More... | |
void | minSpanIfSingular (const double min_span) |
If any dimension is a single point, e.g. min==max, then extend this dimension by min_span / 2 on either side. More... | |
bool | pushIntoUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
void | pushInto (const RangeManager< RangeBasesOther... > &sandbox) |
bool | clampToUnsafe (const RangeManager< RangeBasesOther... > &rhs) |
void | clampTo (const RangeManager< RangeBasesOther... > &rhs) |
const RangeBase & | getRangeForDim (MSDim dim) const |
obtain a range dimension at runtime using dim More... | |
RangeBase & | getRangeForDim (MSDim dim) |
obtain a range dimension at runtime using dim More... | |
HasRangeType | hasRange () const |
is any/some/all dimension in this range populated? More... | |
bool | containsAll (const RangeManager< RangeBasesOther... > &rhs) const |
void | clearRanges () |
Resets all ranges. More... | |
ThisRangeType & | clear (const DIM_UNIT range) |
void | printRange (std::ostream &out) const |
print each dimension (base classes) to a stream More... | |
Protected Attributes | |
std::map< UInt, BaseType > | ms_level_ranges_ |
MS level-specific ranges. More... | |
Additional Inherited Members | |
![]() | |
void | for_each_base_ (Visitor &&visitor) |
use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one More... | |
void | for_each_base_ (Visitor &&visitor) const |
.. and a const version More... | |
![]() | |
static void | static_for_each_base_ (Visitor &&visitor) |
use fold expression to iterate over all RangeBases of RangeManager and apply a lambda (Visitor) for each one (for static members) More... | |
Advanced range manager for MS spectra with separate ranges for each MS level.
This class extends the basic RangeManager to provide separate range tracking for different MS levels (MS1, MS2, etc.). It manages four types of ranges:
A global range is tracked for all MS levels, and additional ranges are maintained for each specific MS level. This allows for efficient querying of ranges for specific MS levels, which is useful for visualization, filtering, and processing operations that need to work with specific MS levels.
The class inherits from RangeManager and adds MS level-specific functionality. The base RangeManager functionality is used for the global ranges, while a map of MS levels to RangeManagers is used for the MS level-specific ranges.
using BaseType = RangeManager<RangeMZ, RangeIntensity, RangeMobility, RangeRT> |
Base type.
|
default |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
default |
Destructor.
Gets the ranges for a specific MS level.
ms_level | The MS level for which to retrieve the ranges |
Exception::InvalidValue | if no ranges exist for the specified MS level |
|
inline |
Clears all ranges (global and MS level-specific)
Extends the ranges with the ranges of another range manager.
other | The other range manager to extend from |
ms_level | The MS level for which to extend the ranges (0 for global ranges) |
|
inline |
Extends the m/z range with an MS level parameter.
mz | The m/z value to extend with |
ms_level | The MS level for which to extend the m/z range (0 for global range) |
|
inline |
Extends the RT range with an MS level parameter.
rt | The RT value to extend with |
ms_level | The MS level for which to extend the RT range (0 for global range) |
|
inline |
Extends the ranges with the ranges of a spectrum using an MS level parameter.
spectrum | The spectrum whose ranges to extend from |
ms_level | The MS level for which to extend the ranges (0 for global ranges) |
References RangeManagerContainer< RangeBases >::getRange().
|
inline |
Gets all MS levels for which specific ranges exist.
|
default |
Assignment operator.
|
default |
Move assignment operator.