Ejemplo n.º 1
0
 virtual void init(Voxel& voxel)
 {
     if(!voxel.grad_dev.empty() || voxel.qsdr)
         voxel.calculate_q_vec_t(q_vectors_time);
     else
         voxel.calculate_sinc_ql(sinc_ql);
 }
Ejemplo n.º 2
0
 virtual void init(Voxel& voxel)
 {
     if(voxel.bvalues.size() != 1)
     {
         hgqi = false;
         return;
     }
     hgqi = true;
     hraw.resize(voxel.dim.size());
     int range = 2;
     for(int dz = 0;dz <= range;++dz) // half sphere
         for(int dy = -range;dy <= range;++dy)
             for(int dx = -range;dx <= range;++dx)
             {
                 int r2 = dx*dx+dy*dy+dz*dz;
                 voxel.bvalues.push_back(r2*500);
                 tipl::vector<3> dir(dx,dy,dz);
                 dir.normalize();
                 voxel.bvectors.push_back(dir);
                 offset.push_back(dx + dy*voxel.dim.width() + dz*voxel.dim.plane_size());
                 scaling.push_back(std::exp(-r2));
             }
     voxel.calculate_sinc_ql(sinc_ql);
 }