35 #ifndef AIMS_RESAMPLING_SPLINERESAMPLER_H
36 #define AIMS_RESAMPLING_SPLINERESAMPLER_H
49 template<
bool,
typename>
119 bool verbose =
false );
130 inverse_transform_to_vox,
133 bool verbose =
false ) const CARTO_OVERRIDE;
143 const
soma::Transformation3d& inverse_transform_to_vox,
150 const
soma::Transformation3d &transform3d,
151 const T &outBackground,
154 int t ) const CARTO_OVERRIDE;
157 const
soma::Transformation3d &transform3d,
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 );
Resampling of data from a volume, applying a transformation.
B-Spline-based resampling.
std::vector< double > _poles
const carto::Volume< ChannelType > * _lastvolume
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 reset()
Clear the cache.
carto::VolumeRef< double > getSplineCoef(const carto::Volume< T > &inVolume, int t=0, bool verbose=false)
Computes spline coefficients corresponding to an input volume.
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.
virtual int getOrder() const =0
Spline order (1 to 7)
virtual double getBSplineWeight(int i, double x) const =0
Returns .
int getFold(int i, int size) const
This method returns a mirror index when needed.
virtual void updateParametersChannel(const carto::Volume< ChannelType > &inVolume, int t, bool verbose) const
virtual void doResampleChannel(const carto::Volume< ChannelType > &inVolume, const soma::Transformation3d &transform3d, const ChannelType &outBackground, const Point3df &outLocation, ChannelType &outValue, int t) const
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 > _splineCoefficients
void iirConvolveMirror(std::vector< double > &data) const
void updateParameters(const carto::Volume< T > &inVolume, int t, bool verbose) const CARTO_OVERRIDE
Update the cache of spline coefficients if needed.
int mirrorCoeff(int i, int size)
This method returns a mirror index when needed.