Utility class for efficiently resampling discrete datasets to different resolutions.
More...
#include <mitsuba/core/rfilter.h>
|
| Resampler (const ReconstructionFilter *rfilter, ReconstructionFilter::EBoundaryCondition bc, int sourceRes, int targetRes) |
| Create a new Resampler object that transforms between the specified resolutions. More...
|
|
| ~Resampler () |
| Release all memory. More...
|
|
void | resampleAndClamp (const Scalar *source, size_t sourceStride, Scalar *target, size_t targetStride, int channels, Scalar min=(Scalar) 0, Scalar max=(Scalar) 1) |
| Resample a multi-channel array and clamp the results to a specified valid range. More...
|
|
void | resample (const Scalar *source, size_t sourceStride, Scalar *target, size_t targetStride, int channels) |
| Resample a multi-channel array. More...
|
|
template<typename Scalar>
struct mitsuba::Resampler< Scalar >
Utility class for efficiently resampling discrete datasets to different resolutions.
- Template Parameters
-
Scalar | Denotes the underlying floating point data type (i.e. half , float , or double ) |
template<typename Scalar >
Create a new Resampler object that transforms between the specified resolutions.
This constructor precomputes all information needed to efficiently perform the desired resampling operation. For that reason, it is most efficient if it can be used over and over again (e.g. to resample the equal-sized rows of a bitmap)
- Parameters
-
sourceRes | Source resolution |
targetRes | Desired target resolution |
bc | Boundary conditions that should be observed when looking up samples outside of the defined input domain. |
template<typename Scalar >
template<typename Scalar >
void mitsuba::Resampler< Scalar >::resample |
( |
const Scalar * |
source, |
|
|
size_t |
sourceStride, |
|
|
Scalar * |
target, |
|
|
size_t |
targetStride, |
|
|
int |
channels |
|
) |
| |
|
inline |
Resample a multi-channel array.
- Parameters
-
source | Source array of samples |
target | Target array of samples |
sourceStride | Stride of samples in the source array. A value of '1' implies that they are densely packed. |
targetStride | Stride of samples in the source array. A value of '1' implies that they are densely packed. |
channels | Number of channels to be resampled |
template<typename Scalar >
void mitsuba::Resampler< Scalar >::resampleAndClamp |
( |
const Scalar * |
source, |
|
|
size_t |
sourceStride, |
|
|
Scalar * |
target, |
|
|
size_t |
targetStride, |
|
|
int |
channels, |
|
|
Scalar |
min = (Scalar) 0 , |
|
|
Scalar |
max = (Scalar) 1 |
|
) |
| |
|
inline |
Resample a multi-channel array and clamp the results to a specified valid range.
This function is preferred if too large positive/negative values due to ringing are unacceptable.
- Parameters
-
source | Source array of samples |
target | Target array of samples |
sourceStride | Stride of samples in the source array. A value of '1' implies that they are densely packed. |
targetStride | Stride of samples in the source array. A value of '1' implies that they are densely packed. |
channels | Number of channels to be resampled |
min | Minumum sample value after resampling |
max | Maximum sample value after resampling |
The documentation for this struct was generated from the following file: