|
@@ -5,6 +5,22 @@ namespace mri {
|
|
// ********************************************************************** //
|
|
// ********************************************************************** //
|
|
// ********************************************************************** //
|
|
// ********************************************************************** //
|
|
// ********************************************************************** //
|
|
// ********************************************************************** //
|
|
|
|
+ void GeneratorRF::RandomizeVoxels(){
|
|
|
|
+ std::random_device rd;
|
|
|
|
+ std::mt19937_64 gn;
|
|
|
|
+ gn.seed(rd());
|
|
|
|
+ double lbound = 0.0, ubound = 1.0;
|
|
|
|
+ std::uniform_real_distribution<double> rand(lbound, ubound);
|
|
|
|
+ for (int i = 0; i < 10; ++i;){
|
|
|
|
+ std::cout<< rand(gn) <<" ";
|
|
|
|
+ }
|
|
|
|
+ std::cout<<std::endl;
|
|
|
|
+
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ // ********************************************************************** //
|
|
|
|
+ // ********************************************************************** //
|
|
|
|
+ // ********************************************************************** //
|
|
void GeneratorRF::SetAmplitudes(std::vector<double> amplitudes){
|
|
void GeneratorRF::SetAmplitudes(std::vector<double> amplitudes){
|
|
if (amplitudes.size() != voxel_num_)
|
|
if (amplitudes.size() != voxel_num_)
|
|
throw std::invalid_argument("Number of amplitudes do not fit number of voxels");
|
|
throw std::invalid_argument("Number of amplitudes do not fit number of voxels");
|