{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/22916478","id":22916478,"diff_hunk":"@@ -2,15 +2,13 @@\n Binary morphological operations\n \"\"\"\n import numpy as np\n-from scipy import ndimage\n-from .misc import default_fallback\n+from scipy import ndimage as nd\n+from .misc import default_selem\n \n \n-# Our functions only work in 2D, so for 3D or higher input we should fall back\n-# on `scipy.ndimage`. Additionally, we want to use a cross-shaped structuring\n-# element of the appropriate dimension for each of these functions.\n-# The `default_callback` provides all these.\n-@default_fallback\n+# The default_selem decorator provides a diamond structuring element as default\n+# with the appropriate dimension for the input `image`.","path":"skimage/morphology/binary.py","position":16,"original_position":16,"commit_id":"8a4920c4d4b4293efd273a9e7d2f4d4d988347ad","original_commit_id":"8a4920c4d4b4293efd273a9e7d2f4d4d988347ad","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":"The dimension of the image. I'll reword.","created_at":"2015-01-14T04:36:03Z","updated_at":"2015-01-14T04:36:03Z","html_url":"https://github.com/scikit-image/scikit-image/pull/1310#discussion_r22916478","pull_request_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310","_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/comments/22916478"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/1310#discussion_r22916478"},"pull_request":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310","id":26296087,"html_url":"https://github.com/scikit-image/scikit-image/pull/1310","diff_url":"https://github.com/scikit-image/scikit-image/pull/1310.diff","patch_url":"https://github.com/scikit-image/scikit-image/pull/1310.patch","issue_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310","number":1310,"state":"open","locked":false,"title":"WIP: wrap ndimage morphology","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":"Hey guys,\r\n\r\nThis should have been a simple patch but unfortunately the ndimage support for asymmetric structuring elements is rather lacking/weird... See [these lines](https://github.com/scipy/scipy/blob/ec20ababa400e39ac3ffc9148c01ef86d5349332/scipy/ndimage/morphology.py#L1285). At any rate I myself have no experience with these. For example, what is an opening with an asymmetric element? An erosion followed by a dilation with the same selem will not be a no-op for a simple pixel image... Which seems to be the expected behavior, based on the tests.\r\n\r\nAny suggestions? @ahojnnes @emmanuelle @pratapvardhan?","created_at":"2014-12-18T12:14:57Z","updated_at":"2015-01-14T04:36:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d300678c44f6232ade392cf07f6b1854f93b602c","assignee":null,"milestone":{"url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/4","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/milestones/4/labels","id":827254,"number":4,"title":"0.11","description":"","creator":{"login":"stefanv","id":45071,"avatar_url":"https://avatars.githubusercontent.com/u/45071?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanv","html_url":"https://github.com/stefanv","followers_url":"https://api.github.com/users/stefanv/followers","following_url":"https://api.github.com/users/stefanv/following{/other_user}","gists_url":"https://api.github.com/users/stefanv/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanv/subscriptions","organizations_url":"https://api.github.com/users/stefanv/orgs","repos_url":"https://api.github.com/users/stefanv/repos","events_url":"https://api.github.com/users/stefanv/events{/privacy}","received_events_url":"https://api.github.com/users/stefanv/received_events","type":"User","site_admin":false},"open_issues":17,"closed_issues":24,"state":"open","created_at":"2014-10-15T12:52:34Z","updated_at":"2015-01-02T01:29:02Z","due_on":"2014-12-23T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310/commits","review_comments_url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310/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/1310/comments","statuses_url":"https://api.github.com/repos/scikit-image/scikit-image/statuses/8a4920c4d4b4293efd273a9e7d2f4d4d988347ad","head":{"label":"jni:morpho-update","ref":"morpho-update","sha":"8a4920c4d4b4293efd273a9e7d2f4d4d988347ad","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},"repo":{"id":5127537,"name":"scikit-image","full_name":"jni/scikit-image","owner":{"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},"private":false,"html_url":"https://github.com/jni/scikit-image","description":"Image Processing SciKit (Toolbox for SciPy)","fork":true,"url":"https://api.github.com/repos/jni/scikit-image","forks_url":"https://api.github.com/repos/jni/scikit-image/forks","keys_url":"https://api.github.com/repos/jni/scikit-image/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jni/scikit-image/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jni/scikit-image/teams","hooks_url":"https://api.github.com/repos/jni/scikit-image/hooks","issue_events_url":"https://api.github.com/repos/jni/scikit-image/issues/events{/number}","events_url":"https://api.github.com/repos/jni/scikit-image/events","assignees_url":"https://api.github.com/repos/jni/scikit-image/assignees{/user}","branches_url":"https://api.github.com/repos/jni/scikit-image/branches{/branch}","tags_url":"https://api.github.com/repos/jni/scikit-image/tags","blobs_url":"https://api.github.com/repos/jni/scikit-image/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jni/scikit-image/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jni/scikit-image/git/refs{/sha}","trees_url":"https://api.github.com/repos/jni/scikit-image/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jni/scikit-image/statuses/{sha}","languages_url":"https://api.github.com/repos/jni/scikit-image/languages","stargazers_url":"https://api.github.com/repos/jni/scikit-image/stargazers","contributors_url":"https://api.github.com/repos/jni/scikit-image/contributors","subscribers_url":"https://api.github.com/repos/jni/scikit-image/subscribers","subscription_url":"https://api.github.com/repos/jni/scikit-image/subscription","commits_url":"https://api.github.com/repos/jni/scikit-image/commits{/sha}","git_commits_url":"https://api.github.com/repos/jni/scikit-image/git/commits{/sha}","comments_url":"https://api.github.com/repos/jni/scikit-image/comments{/number}","issue_comment_url":"https://api.github.com/repos/jni/scikit-image/issues/comments/{number}","contents_url":"https://api.github.com/repos/jni/scikit-image/contents/{+path}","compare_url":"https://api.github.com/repos/jni/scikit-image/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jni/scikit-image/merges","archive_url":"https://api.github.com/repos/jni/scikit-image/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jni/scikit-image/downloads","issues_url":"https://api.github.com/repos/jni/scikit-image/issues{/number}","pulls_url":"https://api.github.com/repos/jni/scikit-image/pulls{/number}","milestones_url":"https://api.github.com/repos/jni/scikit-image/milestones{/number}","notifications_url":"https://api.github.com/repos/jni/scikit-image/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jni/scikit-image/labels{/name}","releases_url":"https://api.github.com/repos/jni/scikit-image/releases{/id}","created_at":"2012-07-20T19:41:33Z","updated_at":"2015-01-08T06:02:19Z","pushed_at":"2015-01-13T23:05:37Z","git_url":"git://github.com/jni/scikit-image.git","ssh_url":"git@github.com:jni/scikit-image.git","clone_url":"https://github.com/jni/scikit-image.git","svn_url":"https://github.com/jni/scikit-image","homepage":"http://scikit-image.org","size":36981,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"scikit-image:master","ref":"master","sha":"d24ce2b4ab32e4b2de7e0a0afcae69935490c1be","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}","created_at":"2011-07-07T22:07:20Z","updated_at":"2015-01-14T00:08:43Z","pushed_at":"2015-01-14T00:08:42Z","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":62239,"stargazers_count":563,"watchers_count":563,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":294,"mirror_url":null,"open_issues_count":143,"forks":294,"open_issues":143,"watchers":563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310"},"html":{"href":"https://github.com/scikit-image/scikit-image/pull/1310"},"issue":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310"},"comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310/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/1310/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-image/scikit-image/statuses/8a4920c4d4b4293efd273a9e7d2f4d4d988347ad"}}}}