17#ifndef __dwi_bootstrap_h__
18#define __dwi_bootstrap_h__
27 template <
class ImageType,
class Functor,
size_t NUM_VOX_PER_CHUNK = 256>
29 public Adapter::Base<Bootstrap<ImageType,Functor,NUM_VOX_PER_CHUNK>,ImageType>
36 using base_type::ndim;
37 using base_type::size;
42 bool operator() (
const Eigen::Vector3i& a,
const Eigen::Vector3i& b)
const {
43 if (a[0] < b[0])
return true;
44 if (a[1] < b[1])
return true;
45 if (a[2] < b[2])
return true;
63 template <
class VectorType>
64 void get_values (VectorType& values) {
71 for (ssize_t n = 0; n < size(3); ++n)
88 std::map<Eigen::Vector3i,value_type*,IndexCompare>
voxels;
111 value_type*& data (
voxels.insert (std::make_pair (Eigen::Vector3i (
index(0),
index(1),
index(2)),
nullptr)).first->second);
114 ssize_t pos =
index(3);
115 for (
auto l =
Loop(3)(*
this); l; ++l)
value_type * allocate_voxel()
std::map< Eigen::Vector3i, value_type *, IndexCompare > voxels
vector< vector< value_type > > voxel_buffer
functions and classes related to image data input/output
FORCE_INLINE LoopAlongAxes Loop()
VectorType::Scalar value(const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar cos_azimuth, typename VectorType::Scalar sin_azimuth, int lmax)
MR::default_type value_type
std::remove_reference< Functor >::type & functor