TuttleOFX  1
terry::sampler::bc_sampler Struct Reference

#include <bc.hpp>

Inheritance diagram for terry::sampler::bc_sampler:

Public Member Functions

 bc_sampler ()
 bc_sampler (RESAMPLING_CORE_TYPE valB, RESAMPLING_CORE_TYPE valC)
template<typename Weight >
void operator() (const RESAMPLING_CORE_TYPE &distance, Weight &weight)
 Get weight for a specific distance, for all BC-cubic resampling (bicubic, catmul-rom, ...).

Data Fields

const size_t _windowSize
const RESAMPLING_CORE_TYPE _valB
const RESAMPLING_CORE_TYPE _valC

Detailed Description

Definition at line 10 of file bc.hpp.


Constructor & Destructor Documentation

terry::sampler::bc_sampler::bc_sampler ( ) [inline]

Definition at line 16 of file bc.hpp.

terry::sampler::bc_sampler::bc_sampler ( RESAMPLING_CORE_TYPE  valB,
RESAMPLING_CORE_TYPE  valC 
) [inline]

Definition at line 23 of file bc.hpp.


Member Function Documentation

template<typename Weight >
void terry::sampler::bc_sampler::operator() ( const RESAMPLING_CORE_TYPE &  distance,
Weight &  weight 
) [inline]

Get weight for a specific distance, for all BC-cubic resampling (bicubic, catmul-rom, ...).

For compute cubic BC resampler weights, we use these functions [ Reconstruction Filters in Computer Graphics, Don P. Mitchell, Arun N. Netravali, Computer Graphics - volume 22 number 4 - August 1988 online paper ]:

\[ W(x) = \begin{cases} (a+2)|x|^3-(a+3)|x|^2+1 & \text{for } |x| \leq 1 \\ a|x|^3-5a|x|^2+8a|x|-4a & \text{for } 1 < |x| < 2 \\ 0 & \text{otherwise} \end{cases} \]

Parameters:
[in]Bvalue of B in BC-cubic resampling function
[in]Cvalue of C in BC-cubic resampling function
[in]distancebetween the pixels and the current pixel
[out]weightreturn value to weight the pixel in filtering

Definition at line 53 of file bc.hpp.

References RESAMPLING_CORE_TYPE.


Field Documentation

const RESAMPLING_CORE_TYPE terry::sampler::bc_sampler::_valB

Definition at line 13 of file bc.hpp.

const RESAMPLING_CORE_TYPE terry::sampler::bc_sampler::_valC

Definition at line 14 of file bc.hpp.

Definition at line 12 of file bc.hpp.


The documentation for this struct was generated from the following file: