Skip to content

Commit 873ea94

Browse files
authored
Merge pull request #53 from dmritrekker/build
Build
2 parents e1651d6 + c8f7157 commit 873ea94

File tree

11 files changed

+374
-22
lines changed

11 files changed

+374
-22
lines changed

.github/workflows/build_shared.yml

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- build
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129

.github/workflows/build_static.yml

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches:
66
- build
7-
pull_request:
8-
branches:
9-
- main
107

118
jobs:
129

README.md

+25-3
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,33 @@ For complete documentation, tutorials and examples, visit https://dmritrekker.gi
2222

2323
### Stand-alone executables
2424

25-
Ready-to-run executables are available on the [Releases](https://github.com/dmritrekker/trekker/releases) page.
25+
Download the appropriate stand-alone executable for your operating system:
2626

27-
**Note 1:** Linux and macOS users may need to run `chmod +x <trekker_executable>` in their terminal after downloading to make the file executable.
27+
* **Linux:** :download: [linux_binary.zip](https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/linux_binary.zip)
28+
* **macOS:** :download: [macOS-universal_binary.zip](https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/macOS-universal_binary.zip)
29+
* **Windows:** :download: [windows_binary.zip](https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/windows_binary.zip)
30+
31+
After downloading and extracting the archive, you can run the executable.
32+
33+
**Testing:**
34+
35+
- Download and extract the datasets and scripts we prepared for testing by clicking here, [tests.zip](https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/tests.zip).
36+
- Copy paste your executable under the ``testScripts`` folder.
37+
- Run the provided test script for your operating system.
38+
39+
40+
**Troubleshooting:**
41+
42+
- *permission denied error*: If you encounter this when trying to run the executable on Linux or macOS, open a terminal, navigate to the directory where you extracted the file, and run the following command:
43+
44+
```bash
45+
chmod +x <executable name>
46+
```
47+
48+
Replace ``<executable name>`` with the actual name of the executable file (e.g., ``trekker_linux`` or ``trekker_macOS``). Then, try running the executable again.
49+
50+
- *macOS errors related to llvm and libomp*: If you encounter errors related to missing OpenMP or libomp, please see the provided test script for macOS in this [link](https://github.com/dmritrekker/trekker/blob/main/tests/testScripts/test_macOS.sh), which gives an example for how to set these paths and install dependencies if needed.
2851

29-
**Note 2:** The stand-alone executables are optimized to work on a wide range of platforms and do not leverage hardware optimization to improve performance. For best performance, executables can be built from source.
3052

3153

3254
### Building from source

doc/other/track2surf/thal.jpg

210 KB
Loading

doc/other/track2surf/thal.svg

+300
Loading

doc/source/commands/filter.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ filters tractograms
99

1010
.. code-block:: bash
1111
12-
./trekker filter [OPTIONS] <input tractogram> <output tractogram>
12+
./trekker filter [OPTIONS] <input tractogram>
1313
1414
|
1515
@@ -18,9 +18,6 @@ filters tractograms
1818
- `<input tractogram> FILE REQUIRED`
1919
Input tractogram (.vtk, .tck)
2020

21-
- `<output tractogram> FILE REQUIRED`
22-
Output tractogram (.vtk, .tck)
23-
2421
|
2522
2623
.. tip::

doc/source/index.rst

+41-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Trekker
33

44
.. note::
55

6-
February 3\ :sup:`th`, 2025
6+
February 6\ :sup:`th`, 2025
77

88
**UPDATE:** Trekker v1.0.0-rc3 is out with major improvements and bug fixes! See below for a list of changes.
99

@@ -30,22 +30,58 @@ Installation
3030

3131
Option 1: Stand-alone executables
3232
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
33-
Please find the stand-alone executables under `Releases <https://github.com/dmritrekker/trekker/releases>`_.
33+
34+
Download the appropriate stand-alone executable for your operating system:
35+
36+
* **Linux:** :download:`linux_binary.zip <https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/linux_binary.zip>`
37+
* **macOS:** :download:`macOS-universal_binary.zip <https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/macOS-universal_binary.zip>`
38+
* **Windows:** :download:`windows_binary.zip <https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/windows_binary.zip>`
39+
40+
After downloading and extracting the archive, you can run the executable.
41+
42+
**Testing:**
43+
44+
- Download and extract the datasets and scripts we prepared for testing by clicking here, `tests.zip <https://github.com/dmritrekker/trekker/releases/download/v1.0.0-rc3/tests.zip>`_.
45+
- Copy paste your executable under the ``testScripts`` folder.
46+
- Run the provided test script for your operating system.
47+
48+
49+
**Troubleshooting:**
50+
51+
- *permission denied error*: If you encounter this when trying to run the executable on Linux or macOS, open a terminal, navigate to the directory where you extracted the file, and run the following command:
52+
53+
.. code-block:: bash
54+
55+
chmod +x <executable name>
56+
57+
Replace ``<executable name>`` with the actual name of the executable file (e.g., ``trekker_linux`` or ``trekker_macOS``). Then, try running the executable again.
58+
59+
- *macOS errors related to llvm and libomp*: If you encounter errors related to missing OpenMP or libomp, please see the provided test script for macOS in this `link <https://github.com/dmritrekker/trekker/blob/main/tests/testScripts/test_macOS.sh>`_, which gives an example for how to set these paths and install dependencies if needed.
60+
61+
3462

3563
Option 2: Building from source
3664
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3765

38-
Trekker relies on `nibrary <https://github.com/nibrary/nibrary>`_. To compile Trekker from source, ensure that nibrary is installed first. Then follow these steps to compile Trekker:
66+
Trekker is natively supported on Linux, Windows, and macOS. Trekker can be installed with a minimal set of standard development tools.
67+
68+
For detailed instructions to build from source, please check the `Readme <https://github.com/dmritrekker/trekker/tree/main>`_ file in GitHub.
69+
70+
Shortly, if your system has CMake (min version 3.15), OpenMP, and a modern compiler. The following should be sufficient for the compilation.
71+
72+
*Note*: clang-v19 is known NOT to work with this version of Trekker due to a conflict with an internal dependency. Please use clang-v18 instead.
3973

4074
**Step 1: Download the Source Code**
4175

4276
.. code-block:: bash
4377
44-
git clone https://github.com/dmritrekker/trekker
78+
git clone https://github.com/dmritrekker/trekker.git
4579
4680
**Step 2: Modify and run the build script**
4781

4882
- **For Linux:** Edit ``build_Linux.sh``
83+
- **For Windows:** Edit ``build_win.sh``
84+
- **For macOS:** Edit ``build_macOS.sh``
4985

5086

5187

@@ -161,7 +197,7 @@ Examples
161197
INP_TRACK.vtk \
162198
--seed WHITE_MATTER_SURFACE.gii \
163199
--pathway require_end_inside LEFT_THAL.nii.gz \
164-
OUT_TRACK.vtk
200+
--output OUT_TRACK.vtk
165201
166202
Release notes for Trekker-v1.0.0-rc3
167203
------------------------------------

external/cmake/ExternalNibrary.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# NIBRARY
22

3-
SET(NIBRARY_MIN_VERSION "0.3.0" CACHE STRING "Minimum nibrary version")
3+
SET(NIBRARY_MIN_VERSION "0.3.1" CACHE STRING "Minimum nibrary version")
44

55
include("${CMAKE_CURRENT_LIST_DIR}/utils.cmake")
66

src/cmd/track.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void track(CLI::App *app)
280280
// General options
281281
auto general = app->add_option_group(center_text("GENERAL OPTIONS",45));
282282

283-
general->add_option ("<FOD>", fod, "Input FOD image (.nii, .nii.gz). Trekker supports both symmetric and asymmetric FODs, i.e. spherical harmonics with both even and odd orders.")->required()->check(CLI::ExistingFile)->type_name("FILE");
283+
general->add_option ("<FOD>", fod, "Input FOD image (.nii, .nii.gz). Trekker supports both symmetric and asymmetric FODs, i.e. spherical harmonics with both even and odd orders.")->required();
284284
general->add_option ("--output,-o", out_fname, "Output tractogram (.vtk, .tck)")->required()->type_name("FILE");
285285
general->add_flag ("--saveSeedIndexField", saveSeedIndexField, "Save seed indices as tractogram field. Available only for binary vtk output.");
286286
general->add_flag ("--ascii,-a", ascii, "Write ASCII output (.vtk only)");
@@ -327,7 +327,7 @@ void track(CLI::App *app)
327327

328328
// Seeding options
329329
auto seeding = tracking->add_option_group("SEEDING PARAMETERS");
330-
seeding->add_option ("--seed, -s", seedInp, "Seed definition")->multi_option_policy(CLI::MultiOptionPolicy::Throw);
330+
seeding->add_option ("--seed, -s", seedInp, "Seed definition")->multi_option_policy(CLI::MultiOptionPolicy::Throw)->required();
331331
seeding->add_option ("--discard_seed", discardSeedInp, "If a seed point falls into this region, it will be discarded")->multi_option_policy(CLI::MultiOptionPolicy::Throw);
332332
seeding->add_flag ("--skipSeed", skipSeed, "Does not output the points that are within seed region");
333333
// seeding->add_flag ("--allowEdgeSeeds", allowEdgeSeeds, "Allows seeding at the edges of pathway rules. Default: false");

src/main.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ int main(int argc, char *argv[]) {
99

1010
// Parse input
1111
CLI::App app(TREKKER_EXE_STRING);
12+
13+
argv = app.ensure_utf8(argv);
14+
1215
app.footer("----------" + TREKKER_EXE_STRING + "---------\n© Copyright 2025, Dogu Baran Aydogan, [email protected]\n");
1316
// app.failure_message(CLI::FailureMessage::help);
1417

tests/testScripts/test_macOS.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export LDFLAGS="-L${llvm_prefix}/lib -L${libomp_prefix}/lib"
1818
export OpenMP_omp_LIBRARY="${libomp_prefix}/lib/libomp.dylib"
1919

2020

21-
# Make sure trekker_linux is executable
21+
# Make sure trekker_macOS is executable
2222
trekker=./trekker_macOS
2323

2424
chmod +x ${trekker}

0 commit comments

Comments
 (0)