{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/67395724","id":67395724,"diff_hunk":"@@ -0,0 +1,190 @@\n+import numpy as np\n+\n+__all__ = ['frangi', 'hessian']\n+\n+\n+def _frangi_hessian_common_filter(image, scale, scale_step, beta1, beta2):\n+    \"\"\"This is an intermediate function for Frangi and Hessian filters.\n+\n+    Shares the common code for Frangi and Hessian functions.\n+\n+    Parameters\n+    ----------\n+    image : (N, M) ndarray\n+        Array with input image data.\n+    scale : tuple of floats, optional\n+        The range of sigmas used.\n+    scale_step : float, optional\n+        Step size between sigmas.\n+    beta1 : float, optional\n+        Frangi correction constant.\n+    beta2 : float, optional\n+        Frangi correction constant.\n+    black_ridges : boolean, optional\n+        If True (default), detects black ridges, if False - white ones.\n+\n+    Returns\n+    -------\n+    filtered_list : list\n+        List of pre-filtered images.\n+\n+    \"\"\"\n+\n+    # Import has to be here due to circular import error\n+    from ..feature import hessian_matrix, hessian_matrix_eigvals\n+\n+\n+    sigmas = np.arange(scale[0], scale[1], scale_step)\n+\n+    if np.any(np.asarray(sigmas) < 0.0):\n+        raise ValueError(\"Sigma values less than zero are not valid\")\n+\n+    beta1 = 2 * beta1 ** 2\n+    beta2 = 2 * beta2 ** 2\n+\n+    filtered_array = np.zeros((len(sigmas), np.shape(image)[0],","path":"skimage/filters/_frangi.py","position":45,"original_position":45,"commit_id":"87d86ae4ef98851a8c782bc1005214d11fa6d999","original_commit_id":"38930ed983d67a57169669db276cd631d5f3c867","user":{"login":"jni","id":492549,"avatar_url":"https://avatars.githubusercontent.com/u/492549?v=3","gravatar_id":"","url":"https://api.github.com/users/jni","html_url":"https://github.com/jni","followers_url":"https://api.github.com/users/jni/followers","following_url":"https://api.github.com/users/jni/following{/other_user}","gists_url":"https://api.github.com/users/jni/gists{/gist_id}","starred_url":"https://api.github.com/users/jni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jni/subscriptions","organizations_url":"https://api.github.com/users/jni/orgs","repos_url":"https://api.github.com/users/jni/repos","events_url":"https://api.github.com/users/jni/events{/privacy}","received_events_url":"https://api.github.com/users/jni/received_events","type":"User","site_admin":false},"body":"I would do `(sigmas.shape + image.shape)`, but eh, doesn't really matter. =)","created_at":"2016-06-16T18:09:40Z","updated_at":"2016-06-16T18:09:40Z","html_url":"https://github.com/scikit-image/scikit-image/pull/2139#discussion_r67395724","pull_request_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139","_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/67395724"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/2139#discussion_r67395724"},"pull_request":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139","id":73462439,"html_url":"https://github.com/scikit-image/scikit-image/pull/2139","diff_url":"https://github.com/scikit-image/scikit-image/pull/2139.diff","patch_url":"https://github.com/scikit-image/scikit-image/pull/2139.patch","issue_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/2139","number":2139,"state":"open","locked":false,"title":"Frangi filter support (#1769 upgrade)","user":{"login":"Hiyorimi","id":3055666,"avatar_url":"https://avatars.githubusercontent.com/u/3055666?v=3","gravatar_id":"","url":"https://api.github.com/users/Hiyorimi","html_url":"https://github.com/Hiyorimi","followers_url":"https://api.github.com/users/Hiyorimi/followers","following_url":"https://api.github.com/users/Hiyorimi/following{/other_user}","gists_url":"https://api.github.com/users/Hiyorimi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hiyorimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hiyorimi/subscriptions","organizations_url":"https://api.github.com/users/Hiyorimi/orgs","repos_url":"https://api.github.com/users/Hiyorimi/repos","events_url":"https://api.github.com/users/Hiyorimi/events{/privacy}","received_events_url":"https://api.github.com/users/Hiyorimi/received_events","type":"User","site_admin":false},"body":"## Description\r\nAdd Frangi and Hessian filters.\r\n\r\n## Checklist\r\n- [x] Clean style in [the spirit of PEP8](https://www.python.org/dev/peps/pep-0008/)\r\n- [x] [Docstrings for all functions](https://github.com/numpy/numpy/blob/master/doc/example.py)\r\n- [x] Gallery example in `./doc/examples` (new features only)\r\n- [x] Unit tests\r\n\r\n## References\r\nCatches up PR #1769.\r\n\r\nRebased, pulled with the help of @soupault","created_at":"2016-06-11T08:22:34Z","updated_at":"2016-06-16T18:09:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfe2614d90be8516461fc8bb2603d03c2ac6a3c8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139/commits","review_comments_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139/comments","review_comment_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/2139/comments","statuses_url":"https://api.github.com/repos/scikit-image/scikit-image/statuses/87d86ae4ef98851a8c782bc1005214d11fa6d999","head":{"label":"Hiyorimi:frangi","ref":"frangi","sha":"87d86ae4ef98851a8c782bc1005214d11fa6d999","user":{"login":"Hiyorimi","id":3055666,"avatar_url":"https://avatars.githubusercontent.com/u/3055666?v=3","gravatar_id":"","url":"https://api.github.com/users/Hiyorimi","html_url":"https://github.com/Hiyorimi","followers_url":"https://api.github.com/users/Hiyorimi/followers","following_url":"https://api.github.com/users/Hiyorimi/following{/other_user}","gists_url":"https://api.github.com/users/Hiyorimi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hiyorimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hiyorimi/subscriptions","organizations_url":"https://api.github.com/users/Hiyorimi/orgs","repos_url":"https://api.github.com/users/Hiyorimi/repos","events_url":"https://api.github.com/users/Hiyorimi/events{/privacy}","received_events_url":"https://api.github.com/users/Hiyorimi/received_events","type":"User","site_admin":false},"repo":{"id":45497649,"name":"scikit-image","full_name":"Hiyorimi/scikit-image","owner":{"login":"Hiyorimi","id":3055666,"avatar_url":"https://avatars.githubusercontent.com/u/3055666?v=3","gravatar_id":"","url":"https://api.github.com/users/Hiyorimi","html_url":"https://github.com/Hiyorimi","followers_url":"https://api.github.com/users/Hiyorimi/followers","following_url":"https://api.github.com/users/Hiyorimi/following{/other_user}","gists_url":"https://api.github.com/users/Hiyorimi/gists{/gist_id}","starred_url":"https://api.github.com/users/Hiyorimi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hiyorimi/subscriptions","organizations_url":"https://api.github.com/users/Hiyorimi/orgs","repos_url":"https://api.github.com/users/Hiyorimi/repos","events_url":"https://api.github.com/users/Hiyorimi/events{/privacy}","received_events_url":"https://api.github.com/users/Hiyorimi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hiyorimi/scikit-image","description":"Image Processing SciKit (Toolbox for SciPy)","fork":true,"url":"https://api.github.com/repos/Hiyorimi/scikit-image","forks_url":"https://api.github.com/repos/Hiyorimi/scikit-image/forks","keys_url":"https://api.github.com/repos/Hiyorimi/scikit-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hiyorimi/scikit-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hiyorimi/scikit-image/teams","hooks_url":"https://api.github.com/repos/Hiyorimi/scikit-image/hooks","issue_events_url":"https://api.github.com/repos/Hiyorimi/scikit-image/issues/events{/number}","events_url":"https://api.github.com/repos/Hiyorimi/scikit-image/events","assignees_url":"https://api.github.com/repos/Hiyorimi/scikit-image/assignees{/user}","branches_url":"https://api.github.com/repos/Hiyorimi/scikit-image/branches{/branch}","tags_url":"https://api.github.com/repos/Hiyorimi/scikit-image/tags","blobs_url":"https://api.github.com/repos/Hiyorimi/scikit-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hiyorimi/scikit-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hiyorimi/scikit-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hiyorimi/scikit-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hiyorimi/scikit-image/statuses/{sha}","languages_url":"https://api.github.com/repos/Hiyorimi/scikit-image/languages","stargazers_url":"https://api.github.com/repos/Hiyorimi/scikit-image/stargazers","contributors_url":"https://api.github.com/repos/Hiyorimi/scikit-image/contributors","subscribers_url":"https://api.github.com/repos/Hiyorimi/scikit-image/subscribers","subscription_url":"https://api.github.com/repos/Hiyorimi/scikit-image/subscription","commits_url":"https://api.github.com/repos/Hiyorimi/scikit-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hiyorimi/scikit-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hiyorimi/scikit-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hiyorimi/scikit-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hiyorimi/scikit-image/contents/{+path}","compare_url":"https://api.github.com/repos/Hiyorimi/scikit-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hiyorimi/scikit-image/merges","archive_url":"https://api.github.com/repos/Hiyorimi/scikit-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hiyorimi/scikit-image/downloads","issues_url":"https://api.github.com/repos/Hiyorimi/scikit-image/issues{/number}","pulls_url":"https://api.github.com/repos/Hiyorimi/scikit-image/pulls{/number}","milestones_url":"https://api.github.com/repos/Hiyorimi/scikit-image/milestones{/number}","notifications_url":"https://api.github.com/repos/Hiyorimi/scikit-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hiyorimi/scikit-image/labels{/name}","releases_url":"https://api.github.com/repos/Hiyorimi/scikit-image/releases{/id}","deployments_url":"https://api.github.com/repos/Hiyorimi/scikit-image/deployments","created_at":"2015-11-03T21:44:10Z","updated_at":"2016-06-11T07:57:40Z","pushed_at":"2016-06-16T18:07:07Z","git_url":"git://github.com/Hiyorimi/scikit-image.git","ssh_url":"git@github.com:Hiyorimi/scikit-image.git","clone_url":"https://github.com/Hiyorimi/scikit-image.git","svn_url":"https://github.com/Hiyorimi/scikit-image","homepage":"http://scikit-image.org","size":41146,"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":"scikit-image:master","ref":"master","sha":"933994379742192d2b5abd5263bbe370ce674026","user":{"login":"scikit-image","id":897180,"avatar_url":"https://avatars.githubusercontent.com/u/897180?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-image","html_url":"https://github.com/scikit-image","followers_url":"https://api.github.com/users/scikit-image/followers","following_url":"https://api.github.com/users/scikit-image/following{/other_user}","gists_url":"https://api.github.com/users/scikit-image/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-image/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-image/subscriptions","organizations_url":"https://api.github.com/users/scikit-image/orgs","repos_url":"https://api.github.com/users/scikit-image/repos","events_url":"https://api.github.com/users/scikit-image/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-image/received_events","type":"Organization","site_admin":false},"repo":{"id":2014929,"name":"scikit-image","full_name":"scikit-image/scikit-image","owner":{"login":"scikit-image","id":897180,"avatar_url":"https://avatars.githubusercontent.com/u/897180?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-image","html_url":"https://github.com/scikit-image","followers_url":"https://api.github.com/users/scikit-image/followers","following_url":"https://api.github.com/users/scikit-image/following{/other_user}","gists_url":"https://api.github.com/users/scikit-image/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-image/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-image/subscriptions","organizations_url":"https://api.github.com/users/scikit-image/orgs","repos_url":"https://api.github.com/users/scikit-image/repos","events_url":"https://api.github.com/users/scikit-image/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-image/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-image/scikit-image","description":"Image Processing SciKit (Toolbox for SciPy)","fork":false,"url":"https://api.github.com/repos/scikit-image/scikit-image","forks_url":"https://api.github.com/repos/scikit-image/scikit-image/forks","keys_url":"https://api.github.com/repos/scikit-image/scikit-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-image/scikit-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-image/scikit-image/teams","hooks_url":"https://api.github.com/repos/scikit-image/scikit-image/hooks","issue_events_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-image/scikit-image/events","assignees_url":"https://api.github.com/repos/scikit-image/scikit-image/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-image/scikit-image/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-image/scikit-image/tags","blobs_url":"https://api.github.com/repos/scikit-image/scikit-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-image/scikit-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-image/scikit-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-image/scikit-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-image/scikit-image/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-image/scikit-image/languages","stargazers_url":"https://api.github.com/repos/scikit-image/scikit-image/stargazers","contributors_url":"https://api.github.com/repos/scikit-image/scikit-image/contributors","subscribers_url":"https://api.github.com/repos/scikit-image/scikit-image/subscribers","subscription_url":"https://api.github.com/repos/scikit-image/scikit-image/subscription","commits_url":"https://api.github.com/repos/scikit-image/scikit-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-image/scikit-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-image/scikit-image/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-image/scikit-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-image/scikit-image/merges","archive_url":"https://api.github.com/repos/scikit-image/scikit-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-image/scikit-image/downloads","issues_url":"https://api.github.com/repos/scikit-image/scikit-image/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-image/scikit-image/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-image/scikit-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/labels{/name}","releases_url":"https://api.github.com/repos/scikit-image/scikit-image/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-image/scikit-image/deployments","created_at":"2011-07-07T22:07:20Z","updated_at":"2016-06-15T21:08:26Z","pushed_at":"2016-06-16T18:07:08Z","git_url":"git://github.com/scikit-image/scikit-image.git","ssh_url":"git@github.com:scikit-image/scikit-image.git","clone_url":"https://github.com/scikit-image/scikit-image.git","svn_url":"https://github.com/scikit-image/scikit-image","homepage":"http://scikit-image.org","size":74306,"stargazers_count":1120,"watchers_count":1120,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":571,"mirror_url":null,"open_issues_count":286,"forks":571,"open_issues":286,"watchers":1120,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/2139"},"issue":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/2139"},"comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/2139/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/2139/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-image/scikit-image/statuses/87d86ae4ef98851a8c782bc1005214d11fa6d999"}}}}
{"actor":{"display_login":"jni"}}