{"action":"created","issue":{"url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310","labels_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310/labels{/name}","comments_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310/comments","events_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310/events","html_url":"https://github.com/scikit-image/scikit-image/pull/1310","id":52357389,"number":1310,"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},"labels":[],"state":"open","locked":false,"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},"comments":28,"created_at":"2014-12-18T12:14:57Z","updated_at":"2015-01-12T05:13:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scikit-image/scikit-image/pulls/1310","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"},"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?"},"comment":{"url":"https://api.github.com/repos/scikit-image/scikit-image/issues/comments/69530669","html_url":"https://github.com/scikit-image/scikit-image/pull/1310#issuecomment-69530669","issue_url":"https://api.github.com/repos/scikit-image/scikit-image/issues/1310","id":69530669,"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},"created_at":"2015-01-12T05:13:32Z","updated_at":"2015-01-12T05:13:32Z","body":"Hi all,\r\n\r\nAssuming Travis passes, this is ready for review! In addition to addressing nearly all our past morphology concerns:\r\n - #1216 part 2: all dtypes are supported\r\n - #1074 dtype is now conserved for morphological operations\r\n - #1049 binary morphology now returns bool\r\n\r\nI also had to fix the boundary-marking code (#738), which is now substantially better, I think: all modes are symmetric, and there's some nice choices, including a subpixel mode, depending on what you want to display.\r\n\r\nThe only thing missing is supporting separated structuring elemens, but that is not a big deal because for full, square selems (the most common use), ndimage detects automatically that it is separable and provides the appropriate speedups!\r\n\r\nComments welcome, @JDWarner @ahojnnes @stefanv @tonysyu. If anyone uses eccentric structuring elements, I'd love for you to test this PR against your use case, as that was the fiddliest part."}}