![]() |
aimsalgo
5.0.5
Neuroimaging image processing
|
Class excuting a spline-based subsampling. More...
#include <aims/pyramid/splinesubsampler.h>
Public Member Functions | |
DirectBSplineSubSampler (unsigned factor=2, bool normalize=false, unsigned spline_order=3) | |
Constructor / Copy. More... | |
DirectBSplineSubSampler (const Point4du &factor, bool normalize=false, unsigned spline_order=3) | |
DirectBSplineSubSampler (const DirectBSplineSubSampler &other) | |
virtual | ~DirectBSplineSubSampler () |
DirectBSplineSubSampler & | operator= (const DirectBSplineSubSampler &other) |
unsigned | order () const |
Parameters. More... | |
bool | normalize () const |
Get normalization mode. More... | |
void | setOrder (unsigned n) |
Set spline order Updates underlying basis functions. More... | |
void | setFactor (unsigned r) |
Override ConclutionSubSampler version to update the underlying basis functions. More... | |
void | setFactor (const Point4du &r) |
Override ConclutionSubSampler version to update the underlying basis functions. More... | |
void | setNormalize (bool normalize=true) |
Set normalization mode. More... | |
template<typename OUT , typename IN > | |
carto::VolumeRef< OUT > | execute (const carto::VolumeRef< IN > &in, carto::VolumeRef< OUT > &out) const |
Execution. More... | |
![]() | |
ConvolutionSubSampler (unsigned r=2) | |
Constructor / Destructor / Copy. More... | |
ConvolutionSubSampler (const Point4du &r) | |
ConvolutionSubSampler (const DiscreteBSpline &bfunc, unsigned r) | |
ConvolutionSubSampler (const std::vector< DiscreteBSpline > &bfunc=std::vector< DiscreteBSpline >(), const Point4du &r=Point4du(2, 2, 2, 2)) | |
ConvolutionSubSampler (const ConvolutionSubSampler &other) | |
virtual | ~ConvolutionSubSampler () |
ConvolutionSubSampler & | operator= (const ConvolutionSubSampler &other) |
carto::VolumeRef< OUT > | execute (const carto::VolumeRef< IN > &in) const |
Execution. More... | |
carto::VolumeRef< OUT > | execute (const carto::VolumeRef< IN > &in, carto::VolumeRef< OUT > &out) const |
Write result in an existing volume. More... | |
const std::vector< bool > & | directions () const |
Parameters. More... | |
const Point4du & | factor () const |
void | setBasisFunction (const DiscreteBSpline &func) |
void | setBasisFunction (const std::vector< DiscreteBSpline > &func) |
void | setFactor (unsigned r) |
void | setFactor (const Point4du &r) |
void | setDirections (const std::vector< bool > &dir) |
void | setDirections (bool dirx, bool diry, bool dirz, bool dirt) |
void | setVerbose (int verbose=1) |
void | setQuiet () |
Protected Member Functions | |
void | setFunctions (const Point4du &r, unsigned n) |
Protected Attributes | |
bool | _normalize |
![]() | |
std::vector< DiscreteBSpline > | _func |
int | _verbose |
std::vector< bool > | _dir |
Point4du | _factor |
Class excuting a spline-based subsampling.
The behaviour is equivalent to:
Note that in the case of R = 1, the output image will differ from the input image. The behaviour is thus different from a classical "binning" subsampling.
By default, the kernel is normalized (it sums to 1). Normalization can be deactivated. When using spline subsampling in the frame of least square approximation, normalization should be deactivated. (see LeastSquareSpline)
Definition at line 70 of file splinesubsampler.h.
aims::DirectBSplineSubSampler::DirectBSplineSubSampler | ( | unsigned | factor = 2 , |
bool | normalize = false , |
||
unsigned | spline_order = 3 |
||
) |
aims::DirectBSplineSubSampler::DirectBSplineSubSampler | ( | const Point4du & | factor, |
bool | normalize = false , |
||
unsigned | spline_order = 3 |
||
) |
Definition at line 66 of file splinesubsampler_d.h.
References setFunctions().
aims::DirectBSplineSubSampler::DirectBSplineSubSampler | ( | const DirectBSplineSubSampler & | other | ) |
Definition at line 78 of file splinesubsampler_d.h.
|
virtual |
Definition at line 75 of file splinesubsampler_d.h.
carto::VolumeRef< OUT > aims::DirectBSplineSubSampler::execute | ( | const carto::VolumeRef< IN > & | in, |
carto::VolumeRef< OUT > & | out | ||
) | const |
Execution.
Function-like operator that filters a given volume
Write result in an existing volume. If the allocated size differs from the needed resulting size, the volume is reallocated.
DirectBSplineSubSampler overrides the inherited version to add normalization.
Definition at line 157 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< DiscreteBSpline >::_dir, aims::ConvolutionSubSampler< DiscreteBSpline >::_func, aims::ConvolutionSubSampler< BasisFunction >::execute(), and carto::VolumeRef< T >::getSize().
bool aims::DirectBSplineSubSampler::normalize | ( | ) | const |
Get normalization mode.
Definition at line 103 of file splinesubsampler_d.h.
References _normalize.
Referenced by setNormalize().
DirectBSplineSubSampler & aims::DirectBSplineSubSampler::operator= | ( | const DirectBSplineSubSampler & | other | ) |
Definition at line 84 of file splinesubsampler_d.h.
References _normalize, and aims::ConvolutionSubSampler< BasisFunction >::operator=().
unsigned aims::DirectBSplineSubSampler::order | ( | ) | const |
Parameters.
Get spline order
Definition at line 98 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< DiscreteBSpline >::_func.
void aims::DirectBSplineSubSampler::setFactor | ( | unsigned | r | ) |
Override ConclutionSubSampler version to update the underlying basis functions.
Definition at line 120 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< DiscreteBSpline >::_func, and aims::ConvolutionSubSampler< BasisFunction >::setFactor().
void aims::DirectBSplineSubSampler::setFactor | ( | const Point4du & | r | ) |
Override ConclutionSubSampler version to update the underlying basis functions.
Definition at line 128 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< DiscreteBSpline >::_func, and aims::ConvolutionSubSampler< BasisFunction >::setFactor().
|
protected |
Definition at line 141 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< BasisFunction >::setBasisFunction().
Referenced by DirectBSplineSubSampler().
void aims::DirectBSplineSubSampler::setNormalize | ( | bool | normalize = true | ) |
Set normalization mode.
Definition at line 115 of file splinesubsampler_d.h.
References _normalize, and normalize().
void aims::DirectBSplineSubSampler::setOrder | ( | unsigned | n | ) |
Set spline order Updates underlying basis functions.
Definition at line 108 of file splinesubsampler_d.h.
References aims::ConvolutionSubSampler< DiscreteBSpline >::_func.
|
protected |
Definition at line 130 of file splinesubsampler.h.
Referenced by normalize(), operator=(), and setNormalize().