Commit a2979274 authored by inhuszar's avatar inhuszar
Browse files

Version commit: v2.1.0b1-release

parents
# _______ _____ _____ _
# |__ __| |_ _| | __ \ | |
# | | | | | |__) | | |
# | | | | | _ / | |
# | | _| |_ | | \ \ | |____
# |_| |_____| |_| \_\ |______|
#
# Tensor Image Registration Library
# Author: Istvan N. Huszar
# Copyright (C) 2018-2020 University of Oxford
# Part of the FMRIB Software Library (FSL)
FSL Licence
FMRIB Software Library, Release 6.0.4 (c) 2020, The University of Oxford
(the "Software")
The Software remains the property of the University of Oxford ("the
University").
The Software is distributed "AS IS" under this Licence solely for
non-commercial use in the hope that it will be useful, but in order
that the University as a charitable foundation protects its assets for
the benefit of its educational and research purposes, the University
makes clear that no condition is made or to be implied, nor is any
warranty given or to be implied, as to the accuracy of the Software,
or that it will be suitable for any particular purpose or for use
under any specific conditions. Furthermore, the University disclaims
all responsibility for the use which is made of the Software. It
further disclaims any liability for the outcomes arising from using
the Software.
The Licensee agrees to indemnify the University and hold the
University harmless from and against any and all claims, damages and
liabilities asserted by third parties (including claims for
negligence) which arise directly or indirectly from the use of the
Software or the sale of any products based on the Software.
No part of the Software may be reproduced, modified, transmitted or
transferred in any form or by any means, electronic or mechanical,
without the express permission of the University. The permission of
the University is not required if the said reproduction, modification,
transmission or transference is done without financial return, the
conditions of this Licence are imposed upon the receiver of the
product, and all original and amended source code is included in any
transmitted product. You may be held legally responsible for any
copyright infringement that is caused or encouraged by your failure to
abide by these terms and conditions.
You are not permitted under this Licence to use this Software
commercially. Use for which any financial return is received shall be
defined as commercial use, and includes (1) integration of all or part
of the source code or the Software into a product for sale or license
by or on behalf of Licensee to third parties or (2) use of the
Software or any derivative of it for research with the final aim of
developing software products for sale or license to a third party or
(3) use of the Software or any derivative of it for research with the
final aim of developing non-software products for sale or license to a
third party, or (4) use of the Software to provide any service to an
external organisation for which payment is received. If you are
interested in using the Software commercially, please contact Oxford
University Innovation ("OUI"), the technology transfer company of the
University, to negotiate a licence. Contact details are:
Innovation@innovation.ox.ac.uk quoting reference BS/9564.
include logo/logo.svg
include logo/logo.png
include example/*
# tirl
Tensor Image Registration Library
## Installation
1. Download the TIRL source code.
```
mkdir -p ~/Applications/
cd ~/Applications
git clone https://git.fmrib.ox.ac.uk/ihuszar/tirl.git
cd tirl
```
2. Create virtual environment for registration projects with TIRL.
```
conda env create -n tirlenv -f tirlenv.yml
```
3. Activate the new tirlenv environment.
```
conda activate tirlenv
```
4. Install TIRL from its source directory.
```
python setup.py install
```
## Configuration
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
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
what is available on your system.
## Basic test
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:
```
import tirl
img = tirl.testimg()
img.preview()
```
{% set version = "2.1.0b1" %}
package:
name: tirl
version: {{ version }}
# build:
# noarch: python
# script: python setup.py install --single-version-externally-managed --record=record.txt
source:
path: ../
requirements:
build:
- {{ compiler('cxx') }}
- python
- pip
- cython
- numpy
host:
- python
run:
- attrdict
- dask
- dill
- imagecodecs
- imageio
- joblib
- mayavi
- matplotlib
- nibabel
- nlopt
- numba
- numpy
- openblas
- openslide
- openslide-python
- pillow
- psutil
- pygments
- python
- python-dateutil
- scikit-image
- scikit-learn
- scipy
- tifffile
test:
imports:
- tirl
- tirl.fsl
- tirl.chain
- tirl.tfield
- tirl.timage
- tirl.domain
- tirl.point
- tirl.cmodules
- tirl.operations
- tirl.interpolators
- tirl.parameters
- tirl.transformations.basic
- tirl.transformations.linear
- tirl.transformations.nonlinear
- tirl.costs
- tirl.optimisation
- tirl.regularisers
- tirl.scripts
- tirl.tirlvision
- tirl.usermodules
commands:
- tirl home
- tirl version
- tirl config
- tirl info
- tirl module
- tirl histology_to_block
- tirl find_sites
- tirl block_to_slice
- tirl slice_to_volume
- tirl prepare_multi_stage3
- tirl combine
- tirl stripbg
- tirl extract_blocks
- tirl crop_centre
- tirl sliceview
about:
home: https://git.fmrib.ox.ac.uk/fsl/tirl/
license: FSL
license_file: LICENSE.txt
summary: Tensor Image Registration Library
dev_url: https://git.fmrib.ox.ac.uk/fsl/tirl/
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonLink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonLink.sh tirl
fi
conda env config vars set TIRLHOME=$PREFIX/tirl
if [ -e ${FSLDIR}/etc/fslconf/requestFSLpythonUnlink.sh ]; then
$FSLDIR/etc/fslconf/requestFSLpythonUnlink.sh tirl
fi
[01-07-2020 20:29:07] The program started with the command: /storage/app/anaconda3/envs/tirltest/bin/tirl find_sites ../3_brain_slice/0.tif ../3_brain_slice/1.tif ../3_brain_slice/2.tif ../3_brain_slice/3.tif
[01-07-2020 20:29:07] Brain slice images in sampling order (starting from the most intact):
../3_brain_slice/1.tif
../3_brain_slice/0.tif
../3_brain_slice/2.tif
../3_brain_slice/3.tif
[01-07-2020 20:29:09] -180.00000500895632 deg: -0.045745412537627164
[01-07-2020 20:29:09] -150.00000500895635 deg: -0.048706787412922496
[01-07-2020 20:29:09] -120.00000500895635 deg: -0.042858345575760425
[01-07-2020 20:29:09] -90.00000500895636 deg: -0.04541259699818259
[01-07-2020 20:29:09] -60.00000500895637 deg: -0.04290029950031593
[01-07-2020 20:29:09] -30.00000500895638 deg: -0.05388287377259222
[01-07-2020 20:29:09] -5.008956385419706e-06 deg: -0.18040256821102105
[01-07-2020 20:29:09] 29.999994991043607 deg: -0.051733030138737916
[01-07-2020 20:29:09] 59.9999949910436 deg: -0.04149811982621273
[01-07-2020 20:29:09] 89.99999499104356 deg: -0.04628231478308848
[01-07-2020 20:29:09] 119.99999499104358 deg: -0.04140008308100193
[01-07-2020 20:29:09] 149.9999949910436 deg: -0.046251929522805074
[01-07-2020 20:29:09] 179.99999499104356 deg: -0.045745412537627164
[01-07-2020 20:29:09] The 3 best initialisation angles: [-5.00895639e-06 -3.00000050e+01 2.99999950e+01] deg
[01-07-2020 20:29:09] -180.00000500895632 deg: -0.10744589039408896
[01-07-2020 20:29:09] -150.00000500895635 deg: -0.09519266236061148
[01-07-2020 20:29:09] -120.00000500895635 deg: -0.0705849055221056
[01-07-2020 20:29:09] -90.00000500895636 deg: -0.06170639056295646
[01-07-2020 20:29:09] -60.00000500895637 deg: -0.0644338281559979
[01-07-2020 20:29:09] -30.00000500895638 deg: -0.08223938702320402
[01-07-2020 20:29:09] -5.008956385419706e-06 deg: -0.11199894741167464
[01-07-2020 20:29:09] 29.999994991043607 deg: -0.07221230008473142
[01-07-2020 20:29:09] 59.9999949910436 deg: -0.06321931009556699
[01-07-2020 20:29:09] 89.99999499104356 deg: -0.060606746078199464
[01-07-2020 20:29:09] 119.99999499104358 deg: -0.06798606111409179
[01-07-2020 20:29:09] -180.00000500895632 deg: -0.09091451814633175
[01-07-2020 20:29:09] 149.9999949910436 deg: -0.08420288228789502
[01-07-2020 20:29:09] -150.00000500895635 deg: -0.09075021957657328
[01-07-2020 20:29:09] 179.99999499104356 deg: -0.10744589039408896
[01-07-2020 20:29:09] The 3 best initialisation angles: [-5.00895639e-06 -1.80000005e+02 1.79999995e+02] deg
[01-07-2020 20:29:09] -120.00000500895635 deg: -0.06798578280500853
[01-07-2020 20:29:09] -90.00000500895636 deg: -0.05728303849240606
[01-07-2020 20:29:09] -60.00000500895637 deg: -0.06907560430871174
[01-07-2020 20:29:09] -30.00000500895638 deg: -0.07872589228066627
[01-07-2020 20:29:09] -5.008956385419706e-06 deg: -0.0985652868191463
[01-07-2020 20:29:09] 29.999994991043607 deg: -0.07796656514954033
[01-07-2020 20:29:09] 59.9999949910436 deg: -0.06606525905179497
[01-07-2020 20:29:09] 89.99999499104356 deg: -0.05521386659503872
[01-07-2020 20:29:09] 119.99999499104358 deg: -0.064974507439753
[01-07-2020 20:29:09] 149.9999949910436 deg: -0.0931632787033768
[01-07-2020 20:29:09] 179.99999499104356 deg: -0.09091451814633175
[01-07-2020 20:29:09] The 3 best initialisation angles: [-5.00895639e-06 1.49999995e+02 -1.80000005e+02] deg
[01-07-2020 20:29:10] Co-optimising scale and translation at -5.008956385419706e-06 deg...
[01-07-2020 20:29:10] Co-optimising scale and translation at -5.008956385419706e-06 deg...
[01-07-2020 20:29:11] Co-optimising scale and translation at -5.008956385419706e-06 deg...
[01-07-2020 20:29:11] Co-optimising scale and translation at -30.00000500895638 deg...
[01-07-2020 20:29:12] Co-optimising scale and translation at -180.00000500895632 deg...
[01-07-2020 20:29:12] Co-optimising scale and translation at 149.9999949910436 deg...
[01-07-2020 20:29:13] Co-optimising scale and translation at 29.999994991043607 deg...
[01-07-2020 20:29:13] Best parameters after rotation search: [ 0.00603744 1.0146894 1.0033262 1.3007121 -0.5378508 ]
[01-07-2020 20:29:13] Scale: 30, smoothing: 0 px...
[01-07-2020 20:29:13] Co-optimising scale and translation at 179.99999499104356 deg...
[01-07-2020 20:29:13] Best parameters after rotation search: [-0.01734371 1.0058154 1.0059438 3.210272 -0.12759805]
[01-07-2020 20:29:13] Scale: 30, smoothing: 0 px...
[01-07-2020 20:29:13] Co-optimising scale and translation at -180.00000500895632 deg...
[01-07-2020 20:29:14] Best parameters after rotation search: [0.00729797 0.9913171 1.0070486 3.4777234 0.14779954]
[01-07-2020 20:29:14] Scale: 30, smoothing: 0 px...
[01-07-2020 20:29:27] Scale: 20, smoothing: 0 px...
[01-07-2020 20:29:31] Scale: 20, smoothing: 0 px...
[01-07-2020 20:29:32] Scale: 20, smoothing: 0 px...
[01-07-2020 20:29:54] Pairwise registration No. 1 identified the following insertion sites:
[[ 504.05644735 1727.62570559]
[ 536.74237474 790.37832837]
[1652.66270948 1834.71258978]
[1731.99336443 736.11891589]]
[01-07-2020 20:29:54] Pairwise registration No. 2 identified the following insertion sites:
[[ 498.69168 1737.5212 ]
[ 534.7987 786.5869 ]
[1001.6692 392.39252]]
[01-07-2020 20:29:54] Pairwise registration No. 3 identified the following insertion sites:
[[ 894.31464 1128.3462 ]
[ 876.6144 1401.3779 ]]
[01-07-2020 20:29:55] Created insertion site figure.
[01-07-2020 20:29:55] Insertion site search complete. Found 9 site(s).
../3_brain_slice/1.tif
../3_brain_slice/0.tif
../3_brain_slice/2.tif
../3_brain_slice/3.tif
\ No newline at end of file
5.040564473452108132e+02 1.727625705591815176e+03
5.367423747434155530e+02 7.903783283702911149e+02
1.652662709479971454e+03 1.834712589777130688e+03
1.731993364431908503e+03 7.361189158892022988e+02
4.986916809082031250e+02 1.737521240234375000e+03
5.347987060546875000e+02 7.865869140625000000e+02
1.001669189453125000e+03 3.923925170898437500e+02
8.943146362304687500e+02 1.128346191406250000e+03
8.766143798828125000e+02 1.401377929687500000e+03
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