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
| #DOES NOT WORK: GIFTI READ/WRITE is broken | |
| import nibabel as nb | |
| import nibabel.gifti as gifti | |
| # load combined file | |
| # created with: mris_convert --combinesurfs lh.pial rh.pial ./pial.gii | |
| surf = gifti.read('pial.gii') | |
| #load orig affine transform | |
| ao = nb.load('orig.nii').get_affine() |
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 nipype import logging, config | |
| config.set('logging', 'workflow_level', 'DEBUG') | |
| logging.update_logging(config) | |
| from nipype.pipeline.engine import Node, Workflow | |
| from nipype.interfaces.utility import Function | |
| def createtwofiles(): |
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
| from nipype.interfaces.fsl import BET | |
| res = BET(in_file='struct.nii').run() | |
| import nipype.external.prov as prov | |
| import nipype.external.provgraph as pg | |
| g = prov.json.load(open('provenance.json'), cls=prov.ProvBundle.JSONDecoder) | |
| dot = pg.prov_to_dot(g) | |
| dot.set_dpi(120) | |
| dot.write_png('test.png') |
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
| def isMoco(dcmfile): | |
| """Determine if a dicom file is a mocoseries | |
| """ | |
| import subprocess | |
| cmd = ['mri_probedicom', '--i', dcmfile, '--t', '8', '103e'] | |
| proc = subprocess.Popen(cmd, | |
| stdout=subprocess.PIPE, | |
| stderr=subprocess.PIPE) | |
| stdout, stderr = proc.communicate() | |
| return stdout.strip().startswith('MoCoSeries') |
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
| name of display: :0.0 | |
| display: :0 screen: 0 | |
| direct rendering: Yes | |
| server glx vendor string: Chromium | |
| server glx version string: 1.3 Chromium | |
| server glx extensions: | |
| GLX_ARB_multisample, GLX_EXT_texture_from_pixmap, GLX_SGIX_fbconfig, | |
| GLX_ARB_get_proc_address | |
| client glx vendor string: Chromium | |
| client glx version string: 1.3 Chromium |
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
| bundle | |
| prefix foaf <http://xmlns.com/foaf/0.1/> | |
| prefix nipype <http://nipy.org/nipype/terms/0.6> | |
| prefix dcterms <http://purl.org/dc/terms/> | |
| activity(nipype:d21d596e2e0b11e2a1c714109fcf6ae7, 2012-11-14T03:31:39.567795, 2012-11-14T03:31:47.918502, [nipype:command="bet struct.nii /software/temp/nipype-tutorial/temp/provenance/struct_brain.nii.gz", prov:label="BET", prov:type='nipype:BET', nipype:working_directory="/software/temp/nipype-tutorial/temp/provenance", nipype:command_path="/usr/local/fsl/bin/bet", nipype:return_code=0, nipype:platform="Darwin-12.2.0-x86_64-i386-64bit", nipype:dependencies="/usr/local/fsl/bin/bet: is not an object file", nipype:duration="0.0" %% xsd:float, foaf:host="warpspeed.local"]) | |
| collection(nipype:d21e243a2e0b11e2914a14109fcf6ae7, [prov:type='nipype:environment']) | |
| used(nipype:d21d596e2e0b11e2a1c714109fcf6ae7, nipype:d21e243a2e0b11e2914a14109fcf6ae7, -) | |
| entity(nipype:d21e2aeb2e0b11e2884f14109fcf6ae7, [prov:type='nipype:environment', nipype:ANTSPATH="/software/ANTSb |
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 |
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
| # -*- coding: utf-8 -*- | |
| # <nbformat>3</nbformat> | |
| # <codecell> | |
| import argparse | |
| import os | |
| from surfer import Brain | |
| import scipy.io as sio |