OpenMS
LayerStoreDataPeakMapVisible Class Reference

Visitor which can save a visible piece of data; subsequently the data can be stored to a file. More...

#include <OpenMS/VISUAL/VISITORS/LayerStoreData.h>

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

Public Member Functions

 LayerStoreDataPeakMapVisible ()
 
void saveToFile (const String &filename, const ProgressLogger::LogType lt) const override
 
void storeVisibleSpectrum (const MSSpectrum &spec, const RangeAllType &visible_range, const DataFilters &layer_filters)
 Stores data from a 1D canvas and remembers the data internally. More...
 
void storeVisibleChromatogram (const MSChromatogram &chrom, const RangeAllType &visible_range, const DataFilters &layer_filters)
 Stores data from a 1D canvas and remembers the data internally. More...
 
void storeVisibleExperiment (const PeakMap &exp, const RangeAllType &visible_range, const DataFilters &layer_filters)
 analog to storeVisibleSpectrum() More...
 
- Public Member Functions inherited from LayerStoreData
 LayerStoreData (FileTypeList supported_storage_formats)
 
virtual ~LayerStoreData ()=default
 virtual D'tor for proper cleanup of derived classes' members More...
 
FileTypeList getSupportedFileFormats () const
 Which formats are supported when writing the file? More...
 

Private Attributes

PeakMap pm_
 the filtered data; used when saveToFile() is called More...
 

Additional Inherited Members

- Protected Member Functions inherited from LayerStoreData
FileTypes::Type getSupportedExtension_ (const String &filename) const
 extracts the supported extension (converting UNKNOWN to first item in storage_formats_) or throws an Exception::UnableToCreateFile More...
 
- Protected Attributes inherited from LayerStoreData
FileTypeList storage_formats_
 file formats which can hold the data from the layer; The first item should be the preferred/default format More...
 

Detailed Description

Visitor which can save a visible piece of data; subsequently the data can be stored to a file.

Constructor & Destructor Documentation

◆ LayerStoreDataPeakMapVisible()

Member Function Documentation

◆ saveToFile()

void saveToFile ( const String filename,
const ProgressLogger::LogType  lt 
) const
overridevirtual

Save the internal data to a file. The filename's suffix determines the file format. It must be one of getSupportedFileFormats() or UNKNOWN. If the filename's suffix is unknown, the first item from getSupportedFileFormats() determines the storage format.

Parameters
filenameA relative or absolute path+filename. Its suffix determines the format.
ltShow a progress bar in the GUI?
Exceptions
Exception::UnableToCreateFileif the extension of filename is neither in getSupportedFileFormats() nor UNKNOWN.

Implements LayerStoreData.

◆ storeVisibleChromatogram()

void storeVisibleChromatogram ( const MSChromatogram chrom,
const RangeAllType visible_range,
const DataFilters layer_filters 
)

Stores data from a 1D canvas and remembers the data internally.

Parameters
chromThe chromatogram to store
visible_rangeRestricts RT (and intensity)
layer_filtersRemove all peaks not passing this filter

◆ storeVisibleExperiment()

void storeVisibleExperiment ( const PeakMap exp,
const RangeAllType visible_range,
const DataFilters layer_filters 
)

◆ storeVisibleSpectrum()

void storeVisibleSpectrum ( const MSSpectrum spec,
const RangeAllType visible_range,
const DataFilters layer_filters 
)

Stores data from a 1D canvas and remembers the data internally.

Parameters
specThe spectrum to store
visible_rangeRestricts m/z (and intensity)
layer_filtersRemove all peaks not passing this filter

Member Data Documentation

◆ pm_

PeakMap pm_
private

the filtered data; used when saveToFile() is called