{"action":"created","comment":{"url":"https://api.github.com/repos/nipy/dipy/pulls/comments/67445099","id":67445099,"diff_hunk":"@@ -0,0 +1,157 @@\n+# -*- coding: utf-8 -*-\n+\"\"\"\n+Created on Wed Apr 20 15:57:42 2016\n+\n+@author: jvillalo\n+\"\"\"\n+\"\"\"\n+=======================================================\n+Tissue Classification of a T1-weighted Strutural Image\n+=======================================================\n+This example explains how to segment a T1-weighted structural image using a MRF\n+approach. Similar algorithms have been proposed by Zhang et al. [Zhang2001]_,\n+and Avants et al. [Avants2011]_ available in FAST-FSL and ANTS-Artropos,\n+respectively.\n+\n+Here we will use a T1-weighted image, that has been previously skull-stripped\n+and bias field corrected.\n+\"\"\"\n+\n+import numpy as np\n+#import nibabel as nib","path":"doc/examples/tissue_classification.py","position":21,"original_position":21,"commit_id":"caeee84797cd5048763c383f09a6fe5d7f009703","original_commit_id":"caeee84797cd5048763c383f09a6fe5d7f009703","user":{"login":"omarocegueda","id":1608583,"avatar_url":"https://avatars.githubusercontent.com/u/1608583?v=3","gravatar_id":"","url":"https://api.github.com/users/omarocegueda","html_url":"https://github.com/omarocegueda","followers_url":"https://api.github.com/users/omarocegueda/followers","following_url":"https://api.github.com/users/omarocegueda/following{/other_user}","gists_url":"https://api.github.com/users/omarocegueda/gists{/gist_id}","starred_url":"https://api.github.com/users/omarocegueda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omarocegueda/subscriptions","organizations_url":"https://api.github.com/users/omarocegueda/orgs","repos_url":"https://api.github.com/users/omarocegueda/repos","events_url":"https://api.github.com/users/omarocegueda/events{/privacy}","received_events_url":"https://api.github.com/users/omarocegueda/received_events","type":"User","site_admin":false},"body":"Remove import if unnecessary.","created_at":"2016-06-17T00:09:35Z","updated_at":"2016-06-17T00:09:35Z","html_url":"https://github.com/nipy/dipy/pull/670#discussion_r67445099","pull_request_url":"https://api.github.com/repos/nipy/dipy/pulls/670","_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments/67445099"},"html":{"href":"https://github.com/nipy/dipy/pull/670#discussion_r67445099"},"pull_request":{"href":"https://api.github.com/repos/nipy/dipy/pulls/670"}}},"pull_request":{"url":"https://api.github.com/repos/nipy/dipy/pulls/670","id":38689457,"html_url":"https://github.com/nipy/dipy/pull/670","diff_url":"https://github.com/nipy/dipy/pull/670.diff","patch_url":"https://github.com/nipy/dipy/pull/670.patch","issue_url":"https://api.github.com/repos/nipy/dipy/issues/670","number":670,"state":"open","locked":false,"title":"Tissue classification using MAP-MRF","user":{"login":"villalonreina","id":11508365,"avatar_url":"https://avatars.githubusercontent.com/u/11508365?v=3","gravatar_id":"","url":"https://api.github.com/users/villalonreina","html_url":"https://github.com/villalonreina","followers_url":"https://api.github.com/users/villalonreina/followers","following_url":"https://api.github.com/users/villalonreina/following{/other_user}","gists_url":"https://api.github.com/users/villalonreina/gists{/gist_id}","starred_url":"https://api.github.com/users/villalonreina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villalonreina/subscriptions","organizations_url":"https://api.github.com/users/villalonreina/orgs","repos_url":"https://api.github.com/users/villalonreina/repos","events_url":"https://api.github.com/users/villalonreina/events{/privacy}","received_events_url":"https://api.github.com/users/villalonreina/received_events","type":"User","site_admin":false},"body":"This is an implementation of the MAP-MRF (Maximum a posteriori - Markov Random Field) by using the Iterative Conditional Modes (ICM) minimization algorithm. There are three inputs, the grey level T1 brain image, its corresponding mask and an initial three class segmentation of the T1. \r\n\r\nFor now we have hard-coded paths and I can share the images with whoever wants to test the code. \r\n\r\nThis code is still experimental and needs to be extended to estimate the partial volumes of the tissue classes. ","created_at":"2015-06-26T21:06:33Z","updated_at":"2016-06-17T00:09:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2fa8e74a5d85bb38a1fe5d35b87d9de4b3cc61d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nipy/dipy/pulls/670/commits","review_comments_url":"https://api.github.com/repos/nipy/dipy/pulls/670/comments","review_comment_url":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nipy/dipy/issues/670/comments","statuses_url":"https://api.github.com/repos/nipy/dipy/statuses/caeee84797cd5048763c383f09a6fe5d7f009703","head":{"label":"villalonreina:pve","ref":"pve","sha":"caeee84797cd5048763c383f09a6fe5d7f009703","user":{"login":"villalonreina","id":11508365,"avatar_url":"https://avatars.githubusercontent.com/u/11508365?v=3","gravatar_id":"","url":"https://api.github.com/users/villalonreina","html_url":"https://github.com/villalonreina","followers_url":"https://api.github.com/users/villalonreina/followers","following_url":"https://api.github.com/users/villalonreina/following{/other_user}","gists_url":"https://api.github.com/users/villalonreina/gists{/gist_id}","starred_url":"https://api.github.com/users/villalonreina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villalonreina/subscriptions","organizations_url":"https://api.github.com/users/villalonreina/orgs","repos_url":"https://api.github.com/users/villalonreina/repos","events_url":"https://api.github.com/users/villalonreina/events{/privacy}","received_events_url":"https://api.github.com/users/villalonreina/received_events","type":"User","site_admin":false},"repo":{"id":37036230,"name":"dipy","full_name":"villalonreina/dipy","owner":{"login":"villalonreina","id":11508365,"avatar_url":"https://avatars.githubusercontent.com/u/11508365?v=3","gravatar_id":"","url":"https://api.github.com/users/villalonreina","html_url":"https://github.com/villalonreina","followers_url":"https://api.github.com/users/villalonreina/followers","following_url":"https://api.github.com/users/villalonreina/following{/other_user}","gists_url":"https://api.github.com/users/villalonreina/gists{/gist_id}","starred_url":"https://api.github.com/users/villalonreina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/villalonreina/subscriptions","organizations_url":"https://api.github.com/users/villalonreina/orgs","repos_url":"https://api.github.com/users/villalonreina/repos","events_url":"https://api.github.com/users/villalonreina/events{/privacy}","received_events_url":"https://api.github.com/users/villalonreina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/villalonreina/dipy","description":"Diffusion MR Imaging in Python","fork":true,"url":"https://api.github.com/repos/villalonreina/dipy","forks_url":"https://api.github.com/repos/villalonreina/dipy/forks","keys_url":"https://api.github.com/repos/villalonreina/dipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/villalonreina/dipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/villalonreina/dipy/teams","hooks_url":"https://api.github.com/repos/villalonreina/dipy/hooks","issue_events_url":"https://api.github.com/repos/villalonreina/dipy/issues/events{/number}","events_url":"https://api.github.com/repos/villalonreina/dipy/events","assignees_url":"https://api.github.com/repos/villalonreina/dipy/assignees{/user}","branches_url":"https://api.github.com/repos/villalonreina/dipy/branches{/branch}","tags_url":"https://api.github.com/repos/villalonreina/dipy/tags","blobs_url":"https://api.github.com/repos/villalonreina/dipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/villalonreina/dipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/villalonreina/dipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/villalonreina/dipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/villalonreina/dipy/statuses/{sha}","languages_url":"https://api.github.com/repos/villalonreina/dipy/languages","stargazers_url":"https://api.github.com/repos/villalonreina/dipy/stargazers","contributors_url":"https://api.github.com/repos/villalonreina/dipy/contributors","subscribers_url":"https://api.github.com/repos/villalonreina/dipy/subscribers","subscription_url":"https://api.github.com/repos/villalonreina/dipy/subscription","commits_url":"https://api.github.com/repos/villalonreina/dipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/villalonreina/dipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/villalonreina/dipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/villalonreina/dipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/villalonreina/dipy/contents/{+path}","compare_url":"https://api.github.com/repos/villalonreina/dipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/villalonreina/dipy/merges","archive_url":"https://api.github.com/repos/villalonreina/dipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/villalonreina/dipy/downloads","issues_url":"https://api.github.com/repos/villalonreina/dipy/issues{/number}","pulls_url":"https://api.github.com/repos/villalonreina/dipy/pulls{/number}","milestones_url":"https://api.github.com/repos/villalonreina/dipy/milestones{/number}","notifications_url":"https://api.github.com/repos/villalonreina/dipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/villalonreina/dipy/labels{/name}","releases_url":"https://api.github.com/repos/villalonreina/dipy/releases{/id}","deployments_url":"https://api.github.com/repos/villalonreina/dipy/deployments","created_at":"2015-06-07T23:29:46Z","updated_at":"2016-04-29T06:15:24Z","pushed_at":"2016-06-16T05:28:04Z","git_url":"git://github.com/villalonreina/dipy.git","ssh_url":"git@github.com:villalonreina/dipy.git","clone_url":"https://github.com/villalonreina/dipy.git","svn_url":"https://github.com/villalonreina/dipy","homepage":"http://dipy.org","size":26047,"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":"c5103fda0d02677792723a3196f0c21cfe065a2a","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-05-30T10:45:21Z","pushed_at":"2016-06-16T21:34:55Z","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":40760,"stargazers_count":90,"watchers_count":90,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":134,"mirror_url":null,"open_issues_count":146,"forks":134,"open_issues":146,"watchers":90,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nipy/dipy/pulls/670"},"html":{"href":"https://github.com/nipy/dipy/pull/670"},"issue":{"href":"https://api.github.com/repos/nipy/dipy/issues/670"},"comments":{"href":"https://api.github.com/repos/nipy/dipy/issues/670/comments"},"review_comments":{"href":"https://api.github.com/repos/nipy/dipy/pulls/670/comments"},"review_comment":{"href":"https://api.github.com/repos/nipy/dipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nipy/dipy/pulls/670/commits"},"statuses":{"href":"https://api.github.com/repos/nipy/dipy/statuses/caeee84797cd5048763c383f09a6fe5d7f009703"}}}}
{"actor":{"display_login":"omarocegueda"}}