-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:3d-pli/SLIX
Signed-off-by: Jan André Reuter <[email protected]>
- Loading branch information
Showing
7 changed files
with
106 additions
and
74 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
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 |
---|---|---|
|
@@ -85,43 +85,37 @@ With [`SLIXLineplotParameterGenerator`](#evaluation-of-sli-profiles), it is poss | |
|
||
## Installation of SLIX | ||
|
||
##### How to clone SLIX (for further work) | ||
```bash | ||
git clone [email protected]:3d-pli/SLIX.git | ||
cd SLIX | ||
|
||
# A virtual environment is recommended: | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
|
||
pip3 install -r requirements.txt | ||
``` | ||
|
||
##### How to install SLIX as Python package | ||
##### Install SLIX via PyPI | ||
Installing the currently available version of SLIX through PyPI is the recommended way. Use the following command to install SLIX into your Python enviroment. | ||
```bash | ||
# Install via PyPi | ||
pip install SLIX | ||
``` | ||
|
||
# Install after cloning locally | ||
##### How to install SLIX as Python package from source | ||
If you want to use the latest available version from the GitHub repository, you can use the following commands. | ||
Please note that features available here in comparison to the PyPI release might still be in development. | ||
```bash | ||
git clone [email protected]:3d-pli/SLIX.git | ||
cd SLIX | ||
pip install . | ||
``` | ||
|
||
##### Run SLIX locally | ||
|
||
##### How to clone SLIX (for further work) | ||
If you want to contribute to SLIX, clone the repository and install the requirements in a virtual environment like seen below. | ||
```bash | ||
git clone [email protected]:3d-pli/SLIX.git | ||
cd SLIX | ||
python3 SLIXParameterGenerator.py [options] | ||
python3 SLIXLineplotParameterGenerator.py [options] | ||
|
||
# alternatively, after installation of SLIX | ||
pip3 install SLIX | ||
SLIXParameterGenerator [options] | ||
SLIXLineplotParameterGenerator [options] | ||
# A virtual environment is recommended: | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
|
||
pip install -r requirements.txt | ||
``` | ||
|
||
|
||
|
||
## Evaluation of SLI Profiles | ||
|
||
`SLIXLineplotParameterGenerator` allows the evaluation of individual SLI profiles (txt-files with a list of intensity values): For each SLI profile, the maximum, minimum, number of prominent peaks, corrected peak positions, fiber direction angles, and average peak prominence are computed and stored in a text file. The user has the option to generate a plot of the SLI profile that shows the profile together with the peak positions before/after correction. The corrected peak positions are determined by calculating the geometric center of the peak tip, improving the accuracy of the determined peak positions in discretized SLI profiles. If not defined otherwise, the peak tip height corresponds to 6% of the total signal amplitude (for derivation, see [Menzel et al. (2020)](https://arxiv.org/abs/2008.01037), Appx. B). | ||
|
@@ -224,15 +218,16 @@ SLIXParameterGenerator -i [INPUT-STACK] -o [OUTPUT-FOLDER] [[parameters]] | |
|
||
The arguments listed below determine which parameter maps will be generated from the SLI image stack. If any such argument (except `–-optional`) is used, no parameter map besides the ones specified will be generated. If none of these arguments is used, all parameter maps except the optional ones will be generated: peakprominence, number of (prominent) peaks, peakwidth, peakdistance, direction angles in crossing regions. | ||
|
||
| Argument | Function | | ||
|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `--peakprominence` | Generate a parameter map (`_peakprominence.tiff`) containing the average prominence ([scipy.signal.peak_prominence](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.peak_prominences.html#scipy.signal.peak_prominences)) of an SLI profile (image pixel), normalized by the average of the SLI profile. | | ||
| `--peaks` | Generate two parameter maps (`_low_prominence_peaks.tiff` and `_high_prominence_peaks.tiff`) containing the number of peaks in an SLI profile (image pixel) with a prominence below and above the defined prominence_threshold (Default: 8% of the total signal amplitude). | | ||
| `--peakwidth` | Generate a parameter map (`_peakwidth.tiff`) containing the average peak width (in degrees) of all prominent peaks in an SLI profile. | | ||
| `--peakdistance` | Generate a parameter map (`_peakdistance.tiff`) containing the distance between two prominent peaks (in degrees) in an SLI profile. Pixels for which the SLI profile shows more/less than two prominent peaks are set to `-1`. | | ||
| `--direction` | Generate three parameter maps (`_dir_1.tiff`, `_dir_2.tiff`, `_dir_3.tiff`) indicating up to three in-plane direction angles of (crossing) fibers (in degrees). If any or all direction angles cannot be determined for an image pixel, this pixel is set to `-1` in the respective map. | | ||
| `--unit_vectors` | Generate unit vectors maps (`.nii`) from direction images. | | ||
| `--optional` | Generate four additional parameter maps: average value of each SLI profile (`_avg.tiff`), maximum value of each SLI profile (`_max.tiff`), minimum value of each SLI profile (`_min.tiff`), and in-plane direction angles (in degrees) in regions without crossings (`_dir.tiff`). Image pixels for which the SLI profile shows more than two prominent peaks are set to `-1` in the direction map. | | ||
| Argument | Function | | ||
|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `--peakprominence` | Generate a parameter map (`_peakprominence.tiff`) containing the average prominence ([scipy.signal.peak_prominence](https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.peak_prominences.html#scipy.signal.peak_prominences)) of an SLI profile (image pixel), normalized by the average of the SLI profile. | | ||
| `--peaks` | Generate two parameter maps (`_low_prominence_peaks.tiff` and `_high_prominence_peaks.tiff`) containing the number of peaks in an SLI profile (image pixel) with a prominence below and above the defined prominence_threshold (Default: 8% of the total signal amplitude). | | ||
| `--peakwidth` | Generate a parameter map (`_peakwidth.tiff`) containing the average peak width (in degrees) of all prominent peaks in an SLI profile. | | ||
| `--peakdistance` | Generate a parameter map (`_peakdistance.tiff`) containing the distance between two prominent peaks (in degrees) in an SLI profile. Pixels for which the SLI profile shows more/less than two prominent peaks are set to `-1`. | | ||
| `--direction` | Generate three parameter maps (`_dir_1.tiff`, `_dir_2.tiff`, `_dir_3.tiff`) indicating up to three in-plane direction angles of (crossing) fibers (in degrees). If any or all direction angles cannot be determined for an image pixel, this pixel is set to `-1` in the respective map. | | ||
| `--unit_vectors` | Generate unit vectors maps (`.nii`) from direction images. | | ||
| `--inclination_sign` | Generate a direction map not corrected by the 270° and without the restriction to the area of [0°;180°] which allows to search the inclination direction. | | ||
| `--optional` | Generate four additional parameter maps: average value of each SLI profile (`_avg.tiff`), maximum value of each SLI profile (`_max.tiff`), minimum value of each SLI profile (`_min.tiff`), and in-plane direction angles (in degrees) in regions without crossings (`_dir.tiff`). Image pixels for which the SLI profile shows more than two prominent peaks are set to `-1` in the direction map. | | ||
|
||
### Example | ||
The following example demonstrates the generation of the parameter maps, for two artificially crossing sections of human optic tracts (left) and the upper left corner of a coronal vervet brain section (right): | ||
|
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
Oops, something went wrong.