The package deals with brain bundles images
Project description
[](https://www.gnu.org/licenses/gpl-3.0.txt)
# Tractograpy
## It is a module deals withe Brain Bundles
It includes functions to read/write, visualise and register bundles
### "It's always preferred to use source code!"
## Installation:
Easy to install by using pip (recommended)
```commandline
pip install tractography
```
or conda
```commandline
conda install -c weekmo tractography
```
## Example 1:
#### Register two bundles
```python
from tractography.io import read_ply,write_trk
from tractography.registration import register
from tractography.viz import draw_brain
# Read bundles
data1 = read_ply('target.ply')
data2 = read_ply('subject.ply')
# Register bundle
aligned_bundle,mat = register(target=data1, subject=data2)
# Write to trk file
write_trk("aligned_bundle.trk", aligned_bundle)
# Export images before and after registration
draw_brain([data1,data2])
draw_brain([data1,aligned_bundle])
```
## Example 2:
#### Show all bundles in a folder
```python
from tractography.viz import draw_brain
from os import listdir
from os.path import isfile
from tractography.io import read_ply
import argparse
parser = argparse.ArgumentParser(description='Input argument parser.')
parser.add_argument('-f', type=str, help='location of files')
args = parser.parse_args()
# data_path = 'data/'
data_path = args.f
files = [data_path + f for f in listdir(data_path) if isfile(data_path + f) and f.endswith('.ply')]
brain = []
for name in files:
brain.append(read_ply(name))
draw_brain(brain)
```
Enjoy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tractography-0.1.13.tar.gz
(3.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tractography-0.1.13.tar.gz.
File metadata
- Download URL: tractography-0.1.13.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8471352b5bd7ed92d1c45eedba6846d3a61c77dc1309b2dd744afd3686d7f62f
|
|
| MD5 |
8cc634b64a79e0ecb933a640826c09ce
|
|
| BLAKE2b-256 |
5a24a6964a8761e310d90dfcbc264e16ac024cb0b0d9dd6d0ffe726085bc1ac5
|
File details
Details for the file tractography-0.1.13-py2.py3-none-any.whl.
File metadata
- Download URL: tractography-0.1.13-py2.py3-none-any.whl
- Upload date:
- Size: 1.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1b94737fb8fa9655c5e9d3337a6164bbd5d338833873f091fc3caa91aed59ef
|
|
| MD5 |
214ead85592d9d2e89e5373af0bca5b1
|
|
| BLAKE2b-256 |
71ea2ba9c4416a35262cfb827457caf30f8cd75ca78a6ee56f561a06b5f821bc
|