{"action":"reopened","number":21,"pull_request":{"url":"https://api.github.com/repos/inanhkn/analysis/pulls/21","id":28896024,"html_url":"https://github.com/inanhkn/analysis/pull/21","diff_url":"https://github.com/inanhkn/analysis/pull/21.diff","patch_url":"https://github.com/inanhkn/analysis/pull/21.patch","issue_url":"https://api.github.com/repos/inanhkn/analysis/issues/21","number":21,"state":"open","locked":false,"title":"Kimth/turboreg","user":{"login":"kimtonyhyun","id":2081503,"avatar_url":"https://avatars.githubusercontent.com/u/2081503?v=3","gravatar_id":"","url":"https://api.github.com/users/kimtonyhyun","html_url":"https://github.com/kimtonyhyun","followers_url":"https://api.github.com/users/kimtonyhyun/followers","following_url":"https://api.github.com/users/kimtonyhyun/following{/other_user}","gists_url":"https://api.github.com/users/kimtonyhyun/gists{/gist_id}","starred_url":"https://api.github.com/users/kimtonyhyun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimtonyhyun/subscriptions","organizations_url":"https://api.github.com/users/kimtonyhyun/orgs","repos_url":"https://api.github.com/users/kimtonyhyun/repos","events_url":"https://api.github.com/users/kimtonyhyun/events{/privacy}","received_events_url":"https://api.github.com/users/kimtonyhyun/received_events","type":"User","site_admin":false},"body":"@jmaxey @inanhkn PR to enable TurboReg from Matlab.\r\n\r\nThere are a lot of files in this PR, but most of it is the C source code for TurboReg. Only the following files are relevant for us:\r\n- `M_reg = run_turboreg(M)`: Apply TurboReg registration to movie `M`. This is essentially a port of the registration process as implemented in Mosaic.\r\n- `turbocoreg.c`: This is the gateway MEX function into TurboReg. (MEX allows Matlab to make calls to compiled C code.) This has been significantly edited from Jerome/Biafra's implementation -- to get rid of unnecessary and distracting options into TurboReg, some minor bug fixes, and to merge the function of two MEX files into one (they used two separate C files `turboreg` and `transfturboreg`).\r\n- `compare_registered_movie(M,M_reg)` will display two movies side-by-side with locked XY limits, so that one can compare the success of the registration process.\r\n\r\nNote: in order to use the MEX function `turbocoreg`, you need to compile the MEX code on your local machine. The instructions to do so are in the leading comments of `turbocoreg.c`. If you need any help in compiling the MEX code, let me know.\r\n\r\nOnce you've compiled the MEX function, you can try out the TurboReg registration as follows:\r\n\r\n1. Download a short movie snippet. I found Cohort 8 Mouse 1 to be a nice example, because he has a very strong blood vessel structure in the center of the FOV. [Link to a c8m1 snippet](https://www.dropbox.com/s/yzkz1g5yij2xu0y/c8m1d8_snippet.mat?dl=0). This `.mat` file produces a short (200 frame) movie matrix `M` when loaded in Matlab.\r\n2. Run TurboReg on this short movie by running `M_reg = run_turboreg(M)`. The script will prompt for some parameters (e.g. which frame to use as reference). Just press enter, to fill each parameter with the defaults. The script also prompts the user to draw an ROI for the registration process (see the image below)\r\n3. Examine the registered movie against the original by running `compare_registered_movie(M,M_reg)`. Use the zoom tool to inspect the movie in more detail.\r\n\r\n![20150208_turboreg_roi](https://cloud.githubusercontent.com/assets/2081503/6101066/5c2f6ba0-afd2-11e4-8ba5-8664b8b51679.PNG)\r\n\r\nFor reference, the 200 frame movie takes about 20 seconds to register on my laptop. Currently, the registration script runs single-threaded. Down the line, we should add parallel frame processing.","created_at":"2015-02-09T04:33:37Z","updated_at":"2015-02-13T03:20:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"77d58f484d8aa1e4b1540bd4ba18bdfaedee767d","assignee":{"login":"jmaxey","id":7634264,"avatar_url":"https://avatars.githubusercontent.com/u/7634264?v=3","gravatar_id":"","url":"https://api.github.com/users/jmaxey","html_url":"https://github.com/jmaxey","followers_url":"https://api.github.com/users/jmaxey/followers","following_url":"https://api.github.com/users/jmaxey/following{/other_user}","gists_url":"https://api.github.com/users/jmaxey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmaxey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmaxey/subscriptions","organizations_url":"https://api.github.com/users/jmaxey/orgs","repos_url":"https://api.github.com/users/jmaxey/repos","events_url":"https://api.github.com/users/jmaxey/events{/privacy}","received_events_url":"https://api.github.com/users/jmaxey/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/inanhkn/analysis/pulls/21/commits","review_comments_url":"https://api.github.com/repos/inanhkn/analysis/pulls/21/comments","review_comment_url":"https://api.github.com/repos/inanhkn/analysis/pulls/comments/{number}","comments_url":"https://api.github.com/repos/inanhkn/analysis/issues/21/comments","statuses_url":"https://api.github.com/repos/inanhkn/analysis/statuses/942474b6e0cc04067d5e634b8504ea30befe95ad","head":{"label":"inanhkn:kimth/turboreg","ref":"kimth/turboreg","sha":"942474b6e0cc04067d5e634b8504ea30befe95ad","user":{"login":"inanhkn","id":5778377,"avatar_url":"https://avatars.githubusercontent.com/u/5778377?v=3","gravatar_id":"","url":"https://api.github.com/users/inanhkn","html_url":"https://github.com/inanhkn","followers_url":"https://api.github.com/users/inanhkn/followers","following_url":"https://api.github.com/users/inanhkn/following{/other_user}","gists_url":"https://api.github.com/users/inanhkn/gists{/gist_id}","starred_url":"https://api.github.com/users/inanhkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inanhkn/subscriptions","organizations_url":"https://api.github.com/users/inanhkn/orgs","repos_url":"https://api.github.com/users/inanhkn/repos","events_url":"https://api.github.com/users/inanhkn/events{/privacy}","received_events_url":"https://api.github.com/users/inanhkn/received_events","type":"User","site_admin":false},"repo":{"id":27896702,"name":"analysis","full_name":"inanhkn/analysis","owner":{"login":"inanhkn","id":5778377,"avatar_url":"https://avatars.githubusercontent.com/u/5778377?v=3","gravatar_id":"","url":"https://api.github.com/users/inanhkn","html_url":"https://github.com/inanhkn","followers_url":"https://api.github.com/users/inanhkn/followers","following_url":"https://api.github.com/users/inanhkn/following{/other_user}","gists_url":"https://api.github.com/users/inanhkn/gists{/gist_id}","starred_url":"https://api.github.com/users/inanhkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inanhkn/subscriptions","organizations_url":"https://api.github.com/users/inanhkn/orgs","repos_url":"https://api.github.com/users/inanhkn/repos","events_url":"https://api.github.com/users/inanhkn/events{/privacy}","received_events_url":"https://api.github.com/users/inanhkn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inanhkn/analysis","description":"","fork":false,"url":"https://api.github.com/repos/inanhkn/analysis","forks_url":"https://api.github.com/repos/inanhkn/analysis/forks","keys_url":"https://api.github.com/repos/inanhkn/analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inanhkn/analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inanhkn/analysis/teams","hooks_url":"https://api.github.com/repos/inanhkn/analysis/hooks","issue_events_url":"https://api.github.com/repos/inanhkn/analysis/issues/events{/number}","events_url":"https://api.github.com/repos/inanhkn/analysis/events","assignees_url":"https://api.github.com/repos/inanhkn/analysis/assignees{/user}","branches_url":"https://api.github.com/repos/inanhkn/analysis/branches{/branch}","tags_url":"https://api.github.com/repos/inanhkn/analysis/tags","blobs_url":"https://api.github.com/repos/inanhkn/analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inanhkn/analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inanhkn/analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/inanhkn/analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inanhkn/analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/inanhkn/analysis/languages","stargazers_url":"https://api.github.com/repos/inanhkn/analysis/stargazers","contributors_url":"https://api.github.com/repos/inanhkn/analysis/contributors","subscribers_url":"https://api.github.com/repos/inanhkn/analysis/subscribers","subscription_url":"https://api.github.com/repos/inanhkn/analysis/subscription","commits_url":"https://api.github.com/repos/inanhkn/analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/inanhkn/analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/inanhkn/analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/inanhkn/analysis/issues/comments/{number}","contents_url":"https://api.github.com/repos/inanhkn/analysis/contents/{+path}","compare_url":"https://api.github.com/repos/inanhkn/analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inanhkn/analysis/merges","archive_url":"https://api.github.com/repos/inanhkn/analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inanhkn/analysis/downloads","issues_url":"https://api.github.com/repos/inanhkn/analysis/issues{/number}","pulls_url":"https://api.github.com/repos/inanhkn/analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/inanhkn/analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/inanhkn/analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inanhkn/analysis/labels{/name}","releases_url":"https://api.github.com/repos/inanhkn/analysis/releases{/id}","created_at":"2014-12-11T23:21:49Z","updated_at":"2015-02-12T23:34:18Z","pushed_at":"2015-02-12T23:34:18Z","git_url":"git://github.com/inanhkn/analysis.git","ssh_url":"git@github.com:inanhkn/analysis.git","clone_url":"https://github.com/inanhkn/analysis.git","svn_url":"https://github.com/inanhkn/analysis","homepage":null,"size":740,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"inanhkn:master","ref":"master","sha":"58dc6aa18310ebdfc5438cc6299215b0eeefb84b","user":{"login":"inanhkn","id":5778377,"avatar_url":"https://avatars.githubusercontent.com/u/5778377?v=3","gravatar_id":"","url":"https://api.github.com/users/inanhkn","html_url":"https://github.com/inanhkn","followers_url":"https://api.github.com/users/inanhkn/followers","following_url":"https://api.github.com/users/inanhkn/following{/other_user}","gists_url":"https://api.github.com/users/inanhkn/gists{/gist_id}","starred_url":"https://api.github.com/users/inanhkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inanhkn/subscriptions","organizations_url":"https://api.github.com/users/inanhkn/orgs","repos_url":"https://api.github.com/users/inanhkn/repos","events_url":"https://api.github.com/users/inanhkn/events{/privacy}","received_events_url":"https://api.github.com/users/inanhkn/received_events","type":"User","site_admin":false},"repo":{"id":27896702,"name":"analysis","full_name":"inanhkn/analysis","owner":{"login":"inanhkn","id":5778377,"avatar_url":"https://avatars.githubusercontent.com/u/5778377?v=3","gravatar_id":"","url":"https://api.github.com/users/inanhkn","html_url":"https://github.com/inanhkn","followers_url":"https://api.github.com/users/inanhkn/followers","following_url":"https://api.github.com/users/inanhkn/following{/other_user}","gists_url":"https://api.github.com/users/inanhkn/gists{/gist_id}","starred_url":"https://api.github.com/users/inanhkn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inanhkn/subscriptions","organizations_url":"https://api.github.com/users/inanhkn/orgs","repos_url":"https://api.github.com/users/inanhkn/repos","events_url":"https://api.github.com/users/inanhkn/events{/privacy}","received_events_url":"https://api.github.com/users/inanhkn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inanhkn/analysis","description":"","fork":false,"url":"https://api.github.com/repos/inanhkn/analysis","forks_url":"https://api.github.com/repos/inanhkn/analysis/forks","keys_url":"https://api.github.com/repos/inanhkn/analysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inanhkn/analysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inanhkn/analysis/teams","hooks_url":"https://api.github.com/repos/inanhkn/analysis/hooks","issue_events_url":"https://api.github.com/repos/inanhkn/analysis/issues/events{/number}","events_url":"https://api.github.com/repos/inanhkn/analysis/events","assignees_url":"https://api.github.com/repos/inanhkn/analysis/assignees{/user}","branches_url":"https://api.github.com/repos/inanhkn/analysis/branches{/branch}","tags_url":"https://api.github.com/repos/inanhkn/analysis/tags","blobs_url":"https://api.github.com/repos/inanhkn/analysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inanhkn/analysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inanhkn/analysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/inanhkn/analysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inanhkn/analysis/statuses/{sha}","languages_url":"https://api.github.com/repos/inanhkn/analysis/languages","stargazers_url":"https://api.github.com/repos/inanhkn/analysis/stargazers","contributors_url":"https://api.github.com/repos/inanhkn/analysis/contributors","subscribers_url":"https://api.github.com/repos/inanhkn/analysis/subscribers","subscription_url":"https://api.github.com/repos/inanhkn/analysis/subscription","commits_url":"https://api.github.com/repos/inanhkn/analysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/inanhkn/analysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/inanhkn/analysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/inanhkn/analysis/issues/comments/{number}","contents_url":"https://api.github.com/repos/inanhkn/analysis/contents/{+path}","compare_url":"https://api.github.com/repos/inanhkn/analysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inanhkn/analysis/merges","archive_url":"https://api.github.com/repos/inanhkn/analysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inanhkn/analysis/downloads","issues_url":"https://api.github.com/repos/inanhkn/analysis/issues{/number}","pulls_url":"https://api.github.com/repos/inanhkn/analysis/pulls{/number}","milestones_url":"https://api.github.com/repos/inanhkn/analysis/milestones{/number}","notifications_url":"https://api.github.com/repos/inanhkn/analysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inanhkn/analysis/labels{/name}","releases_url":"https://api.github.com/repos/inanhkn/analysis/releases{/id}","created_at":"2014-12-11T23:21:49Z","updated_at":"2015-02-12T23:34:18Z","pushed_at":"2015-02-12T23:34:18Z","git_url":"git://github.com/inanhkn/analysis.git","ssh_url":"git@github.com:inanhkn/analysis.git","clone_url":"https://github.com/inanhkn/analysis.git","svn_url":"https://github.com/inanhkn/analysis","homepage":null,"size":740,"stargazers_count":0,"watchers_count":0,"language":"Matlab","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inanhkn/analysis/pulls/21"},"html":{"href":"https://github.com/inanhkn/analysis/pull/21"},"issue":{"href":"https://api.github.com/repos/inanhkn/analysis/issues/21"},"comments":{"href":"https://api.github.com/repos/inanhkn/analysis/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/inanhkn/analysis/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/inanhkn/analysis/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/inanhkn/analysis/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/inanhkn/analysis/statuses/942474b6e0cc04067d5e634b8504ea30befe95ad"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":4,"review_comments":0,"commits":9,"additions":13297,"deletions":5,"changed_files":34}}