Shared linear resampling implementation without parameter or progress handling.
More...
#include <OpenMS/MATH/MISC/LinearResampling.h>
|
| | LinearResampling (double spacing, bool ppm=false) |
| | Construct a resampler with explicit spacing and units.
|
| |
| template<class PeakContainerT > |
| void | raster (PeakContainerT &container) |
| | Resample a peak container onto a grid spanning its first and last points.
|
| |
| template<typename PeakTypeIterator , typename ConstPeakTypeIterator > |
| void | raster (ConstPeakTypeIterator raw_it, ConstPeakTypeIterator raw_end, PeakTypeIterator resampled_begin, PeakTypeIterator resampled_end) |
| | Distribute input intensities onto an existing output grid.
|
| |
| template<typename PeakType > |
| void | populateRaster (std::vector< PeakType > &resampled_peak_container, double start_pos, double end_pos, int number_resampled_points) |
| | Populate an absolute or ppm grid using the existing endpoint convention.
|
| |
| template<typename PeakTypeIterator > |
| void | verifySpacing (PeakTypeIterator it, PeakTypeIterator end, auto access) |
| | Emit the existing spacing warning for absolute grids when enabled.
|
| |
Shared linear resampling implementation without parameter or progress handling.
Used by MSExperiment::calculateTIC() and LinearResamplerAlign. The latter retains the parameter interface and experiment-wide processing API.
◆ LinearResampling()
Construct a resampler with explicit spacing and units.
- Parameters
-
| [in] | spacing | Spacing of output points. |
| [in] | ppm | Whether spacing is relative (ppm) instead of absolute. |
◆ populateRaster()
| void populateRaster |
( |
std::vector< PeakType > & |
resampled_peak_container, |
|
|
double |
start_pos, |
|
|
double |
end_pos, |
|
|
int |
number_resampled_points |
|
) |
| |
|
inline |
Populate an absolute or ppm grid using the existing endpoint convention.
- Parameters
-
| [in,out] | resampled_peak_container | Output grid. |
| [in] | start_pos | First grid position. |
| [in] | end_pos | End position for ppm grids. |
| [in] | number_resampled_points | Number of points for absolute grids. |
References Peak2D::setIntensity().
Referenced by LinearResamplerAlign::populate_raster_().
◆ raster() [1/2]
template<typename PeakTypeIterator , typename ConstPeakTypeIterator >
| void raster |
( |
ConstPeakTypeIterator |
raw_it, |
|
|
ConstPeakTypeIterator |
raw_end, |
|
|
PeakTypeIterator |
resampled_begin, |
|
|
PeakTypeIterator |
resampled_end |
|
) |
| |
|
inline |
Distribute input intensities onto an existing output grid.
Intensities outside the grid accumulate at its endpoints. Existing output intensities are retained and incremented.
- Parameters
-
| [in] | raw_it | Start of the input range. |
| [in] | raw_end | End of the input range. |
| [in,out] | resampled_begin | Start of the nonempty output grid. |
| [in,out] | resampled_end | End of the output grid. |
References OPENMS_PRECONDITION.
◆ raster() [2/2]
template<class PeakContainerT >
| void raster |
( |
PeakContainerT & |
container | ) |
|
|
inline |
◆ verifySpacing()
template<typename PeakTypeIterator >
| void verifySpacing |
( |
PeakTypeIterator |
it, |
|
|
PeakTypeIterator |
end, |
|
|
auto |
access |
|
) |
| |
|
inline |
◆ ppm_
◆ spacing_