35 #ifndef AIMS_RESAMPLING_SPLINERESAMPLER_H 36 #define AIMS_RESAMPLING_SPLINERESAMPLER_H 49 template<
bool,
typename>
130 inverse_transform_to_vox,
144 const ChannelType& outBackground,
151 const T &outBackground,
154 int t )
const CARTO_OVERRIDE;
158 const ChannelType &outBackground,
160 ChannelType &outValue,
168 bool verbose )
const CARTO_OVERRIDE;
170 bool verbose )
const;
182 int getFold(
int i,
int size )
const;
224 int size2 = ( size * 2 ) - 2;
226 return ( rem < size ) ? rem : ( size2 - rem );
void resample_channel_inv_to_vox(const carto::Volume< ChannelType > &inVolume, const soma::Transformation3d &inverse_transform_to_vox, const ChannelType &outBackground, carto::Volume< ChannelType > &outVolume, bool verbose) const
carto::VolumeRef< double > getSplineCoef(const carto::Volume< T > &inVolume, int t=0, bool verbose=false)
Computes spline coefficients corresponding to an input volume.
carto::VolumeRef< double > _splineCoefficients
virtual void doResampleChannel(const carto::Volume< ChannelType > &inVolume, const soma::Transformation3d &transform3d, const ChannelType &outBackground, const Point3df &outLocation, ChannelType &outValue, int t) const
int mirrorCoeff(int i, int size)
This method returns a mirror index when needed.
virtual void updateParametersChannel(const carto::Volume< ChannelType > &inVolume, int t, bool verbose) const
std::vector< double > _poles
carto::DataTypeTraits< T >::ChannelType ChannelType
void resample_inv_to_vox(const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_vox, const T &background, carto::Volume< T > &output_data, bool verbose=false) const CARTO_OVERRIDE
Resample a volume into an existing output volume.
void iirConvolveMirror(std::vector< double > &data) const
int getFold(int i, int size) const
This method returns a mirror index when needed.
void doResample(const carto::Volume< T > &inVolume, const soma::Transformation3d &transform3d, const T &outBackground, const Point3df &outLocation, T &outValue, int t) const CARTO_OVERRIDE
Resample a volume at a single location.
void updateParameters(const carto::Volume< T > &inVolume, int t, bool verbose) const CARTO_OVERRIDE
Update the cache of spline coefficients if needed.
void reset()
Clear the cache.
Resampling of data from a volume, applying a transformation.
virtual int getOrder() const =0
Spline order (1 to 7)
virtual double getBSplineWeight(int i, double x) const =0
Returns .
const carto::Volume< ChannelType > * _lastvolume
B-Spline-based resampling.