Transform loop

template<int Dim, typename T, typename Func, typename BoundaryFunc, typename ...Xs>
constexpr void affine_transform::detail::transform_loop(Eigen::Matrix<double, Dim, 1> point, const pybind11::detail::unchecked_reference<T, Dim> &input_image, pybind11::detail::unchecked_mutable_reference<T, Dim> &output_image, const std::array<Eigen::Matrix<double, Dim, 1>, Dim> &dx, interpolation::Data<Func, Dim> &chunk, T background_value, int begin, int end, Xs... xs)

Inner For loop of the transform function.

Loops over the dimensions of the output image and fills it using the given interpolation and boundary functions to look up values in the given input image.

Parameters:
  • point[in] The point from which to start to loop in the input image coordinate system

  • input_image[in] The image from which to extract values

  • output_image[inout] The image to write to

  • dx[in] The vectors along which to iterate to fill the output image

  • chunk[inout] A temporary memory object which is used to call the interpolation function

  • background_value[in] A background value to use when accessing points outside the input image. (might get ignored by some boundary functions)

  • begin[in] The starting index of the first dimension (can be used to parallelise the transform)

  • end[in] The end index of the first dimension (can be used to parallelise the transform)

  • xs[in] Loop variables used to access the n-dimensional data

Template Parameters:
  • Dim – The dimensions of the images

  • T – The data type of the images

  • Func – The interpolation order function

  • BoundaryFunc – The boundary function to use

  • Xs – The loop indices, will be int