From a9e83d7a8cdda0ef1e3fc31d93c7065996994b64 Mon Sep 17 00:00:00 2001 From: Ali Aghaeifar Date: Mon, 24 Jun 2024 16:10:50 +0200 Subject: [PATCH] minor --- src/file_utils.cpp | 5 +++++ src/shapes/shape_base.cpp | 2 +- src/spinwalk.cu | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/file_utils.cpp b/src/file_utils.cpp index e47d936..7590354 100644 --- a/src/file_utils.cpp +++ b/src/file_utils.cpp @@ -76,6 +76,11 @@ bool file_utils::read_config(std::string config_filename, simulation_parameters filenames[boost::algorithm::to_lower_copy(str)] = file_paths; } param->n_fieldmaps = filenames["phantom"].size(); + if(isParentConfig == false && param->n_fieldmaps == 0) + { + BOOST_LOG_TRIVIAL(error) << cf_name << ") " << "No fieldmap is provided. Aborting...!"; + return false; + } // output directory output_dir = std::filesystem::path(pt.get("FILES.OUTPUT_DIR", output_dir.string())); diff --git a/src/shapes/shape_base.cpp b/src/shapes/shape_base.cpp index 5a0ff9f..2cd1da5 100644 --- a/src/shapes/shape_base.cpp +++ b/src/shapes/shape_base.cpp @@ -80,7 +80,7 @@ bool shape::save() HighFive::DataSet dataset_mask = file.createDataSet("mask", HighFive::DataSpace(dims)); dataset_mask.write_raw((int8_t *)m_mask.data()); // save fov - float fov[3] = {m_fov, m_fov, m_fov}; + float fov[3] = {m_fov*1e-6f, m_fov*1e-6f, m_fov*1e-6f}; // convert um to m std::vector dims_fov(1, 3); HighFive::DataSet dataset_fov = file.createDataSet("fov", HighFive::DataSpace(dims_fov)); dataset_fov.write_raw(fov); diff --git a/src/spinwalk.cu b/src/spinwalk.cu index 23e1487..af8ebe4 100644 --- a/src/spinwalk.cu +++ b/src/spinwalk.cu @@ -209,7 +209,7 @@ bool run(simulation_parameters param, std::map