-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add initial draft for "getting started"
- Loading branch information
Showing
4 changed files
with
44 additions
and
2 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 |
---|---|---|
|
@@ -3,3 +3,6 @@ authors = [] | |
language = "en" | ||
multilingual = false | ||
src = "src" | ||
title = "Styx Book" | ||
|
||
[preprocessor.alerts] |
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 +1,42 @@ | ||
# Getting started | ||
|
||
> [!NOTE] | ||
> This book uses Styx wrappers from the NiWrap package, but any Styx wrapper will work the same way. | ||
To get started install the [NiWrap](https://github.com/childmindresearch/niwrap/tree/main) Python package: | ||
|
||
```sh | ||
pip install -e "git+https://github.com/childmindresearch/niwrap.git/#egg=niwrap&subdirectory=python" | ||
``` | ||
|
||
From there on running commands will be as easy as: | ||
|
||
```Python | ||
from niwrap import fsl | ||
|
||
bet_output = fsl.bet( | ||
infile="my_file.nii.gz", | ||
binary_mask=True, | ||
) | ||
``` | ||
|
||
This runs the command | ||
|
||
```sh | ||
bet my_file.nii.gz -m | ||
``` | ||
|
||
and stores all the output files for easy access in `bet_output`. | ||
|
||
These can then be used as an input to another Styx wrapper or with any other Python package like nilearn: | ||
|
||
```Python | ||
from nilearn.plotting import plot_anat | ||
|
||
plot_anat(bet_output.outfile) | ||
``` | ||
|
||
> [!TIP] | ||
> Styx includes detailed documentation about every command, argument, and output file. You should be able to just hover over any of them in your editor to view its documentation. | ||
The next chapter will explain how to use _Runners_ to control how the commands get executed and intermediate files get stored. |
This file was deleted.
Oops, something went wrong.
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