Skip to content

Commit

Permalink
Merge pull request #486 from MarcCote/streamlines_tck
Browse files Browse the repository at this point in the history
MRG: Support TCK streamlines file format

This PR adds support for MRtrix streamlines file to the Streamlines API (#391).

Eventually, in a future PR, I will add some functions that allows easy conversion between all different formats. For now, going from TRK to TCK is easy. See
https://gist.github.com/MarcCote/ea6842cc4c3950f7596fc3c8a0be0154

Converting from TCK to TRK requires additional information from a reference anatomy. See
https://gist.github.com/MarcCote/ebf0ae83a9202eb96d1dfbb949cd98af
  • Loading branch information
matthew-brett authored Apr 18, 2017
2 parents b077a63 + d2e08da commit 3d59146
Show file tree
Hide file tree
Showing 17 changed files with 814 additions and 64 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ matrix:
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS="numpy==1.6.0" PYDICOM=0
- DEPENDS="numpy==1.7.1" PYDICOM=0
# Absolute minimum dependencies plus oldest MPL
# Check these against:
# nibabel/info.py
# doc/source/installation.rst
# requirements.txt
- python: 2.7
env:
- DEPENDS="numpy==1.6.0 matplotlib==1.3.1" PYDICOM=0
- DEPENDS="numpy==1.7.1 matplotlib==1.3.1" PYDICOM=0
# Minimum pydicom dependency
- python: 2.7
env:
- DEPENDS="numpy==1.6.0 pydicom==0.9.7 pillow==2.6"
- DEPENDS="numpy==1.7.1 pydicom==0.9.7 pillow==2.6"
# test against numpy 1.7
- python: 2.7
env:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Requirements
.travis.yml
* Python_ 2.7, or >= 3.4
* NumPy_ 1.6 or greater
* NumPy_ 1.7 or greater
* Six_ 1.3 or greater
* SciPy_ (optional, for full SPM-ANALYZE support)
* PyDICOM_ 0.9.7 or greater (optional, for DICOM support)
Expand Down
2 changes: 1 addition & 1 deletion nibabel/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def cmp_pkg_version(version_str, pkg_version_str=__version__):
# doc/source/installation.rst
# requirements.txt
# .travis.yml
NUMPY_MIN_VERSION = '1.6.0'
NUMPY_MIN_VERSION = '1.7.1'
PYDICOM_MIN_VERSION = '0.9.7'
SIX_MIN_VERSION = '1.3'

Expand Down
5 changes: 4 additions & 1 deletion nibabel/streamlines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
from .tractogram_file import ExtensionWarning

from .trk import TrkFile
from .tck import TckFile

# List of all supported formats
FORMATS = {".trk": TrkFile}
FORMATS = {".trk": TrkFile,
".tck": TckFile
}


def is_supported(fileobj):
Expand Down
Loading

0 comments on commit 3d59146

Please sign in to comment.