34 #ifndef AIMS_PYRAMID_SPLINESUBSAMPLER_D_H
35 #define AIMS_PYRAMID_SPLINESUBSAMPLER_D_H
80 _normalize( other._normalize )
100 return this->
_func[0].order();
110 for( std::vector<DiscreteBSpline>::iterator f = this->
_func.begin();
111 f != this->_func.end(); ++f )
123 for( std::vector<DiscreteBSpline>::iterator f = this->
_func.begin();
124 f != this->_func.end(); ++f )
125 f->setScale( (
float)r );
132 for( std::vector<DiscreteBSpline>::iterator f = this->
_func.begin();
133 f != this->_func.end(); ++f, ++i )
134 f->setScale( (
float)r[i] );
143 std::vector<DiscreteBSpline> f;
156 template <
typename OUT,
typename IN>
161 std::vector<int> size = in.
getSize();
163 for( std::size_t i = 0; i < 4; ++i )
164 if( this->
_dir[i] && size[i] > 1 )
165 div *= ( this->
_func.size() > i ? this->
_func[i].scale()
166 : this->
_func[0].scale() );
std::vector< DiscreteBSpline > _func
carto::VolumeRef< OUT > execute(const carto::VolumeRef< IN > &in) const
Execution.
void setBasisFunction(const BasisFunction &func)
ConvolutionSubSampler & operator=(const ConvolutionSubSampler &other)
void setFactor(unsigned r)
Class excuting a spline-based subsampling.
void setFactor(unsigned r)
Override ConclutionSubSampler version to update the underlying basis functions.
void setFunctions(const Point4du &r, unsigned n)
carto::VolumeRef< OUT > execute(const carto::VolumeRef< IN > &in, carto::VolumeRef< OUT > &out) const
Execution.
void setNormalize(bool normalize=true)
Set normalization mode.
void setOrder(unsigned n)
Set spline order Updates underlying basis functions.
DirectBSplineSubSampler(unsigned factor=2, bool normalize=false, unsigned spline_order=3)
Constructor / Copy.
virtual ~DirectBSplineSubSampler()
bool normalize() const
Get normalization mode.
DirectBSplineSubSampler & operator=(const DirectBSplineSubSampler &other)
unsigned order() const
Parameters.
Discrete B-Splines B-Spline pre sampled only on integral values.
std::vector< int > getSize() const