Skip to content

Commit

Permalink
record echo time
Browse files Browse the repository at this point in the history
  • Loading branch information
aghaeifar committed Jul 10, 2024
1 parent 0d9eaa9 commit 9f19c5c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/simulation_parameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ typedef struct simulation_parameters
if (n_dummy_scan < 0)
n_dummy_scan = 5.0 * T1_ms[0] / TR_us * 1e3;

if (n_TE == 1)
{
BOOST_LOG_TRIVIAL(error) << "Echo time is not set";
return false;
}
if (mask_exist == false)
{
BOOST_LOG_TRIVIAL(error) << "Mask with labeled tissues is not provided";
Expand Down
14 changes: 11 additions & 3 deletions src/spinwalk.cu
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,8 @@ bool run(simulation_parameters param, std::map<std::string, std::vector<std::str
double min_convergence = 0.95 * param.diffusivity[n] * sqrt(1.0 * param.TE_us[param.n_TE-2]); // https://submissions.mirasmart.com/ISMRM2024/Itinerary/PresentationDetail.aspx?evdid=4684
if(param_local.fov[i] < min_convergence )
{
BOOST_LOG_TRIVIAL(error) << "Virtual FoV (= " << param_local.fov[i] << ") is smaller than minimum convergence length (= " << min_convergence << ")!";
BOOST_LOG_TRIVIAL(error) << "Original FoV (= " << param.fov[i] << ") FoV Scale (= " << fov_scale[sl] << ")!";
return false;
BOOST_LOG_TRIVIAL(warning) << "Virtual FoV (= " << param_local.fov[i] << ") is smaller than minimum convergence length (= " << min_convergence << ")!";
BOOST_LOG_TRIVIAL(warning) << "Original FoV (= " << param.fov[i] << ") FoV Scale (= " << fov_scale[sl] << ")!";
}
}
}
Expand Down Expand Up @@ -253,6 +252,15 @@ bool run(simulation_parameters param, std::map<std::string, std::vector<std::str

dims[0] = fov_scale.size(); dims[1] = 1; dims[2] = 1; dims[3] = 1;
file_utils::save_h5(f, fov_scale.data(), dims, "scales", "double");

dims[0] = fov_scale.size(); dims[1] = 1; dims[2] = 1; dims[3] = 1;
file_utils::save_h5(f, fov_scale.data(), dims, "scales", "double");

std::vector<float> TE;
for(int i=0; i<param.n_TE; i++) TE.push_back(param.TE_us[i]*param.timestep_us*1e-6);
TE.push_back(param.TR_us*param.timestep_us*1e-6);
dims[0] = TE.size(); dims[1] = 1; dims[2] = 1; dims[3] = 1;
file_utils::save_h5(f, TE.data(), dims, "TE", "float");
}

#ifdef __CUDACC__
Expand Down
2 changes: 1 addition & 1 deletion src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#define SPINWALK_VERSION_MAJOR 1
#define SPINWALK_VERSION_MINOR 13
#define SPINWALK_VERSION_PATCH 9
#define SPINWALK_VERSION_PATCH 10

//---------------------------------------------------------------------------------------------
//
Expand Down

0 comments on commit 9f19c5c

Please sign in to comment.