This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
from glob import glob | |
import os | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from hashlib import md5 | |
import rdflib | |
from rdflib.namespace import Namespace, NamespaceManager, RDF, FOAF, XSD | |
from rdflib import URIRef, BNode, Literal | |
from uuid import uuid1 | |
from socket import getfqdn | |
db_location = os.path.join(os.getcwd(), 'database.ttl') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Convert dicom 2 nrrd | |
def dicom2nrrd(dicomdir, out_prefix): | |
import os | |
from nipype.interfaces.base import CommandLine | |
cmd = CommandLine('DWIConvert --inputDicomDirectory %s --outputVolume %s.nrrd' % (dicomdir, out_prefix)) | |
cmd.run() | |
return os.path.abspath('%s.nrrd' % out_prefix) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Demo to return a file with a uri delivered by a virtuoso server | |
import md5 | |
import json | |
import os | |
from urlparse import urlparse | |
import cherrypy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
img = nib.load(imgfile) | |
bvecs = np.genfromtxt(bvecs) | |
def get_trackvis_mat(aff): | |
"""based on input from ruopeng @ tracvkis | |
""" | |
for i in range(10): | |
#aff = aff.dot(np.linalg.inv(np.eye(3) + 3*aff.T.dot(aff)).dot(3*np.eye(3) + aff.T.dot(aff))) | |
aff = 0.5 * (aff + np.linalg.inv(aff.T)) | |
return np.dot(aff, np.array([[1,0,0],[0,-1,0],[0,0,1]])) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# <nbformat>3</nbformat> | |
# <codecell> | |
import argparse | |
import os | |
from surfer import Brain | |
import scipy.io as sio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rocessing regular_brain_ec_tmp0000 | |
Final result: | |
1.000000 0.000151 0.000000 -0.017864 | |
0.000000 1.000000 -0.000121 0.007878 | |
0.000000 0.000000 1.000000 -0.000000 | |
0.000000 0.000000 0.000000 1.000000 | |
processing regular_brain_ec_tmp0001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building PROV-N 0.0.2-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ prov-n --- | |
[INFO] Deleting /software/nipy-repo/ProvToolbox/prov-n/target | |
[INFO] | |
[INFO] --- antlr3-maven-plugin:3.4:antlr (default) @ prov-n --- | |
[INFO] ANTLR: Processing source directory /software/nipy-repo/ProvToolbox/prov-n/src/main/antlr3 | |
ANTLR Parser Generator Version 3.4 |