{"action":"created","comment":{"url":"https://api.github.com/repos/nipy/dipy/pulls/comments/80255228","id":80255228,"diff_hunk":"@@ -0,0 +1,151 @@\n+from __future__ import division, print_function, absolute_import\n+\n+import logging\n+import numpy as np\n+import os.path\n+\n+import nibabel as nib\n+\n+from dipy.core.gradients import gradient_table\n+from dipy.io.gradients import read_bvals_bvecs\n+from dipy.reconst.dti import (TensorModel, color_fa, fractional_anisotropy,\n+                              geodesic_anisotropy, mean_diffusivity,\n+                              axial_diffusivity, radial_diffusivity,\n+                              lower_triangular, mode as get_mode)\n+from dipy.workflows.workflow import Workflow\n+\n+\n+class ReconstDtiFlow(Workflow):\n+    @classmethod\n+    def get_short_name(cls):\n+        return 'dti'\n+\n+    def run(self, input_files, bvalues, bvectors, mask_files, b0_threshold=0.0,\n+            out_dir='', out_tensor='tensors.nii.gz', out_fa='fa.nii.gz',\n+            out_ga='ga.nii.gz', out_rgb='rgb.nii.gz', out_md='md.nii.gz',\n+            out_ad='ad.nii.gz', out_rd='rd.nii.gz', out_mode='mode.nii.gz',\n+            out_evec='evecs.nii.gz', out_eval='evals.nii.gz'):\n+\n+        \"\"\" Workflow for tensor reconstruction and DTI metrics computing.\n+        It a tensor recontruction on the files by 'globing' ``input_files`` and\n+        saves the dti metrics in a directory specified by ``out_dir``.\n+\n+        Parameters\n+        ----------\n+        input_files : string\n+            Path to the input volumes. This path may contain wildcards to\n+            process multiple inputs at once.\n+        bvalues : string\n+            Path to the bvalues files. This path may contain wildcards to use\n+            multiple bvalues files at once.\n+        bvectors : string\n+            Path to the bvalues files. This path may contain wildcards to use\n+            multiple bvalues files at once.\n+        mask_files : string\n+            Path to the input masks. This path may contain wildcards to use\n+            multiple masks at once. (default: No mask used)\n+        b0_threshold : float, optional\n+            Threshold used to find b=0 directions (default 0.0)\n+        out_dir : string, optional\n+            Output directory (default input file directory)\n+        out_tensor : string, optional\n+            Name of the tensors volume to be saved (default 'tensors.nii.gz')\n+        out_fa : string, optional\n+            Name of the fractionnal anisotropy volume to be saved\n+            (default 'fa.nii.gz')\n+        out_ga : string, optional\n+            Name of the geodesic anisotropy volume to be saved\n+            (default 'ga.nii.gz')\n+        out_rgb : string, optional\n+            Name of the color fa volume to be saved (default 'rgb.nii.gz')\n+        out_md : string, optional\n+            Name of the mean diffusivity volume to be saved\n+            (default 'md.nii.gz')\n+        out_ad : string, optional\n+            Name of the axial diffusivity volume to be saved\n+            (default 'ad.nii.gz')\n+        out_rd : string, optional\n+            Name of the radial diffusivity volume to be saved\n+            (default 'rd.nii.gz')\n+        out_mode : string, optional\n+            Name of the mode volume to be saved (default 'mode.nii.gz')\n+        out_evec : string, optional\n+            Name of the eigen vectors volume to be saved\n+            (default 'evecs.nii.gz')\n+        out_eval : string, optional\n+            Name of the eigen vvalues to be saved (default 'evals.nii.gz')","path":"dipy/workflows/reconst.py","position":76,"original_position":76,"commit_id":"d332698657f7e7c74529cc82dfc8a468ac25f54f","original_commit_id":"d332698657f7e7c74529cc82dfc8a468ac25f54f","user":{"login":"arokem","id":118582,"avatar_url":"https://avatars.githubusercontent.com/u/118582?v=3","gravatar_id":"","url":"https://api.github.com/users/arokem","html_url":"https://github.com/arokem","followers_url":"https://api.github.com/users/arokem/followers","following_url":"https://api.github.com/users/arokem/following{/other_user}","gists_url":"https://api.github.com/users/arokem/gists{/gist_id}","starred_url":"https://api.github.com/users/arokem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arokem/subscriptions","organizations_url":"https://api.github.com/users/arokem/orgs","repos_url":"https://api.github.com/users/arokem/repos","events_url":"https://api.github.com/users/arokem/events{/privacy}","received_events_url":"https://api.github.com/users/arokem/received_events","type":"User","site_admin":false},"body":"\"eigen vvalues\" => \"eigenvalues\"","created_at":"2016-09-23T14:26:52Z","updated_at":"2016-09-23T14:26:52Z","html_url":"https://github.com/nipy/dipy/pull/1122#discussion_r80255228","pull_request_url":"https://api.github.com/repos/nipy/dipy/pulls/1122","_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments/80255228"},"html":{"href":"https://github.com/nipy/dipy/pull/1122#discussion_r80255228"},"pull_request":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1122"}}},"pull_request":{"url":"https://api.github.com/repos/nipy/dipy/pulls/1122","id":86518323,"html_url":"https://github.com/nipy/dipy/pull/1122","diff_url":"https://github.com/nipy/dipy/pull/1122.diff","patch_url":"https://github.com/nipy/dipy/pull/1122.patch","issue_url":"https://api.github.com/repos/nipy/dipy/issues/1122","number":1122,"state":"open","locked":false,"title":"Add the reconst_dti workflow","user":{"login":"matthieudumont","id":1280738,"avatar_url":"https://avatars.githubusercontent.com/u/1280738?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieudumont","html_url":"https://github.com/matthieudumont","followers_url":"https://api.github.com/users/matthieudumont/followers","following_url":"https://api.github.com/users/matthieudumont/following{/other_user}","gists_url":"https://api.github.com/users/matthieudumont/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieudumont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieudumont/subscriptions","organizations_url":"https://api.github.com/users/matthieudumont/orgs","repos_url":"https://api.github.com/users/matthieudumont/repos","events_url":"https://api.github.com/users/matthieudumont/events{/privacy}","received_events_url":"https://api.github.com/users/matthieudumont/received_events","type":"User","site_admin":false},"body":"DTI reconstruction workflow and some minor comments correction.","created_at":"2016-09-23T14:03:29Z","updated_at":"2016-09-23T14:33:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5e6075ad719b1c9293b94049ce5cb75e644b43ae","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nipy/dipy/pulls/1122/commits","review_comments_url":"https://api.github.com/repos/nipy/dipy/pulls/1122/comments","review_comment_url":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nipy/dipy/issues/1122/comments","statuses_url":"https://api.github.com/repos/nipy/dipy/statuses/d332698657f7e7c74529cc82dfc8a468ac25f54f","head":{"label":"matthieudumont:recons_dti_workflow","ref":"recons_dti_workflow","sha":"d332698657f7e7c74529cc82dfc8a468ac25f54f","user":{"login":"matthieudumont","id":1280738,"avatar_url":"https://avatars.githubusercontent.com/u/1280738?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieudumont","html_url":"https://github.com/matthieudumont","followers_url":"https://api.github.com/users/matthieudumont/followers","following_url":"https://api.github.com/users/matthieudumont/following{/other_user}","gists_url":"https://api.github.com/users/matthieudumont/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieudumont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieudumont/subscriptions","organizations_url":"https://api.github.com/users/matthieudumont/orgs","repos_url":"https://api.github.com/users/matthieudumont/repos","events_url":"https://api.github.com/users/matthieudumont/events{/privacy}","received_events_url":"https://api.github.com/users/matthieudumont/received_events","type":"User","site_admin":false},"repo":{"id":11260222,"name":"dipy","full_name":"matthieudumont/dipy","owner":{"login":"matthieudumont","id":1280738,"avatar_url":"https://avatars.githubusercontent.com/u/1280738?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieudumont","html_url":"https://github.com/matthieudumont","followers_url":"https://api.github.com/users/matthieudumont/followers","following_url":"https://api.github.com/users/matthieudumont/following{/other_user}","gists_url":"https://api.github.com/users/matthieudumont/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieudumont/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieudumont/subscriptions","organizations_url":"https://api.github.com/users/matthieudumont/orgs","repos_url":"https://api.github.com/users/matthieudumont/repos","events_url":"https://api.github.com/users/matthieudumont/events{/privacy}","received_events_url":"https://api.github.com/users/matthieudumont/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matthieudumont/dipy","description":"Diffusion MR Imaging in Python","fork":true,"url":"https://api.github.com/repos/matthieudumont/dipy","forks_url":"https://api.github.com/repos/matthieudumont/dipy/forks","keys_url":"https://api.github.com/repos/matthieudumont/dipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matthieudumont/dipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matthieudumont/dipy/teams","hooks_url":"https://api.github.com/repos/matthieudumont/dipy/hooks","issue_events_url":"https://api.github.com/repos/matthieudumont/dipy/issues/events{/number}","events_url":"https://api.github.com/repos/matthieudumont/dipy/events","assignees_url":"https://api.github.com/repos/matthieudumont/dipy/assignees{/user}","branches_url":"https://api.github.com/repos/matthieudumont/dipy/branches{/branch}","tags_url":"https://api.github.com/repos/matthieudumont/dipy/tags","blobs_url":"https://api.github.com/repos/matthieudumont/dipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matthieudumont/dipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matthieudumont/dipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/matthieudumont/dipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matthieudumont/dipy/statuses/{sha}","languages_url":"https://api.github.com/repos/matthieudumont/dipy/languages","stargazers_url":"https://api.github.com/repos/matthieudumont/dipy/stargazers","contributors_url":"https://api.github.com/repos/matthieudumont/dipy/contributors","subscribers_url":"https://api.github.com/repos/matthieudumont/dipy/subscribers","subscription_url":"https://api.github.com/repos/matthieudumont/dipy/subscription","commits_url":"https://api.github.com/repos/matthieudumont/dipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/matthieudumont/dipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/matthieudumont/dipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/matthieudumont/dipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/matthieudumont/dipy/contents/{+path}","compare_url":"https://api.github.com/repos/matthieudumont/dipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matthieudumont/dipy/merges","archive_url":"https://api.github.com/repos/matthieudumont/dipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matthieudumont/dipy/downloads","issues_url":"https://api.github.com/repos/matthieudumont/dipy/issues{/number}","pulls_url":"https://api.github.com/repos/matthieudumont/dipy/pulls{/number}","milestones_url":"https://api.github.com/repos/matthieudumont/dipy/milestones{/number}","notifications_url":"https://api.github.com/repos/matthieudumont/dipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matthieudumont/dipy/labels{/name}","releases_url":"https://api.github.com/repos/matthieudumont/dipy/releases{/id}","deployments_url":"https://api.github.com/repos/matthieudumont/dipy/deployments","created_at":"2013-07-08T17:12:03Z","updated_at":"2015-05-04T13:49:11Z","pushed_at":"2016-09-23T13:55:38Z","git_url":"git://github.com/matthieudumont/dipy.git","ssh_url":"git@github.com:matthieudumont/dipy.git","clone_url":"https://github.com/matthieudumont/dipy.git","svn_url":"https://github.com/matthieudumont/dipy","homepage":"http://dipy.org","size":18992,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nipy:master","ref":"master","sha":"d0bee8c811daf00c5f9c153168ccbc82fa3b5557","user":{"login":"nipy","id":233707,"avatar_url":"https://avatars.githubusercontent.com/u/233707?v=3","gravatar_id":"","url":"https://api.github.com/users/nipy","html_url":"https://github.com/nipy","followers_url":"https://api.github.com/users/nipy/followers","following_url":"https://api.github.com/users/nipy/following{/other_user}","gists_url":"https://api.github.com/users/nipy/gists{/gist_id}","starred_url":"https://api.github.com/users/nipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipy/subscriptions","organizations_url":"https://api.github.com/users/nipy/orgs","repos_url":"https://api.github.com/users/nipy/repos","events_url":"https://api.github.com/users/nipy/events{/privacy}","received_events_url":"https://api.github.com/users/nipy/received_events","type":"Organization","site_admin":false},"repo":{"id":505209,"name":"dipy","full_name":"nipy/dipy","owner":{"login":"nipy","id":233707,"avatar_url":"https://avatars.githubusercontent.com/u/233707?v=3","gravatar_id":"","url":"https://api.github.com/users/nipy","html_url":"https://github.com/nipy","followers_url":"https://api.github.com/users/nipy/followers","following_url":"https://api.github.com/users/nipy/following{/other_user}","gists_url":"https://api.github.com/users/nipy/gists{/gist_id}","starred_url":"https://api.github.com/users/nipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nipy/subscriptions","organizations_url":"https://api.github.com/users/nipy/orgs","repos_url":"https://api.github.com/users/nipy/repos","events_url":"https://api.github.com/users/nipy/events{/privacy}","received_events_url":"https://api.github.com/users/nipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nipy/dipy","description":"Diffusion MR Imaging in Python","fork":false,"url":"https://api.github.com/repos/nipy/dipy","forks_url":"https://api.github.com/repos/nipy/dipy/forks","keys_url":"https://api.github.com/repos/nipy/dipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nipy/dipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nipy/dipy/teams","hooks_url":"https://api.github.com/repos/nipy/dipy/hooks","issue_events_url":"https://api.github.com/repos/nipy/dipy/issues/events{/number}","events_url":"https://api.github.com/repos/nipy/dipy/events","assignees_url":"https://api.github.com/repos/nipy/dipy/assignees{/user}","branches_url":"https://api.github.com/repos/nipy/dipy/branches{/branch}","tags_url":"https://api.github.com/repos/nipy/dipy/tags","blobs_url":"https://api.github.com/repos/nipy/dipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nipy/dipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nipy/dipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/nipy/dipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nipy/dipy/statuses/{sha}","languages_url":"https://api.github.com/repos/nipy/dipy/languages","stargazers_url":"https://api.github.com/repos/nipy/dipy/stargazers","contributors_url":"https://api.github.com/repos/nipy/dipy/contributors","subscribers_url":"https://api.github.com/repos/nipy/dipy/subscribers","subscription_url":"https://api.github.com/repos/nipy/dipy/subscription","commits_url":"https://api.github.com/repos/nipy/dipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/nipy/dipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/nipy/dipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/nipy/dipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/nipy/dipy/contents/{+path}","compare_url":"https://api.github.com/repos/nipy/dipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nipy/dipy/merges","archive_url":"https://api.github.com/repos/nipy/dipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nipy/dipy/downloads","issues_url":"https://api.github.com/repos/nipy/dipy/issues{/number}","pulls_url":"https://api.github.com/repos/nipy/dipy/pulls{/number}","milestones_url":"https://api.github.com/repos/nipy/dipy/milestones{/number}","notifications_url":"https://api.github.com/repos/nipy/dipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nipy/dipy/labels{/name}","releases_url":"https://api.github.com/repos/nipy/dipy/releases{/id}","deployments_url":"https://api.github.com/repos/nipy/dipy/deployments","created_at":"2010-02-06T11:43:08Z","updated_at":"2016-09-19T21:47:57Z","pushed_at":"2016-09-23T14:03:30Z","git_url":"git://github.com/nipy/dipy.git","ssh_url":"git@github.com:nipy/dipy.git","clone_url":"https://github.com/nipy/dipy.git","svn_url":"https://github.com/nipy/dipy","homepage":"http://dipy.org","size":41954,"stargazers_count":97,"watchers_count":97,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":147,"mirror_url":null,"open_issues_count":155,"forks":147,"open_issues":155,"watchers":97,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1122"},"html":{"href":"https://github.com/nipy/dipy/pull/1122"},"issue":{"href":"https://api.github.com/repos/nipy/dipy/issues/1122"},"comments":{"href":"https://api.github.com/repos/nipy/dipy/issues/1122/comments"},"review_comments":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1122/comments"},"review_comment":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nipy/dipy/pulls/1122/commits"},"statuses":{"href":"https://api.github.com/repos/nipy/dipy/statuses/d332698657f7e7c74529cc82dfc8a468ac25f54f"}}}}
{"actor":{"display_login":"arokem"}}