Skip to content

Commit ba1a239

Browse files
committed
update
1 parent 344ee83 commit ba1a239

File tree

3 files changed

+65
-57
lines changed

3 files changed

+65
-57
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ We recommend using the provided Dockerfile, which automates the installation of
6060

6161
```shell
6262
git clone https://github.com/aghaeifar/SpinWalk
63-
cd containers
63+
cd SpinWalk/containers
6464
docker build --no-cache -t spinwalk ..
6565
docker run --gpus all --rm -it --runtime=nvidia spinwalk bash
6666
```
6767
#### CMake
6868

69-
**Dependencies**
69+
**Dependencies:**
7070

7171
- A C++ compiler that supports C++20
72-
- CUDA toolkit version 12.0 or later that supports C++20 ([+](https://developer.nvidia.com/blog/cuda-toolkit-12-0-released-for-general-availability/)). Your Nvidia driver must support the corresponding CUDA version ([+](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html)). Check your driver and CUDA versions with *nvidia-smi* and *nvcc --version* in the terminal.
72+
- CUDA toolkit version 12.0 or later that supports C++20 ([+](https://developer.nvidia.com/blog/cuda-toolkit-12-0-released-for-general-availability/)). Your Nvidia driver must support the corresponding CUDA version ([+](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#id5)). Check your driver and CUDA versions with *nvidia-smi* and *nvcc --version* in the terminal.
7373
- Boost libraries ([+](https://www.boost.org/))
7474
- HDF5 library ([+](https://www.hdfgroup.org/downloads/hdf5))
7575
- Threading Building Blocks (TBB)
@@ -82,6 +82,7 @@ git clone https://github.com/aghaeifar/SpinWalk.git
8282
cd SpinWalk
8383
cmake -B ./build
8484
cmake --build ./build --config Release
85+
sudo cmake --install ./build
8586
```
8687
---
8788

@@ -102,7 +103,14 @@ spinwalk sim -c config1.ini config2.ini ...
102103
---
103104
### Configuration files
104105

105-
Configruation file is a text based [ini file](https://en.wikipedia.org/wiki/INI_file) used to provide simulation parameters for simulator. Simulator can accept more than one configuration to simulation several configurations. A configuration file can inherit from another configuration file to avoid writing repetitive simulation parmeters. All the possible parameters are provided in [config_default.ini](./config/config_default.ini) with definition and expected unit.
106+
The configuration file is a text-based [INI file](https://en.wikipedia.org/wiki/INI_file) used to specify simulation parameters for SpinWalk. SpinWalk can process multiple configuration files to simulate various setups. A configuration file can inherit parameters from another configuration file to avoid duplicating repetitive simulation settings.
107+
108+
All possible parameters are documented in [config_default.ini](./config/config_default.ini), along with their definitions and expected units.
109+
110+
- The `config` subcommand can be used to generate configuration files for some popular sequences. These auto-generated files may require further modifications to suit specific purposes.
111+
- The `dwi` subcommand allows adding diffusion gradients to an existing configuration file.
112+
113+
For a demonstration, refer to the [free diffusion](./demo/spinwalk_dwi.ipynb) example.
106114

107115
---
108116
### Input/Output file format

demo/spinwalk_dwi.ipynb

Lines changed: 47 additions & 47 deletions
Large diffs are not rendered by default.

src/spinwalk.cu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ int main(int argc, char * argv[])
8484
subcommand_config->add_option("-t,--timestep", timestep_us, "timestep in \u00B5s")->mandatory(true)->check(CLI::PositiveNumber);;
8585
subcommand_config->add_option("-o,--output",config_file, "Path to save the configuration file")->mandatory(true);
8686

87-
auto subcommand_diffgrad = app.add_subcommand("dMRI", "Generate diffusion gradient table");
88-
subcommand_diffgrad->add_option("-b,--bvalue", bvalue, "b-value(s) as many as you want. e.g. -b 100 500 1000 5000 (s/mm\u00B2)")->mandatory(true);
89-
subcommand_diffgrad->add_option("-v,--bvector", bvector, "Gradient direction: X Y Z, e.g. 0.267 0.534 0.801")->mandatory(true)->expected(3);
90-
subcommand_diffgrad->add_option("-d,--delta", bdelta, "start time, \xCE\xB4 and \xCE\x94 in ms, e.g. 10 3 5 ")->mandatory(true)->expected(3);
91-
subcommand_diffgrad->add_option("-c,--config", config_file, "input config file to insert PGSE gradients and excitation and refocusing RF")->mandatory(true)->check(CLI::ExistingFile);
87+
auto subcommand_diffusion = app.add_subcommand("dwi", "Generate diffusion gradient table");
88+
subcommand_diffusion->add_option("-b,--bvalue", bvalue, "b-value(s) as many as you want. e.g. -b 100 500 1000 5000 (s/mm\u00B2)")->mandatory(true);
89+
subcommand_diffusion->add_option("-v,--bvector", bvector, "Gradient direction: X Y Z, e.g. 0.267 0.534 0.801")->mandatory(true)->expected(3);
90+
subcommand_diffusion->add_option("-d,--delta", bdelta, "start time, \xCE\xB4 and \xCE\x94 in ms, e.g. 10 3 5 ")->mandatory(true)->expected(3);
91+
subcommand_diffusion->add_option("-c,--config", config_file, "input config file to insert PGSE gradients and excitation and refocusing RF")->mandatory(true)->check(CLI::ExistingFile);
9292

9393
CLI11_PARSE(app, argc, argv);
9494
if(app.count_all() == 1){
@@ -113,7 +113,7 @@ int main(int argc, char * argv[])
113113
std::cout << "Log file location: " << std::filesystem::current_path() / log_filename << '\n';
114114

115115
// ========== generate diffusion gradients ==========
116-
if (subcommand_diffgrad->parsed())
116+
if (subcommand_diffusion->parsed())
117117
if (dMRI::handler::execute({.start_ms=bdelta[0], .delta_ms=bdelta[1], .DELTA_ms=bdelta[2], .dir=bvector, .b_value=bvalue, .output=config_file}) == false){
118118
std::cout << ERR_MSG << "Diffusion gradient generation failed. See the log file " << log_filename <<", Aborting...!" << "\n";
119119
return 1;

0 commit comments

Comments
 (0)