17#ifndef __interp_sinc_h__
18#define __interp_sinc_h__
25#define SINC_WINDOW_SIZE 7
70 template <
class ImageType>
class Sinc :
public Base<ImageType>
73 using typename Base<ImageType>::value_type;
93 template <
class VectorType>
94 bool voxel (
const VectorType& pos) {
105 template <
class VectorType>
112 template <
class VectorType>
121 return out_of_bounds_value;
136 Eigen::Matrix<value_type, Eigen::Dynamic, 1> row (
size_t axis) {
138 assert (
axis < ImageType::ndim());
140 Eigen::Matrix<value_type, Eigen::Dynamic, 1> out_of_bounds_row (ImageType::size(
axis));
141 out_of_bounds_row.setOnes();
142 out_of_bounds_row *= out_of_bounds_value;
143 return out_of_bounds_row;
146 Eigen::Matrix<value_type, Eigen::Dynamic, 1> row (ImageType::size(
axis));
149 for (ssize_t volume = 0; volume != ImageType::size(
axis); ++volume) {
151 row (volume,0) = value();
169 template <
class ImageType,
typename... Args>
This class defines the interface for classes that perform image interpolation.
This class provides access to the voxel intensities of an image, using sinc interpolation.
Math::Sinc< value_type > Sinc_y
Math::Sinc< value_type > Sinc_z
vector< value_type > z_values
vector< value_type > y_values
Math::Sinc< value_type > Sinc_x
void set(const ImageType &image, const size_t axis, const value_type position)
value_type value(ImageType &image, const size_t axis) const
size_t index(const size_t i) const
Sinc< ImageType > make_sinc(const ImageType &parent, Args &&... args)