-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simple installation script and update readme
- Loading branch information
Showing
6 changed files
with
72 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
[bB]uild | ||
third/vcpkg | ||
*.jpg | ||
*.ini | ||
*.ini | ||
.cache-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
# RTfODFSlicer | ||
# RTfODF Slicer | ||
A real-time fiber ODF slicing application for Linux using `OpenGL 4.6`. | ||
|
||
## Installation | ||
|
||
`Cmake` minimum version 3.11 is required for installing the application. | ||
`Cmake` minimum version 3.11 is required for installing the application. The generator used by default is `GNU Make`. Make sure you have `git` installed; it is used for fetching the [`nifticlib` library](https://github.com/NIFTI-Imaging/nifti_clib). | ||
|
||
To build the project using `GNU Make`: | ||
|
||
### Quick installation | ||
The program can be installed by running: | ||
``` | ||
./install.sh | ||
``` | ||
The above script creates the build directory, runs `Cmake` and `make` and add the executable path the system `PATH`. | ||
|
||
### Step-by-step installation | ||
Alternatively, the program can be built by running: | ||
``` | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
``` | ||
|
||
To run the executable: | ||
The executable file will be in the folder `${project_root}/build/Engine`. | ||
|
||
Then you can add the path to the directory containing the executable to your `.bashrc` configuration to make it available system-wide. | ||
|
||
``` | ||
./build/Engine/rtfodfslicer path/to/image.nii.gz | ||
export PATH='${absolute_path_to_project}/build/Engine':$PATH | ||
``` | ||
|
||
If you experience problems with the installation, make sure you have `git` installed; it is used for fetching the [`nifticlib`](https://github.com/NIFTI-Imaging/nifti_clib) library. | ||
## Running the application | ||
To run the executable: | ||
``` | ||
rtfodfslicer path/to/image.nii.gz | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
script="$(readlink -f "${BASH_SOURCE[0]}")" | ||
project_dir="$(dirname "$script")" | ||
|
||
if [ -d "$project_dir/build" ] | ||
then | ||
echo "Build directory $project_dir/build already exists." | ||
else | ||
echo "Creating build directory $project_dir/build." | ||
mkdir "$project_dir/build" | ||
fi | ||
|
||
cd "$project_dir/build" || exit | ||
cmake .. | ||
make | ||
|
||
if [ -e "$project_dir/.cache-install" ] | ||
then | ||
echo "Skipping path update. Delete .cache-install file and rerun to update." | ||
else | ||
echo "Updating path..." | ||
echo "export PATH='$project_dir/build/Engine':\$PATH" >> ~/.bashrc | ||
source ~/.bashrc | ||
touch "$project_dir/.cache-install" | ||
fi | ||
echo "Done!" |