17#ifndef __gt_mhsampler_h__
18#define __gt_mhsampler_h__
34 namespace Tractography {
46 dims{size_t(
dwi.size(0)), size_t(
dwi.size(1)), size_t(
dwi.size(2))},
50 DEBUG(
"Initialise Metropolis Hastings sampler.");
57 DEBUG(
"Copy Metropolis Hastings sampler.");
84 std::shared_ptr< SpatialLock<float> >
lock;
102 Point_t Dpos = par->getPosition() - pos;
103 Point_t Ddir = par->getDirection() - dir;
108 return std::exp( -x.squaredNorm() / (2*sigma) ) / std::sqrt( 2*
Math::pi * sigma*sigma);
bool moveOptimal(const Particle *par, Point_t &pos, Point_t &dir) const
Math::RNG::Uniform< float > rng_uniform
void moveRandom(const Particle *par, Point_t &pos, Point_t &dir)
double calcShiftProb(const Particle *par, const Point_t &pos, const Point_t &dir) const
Math::RNG::Normal< float > rng_normal
std::shared_ptr< SpatialLock< float > > lock
Point_t getRandPosInMask()
double gaussian_pdf(const Point_t &x, double sigma) const
bool inMask(const Point_t p)
SpatialLock manages a mutex lock on n positions in 3D space.
std::shared_ptr< X > make_shared(Args &&... args)