Commit 9614acc1 authored by ihuszar's avatar ihuszar
Browse files

Updated README, added example reg instructions.

parent dbe84145
File deleted
......@@ -2,20 +2,20 @@
Tensor Image Registration Library
If you are installing TIRL from source, you may create a separate
enviroment for your installation using the provided tirlenv.yml environment
descriptor file.
If you are installing TIRL from source, you may create a separate
enviroment for your installation using the provided tirlenv.yml environment
descriptor file.
## FSL Installation
TIRL may be already installed on your system as part of FSL. To use this
TIRL may be already installed on your system as part of FSL. To use this
installation, activate the ```fslpython``` conda environment:
```shell script
source $FSLDIR/fslpython/bin/activate fslpython
```
The TIRL executable should now be accessible by typing ```tirl``` in your
The TIRL executable should now be accessible by typing ```tirl``` in your
terminal:
```shell script
......@@ -24,9 +24,9 @@ tirl
## Installation from source
If you would like to use a more recent version of TIRL than what is installed
with FSL, you can install the library from source. It is recommended that you
create a separate conda environment for this purpose, as outlined below.
If you would like to use a more recent version of TIRL than what is installed
with FSL, you can install the library from source. It is recommended that you
create a separate conda environment for this purpose, as outlined below.
1. Download the TIRL source code.
......@@ -53,32 +53,39 @@ conda activate tirlenv
```shell script
python setup.py install
```
5. On some machines, the installer may not find the openBLAS headers in the conda environment automatically, and the installer will raise an error that "lapacke.h" was not found. If this happens to you, configure this environment variable, that will allow the gcc compiler to find the required header files. Type the following in your terminal while you are within tirlenv. You must deactivate and reactivate the environment after this step.
```shell script
conda env config vars set C_INCLUDE_PATH=${CONDA_PREFIX}/include:${C_INCLUDE_PATH}
```
If the variable is set, follow step 4 to install TIRL.
## Configuration
Note: to configure TIRL, you must be within the Python environment where you
Note: to configure TIRL, you must be within the Python environment where you
installed TIRL ('tirlenv' in the above example).
To configure TIRL for your system, type ```tirl config``` in your terminal
To configure TIRL for your system, type ```tirl config``` in your terminal
window. This will allow you to edit the configuration parameters using vim.
To use another editor, e.g. nano, type ```tirl config nano```. Other options
might include subl (Sublime Text), atom (Atom), or emacs (Emacs), depending on
might include subl (Sublime Text), atom (Atom), or emacs (Emacs), depending on
what is available on your system.
Before you start using TIRL, you must make sure that the **temporary working
directory (TWD)** is set correctly. You should have write access to this
folder, and ideally it should be on a fast-access storage device such as an
NVME SSD. TIRL will use this folder to deposit large files to avoid overloading
the system memory. Files will normally disappear from this folder after a tirl
script finishes, but if you notice that the files in this folder occupy a lot
Before you start using TIRL, you must make sure that the **temporary working
directory (TWD)** is set correctly. You should have write access to this
folder, and ideally it should be on a fast-access storage device such as an
NVME SSD. TIRL will use this folder to deposit large files to avoid overloading
the system memory. Files will normally disappear from this folder after a tirl
script finishes, but if you notice that the files in this folder occupy a lot
of disk space, you should delete them manually.
## Basic test
1. Open the python shell by typing ```python``` in the terminal window (make
1. Open the python shell by typing ```python``` in the terminal window (make
sure that you have previously activated the 'tirlenv' environment).
2. Type the following in the interactive shell:
......@@ -91,7 +98,8 @@ img.preview()
### Full test ###
1. Make sure that the *coverage* library is installed in your environment:
1. Unless you used the tirlenv.yml file to create your environment, you should
first make sure that the *coverage* library is installed in your environment:
```shell script
conda install coverage
......@@ -103,5 +111,11 @@ conda install coverage
python test.py
```
If all tests are successful, a line-by-line coverage report will be generated
in HTML format that you can view in your browser.
\ No newline at end of file
If all tests are successful, a line-by-line coverage report will be generated
in HTML format that you can view in your browser.
3. To test a single module of TIRL (e.g. chain.py), run:
```shell script
python test.py test_chain
```
#!/bin/sh
# Runs the example registration pipeline
EXAMPLE="."
tirl histology_to_block --config ${EXAMPLE}/config/1_histology_to_block.json --verbose
tirl find_sites ${EXAMPLE}/3_brain_slice/*.tif --verbose
tirl block_to_slice --config ${EXAMPLE}/config/2_block_to_slice.json --verbose
tirl slice_to_volume --config ${EXAMPLE}/config/3_slice_to_volume.json --verbose
tirl combine --histo ${EXAMPLE}/stage1/fixed4_nonlinear.timg --block ${EXAMPLE}/stage2/fixed4_nonlinear.timg --slice ${EXAMPLE}/stage3/4_stage4.timg --vol ${EXAMPLE}/stage3/volume.timg --out ${EXAMPLE}/combined
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment