Skip to main content

The package deals with brain bundles images

Project description

[![license - GPL](](

# 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)

pip install tractography
or conda

conda install -c weekmo tractography

## Example 1:
#### Register two bundles

from 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

## Example 2:
#### Show all bundles in a folder
from tractography.viz import draw_brain
from os import listdir
from os.path import isfile
from 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:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tractography, version 0.1.13
Filename, size File type Python version Upload date Hashes
Filename, size tractography-0.1.13.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View
Filename, size tractography-0.1.13-py2.py3-none-any.whl (1.9 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page