{"action":"created","comment":{"url":"https://api.github.com/repos/imagej/imagej-ops/pulls/comments/55797498","id":55797498,"diff_hunk":"@@ -0,0 +1,338 @@\n+package net.imagej.ops.image.distancetransform;\n+\n+import java.util.ArrayList;\n+import java.util.Arrays;\n+import java.util.List;\n+import java.util.concurrent.Callable;\n+import java.util.concurrent.ExecutorService;\n+\n+import org.scijava.plugin.Parameter;\n+import org.scijava.plugin.Plugin;\n+import org.scijava.thread.ThreadService;\n+\n+import net.imagej.ops.Contingent;\n+import net.imagej.ops.Op;\n+import net.imagej.ops.Ops.Image.DistanceTransform;\n+import net.imagej.ops.create.img.CreateImgFromInterval;\n+import net.imagej.ops.special.function.Functions;\n+import net.imagej.ops.special.function.UnaryFunctionOp;\n+import net.imagej.ops.special.hybrid.AbstractUnaryHybridCF;\n+import net.imglib2.FinalInterval;\n+import net.imglib2.RandomAccess;\n+import net.imglib2.RandomAccessibleInterval;\n+import net.imglib2.algorithm.labeling.ConnectedComponents.StructuringElement;\n+import net.imglib2.type.BooleanType;\n+import net.imglib2.type.numeric.RealType;\n+\n+@Plugin(type = Op.class, name = \"DistanceMap3D\")\n+public class DistanceMapOp<B extends BooleanType<B>, T extends RealType<T>>\n+                extends AbstractUnaryHybridCF<RandomAccessibleInterval<B>, RandomAccessibleInterval<T>> implements DistanceTransform, Contingent {\n+\n+        @Parameter\n+        private ThreadService ts;\n+\n+        @Parameter(required = false)\n+        private StructuringElement element;\n+\n+        @SuppressWarnings(\"rawtypes\")\n+        private UnaryFunctionOp<FinalInterval, RandomAccessibleInterval> createOp;\n+\n+        private ExecutorService es;\n+\n+        @Override\n+        public boolean conforms() {\n+                return true;","path":"src/main/java/net/imagej/ops/image/distancetransform/DistanceMapOp.java","position":44,"original_position":44,"commit_id":"6ecf1a15be525f7388d39ba5188959d35baa0641","original_commit_id":"6ecf1a15be525f7388d39ba5188959d35baa0641","user":{"login":"dietzc","id":1267990,"avatar_url":"https://avatars.githubusercontent.com/u/1267990?v=3","gravatar_id":"","url":"https://api.github.com/users/dietzc","html_url":"https://github.com/dietzc","followers_url":"https://api.github.com/users/dietzc/followers","following_url":"https://api.github.com/users/dietzc/following{/other_user}","gists_url":"https://api.github.com/users/dietzc/gists{/gist_id}","starred_url":"https://api.github.com/users/dietzc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dietzc/subscriptions","organizations_url":"https://api.github.com/users/dietzc/orgs","repos_url":"https://api.github.com/users/dietzc/repos","events_url":"https://api.github.com/users/dietzc/events{/privacy}","received_events_url":"https://api.github.com/users/dietzc/received_events","type":"User","site_admin":false},"body":"you don't need the  `Contingent` interface if you always return `true` :-)","created_at":"2016-03-11T07:30:31Z","updated_at":"2016-03-11T07:30:31Z","html_url":"https://github.com/imagej/imagej-ops/pull/378#discussion_r55797498","pull_request_url":"https://api.github.com/repos/imagej/imagej-ops/pulls/378","_links":{"self":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/comments/55797498"},"html":{"href":"https://github.com/imagej/imagej-ops/pull/378#discussion_r55797498"},"pull_request":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/378"}}},"pull_request":{"url":"https://api.github.com/repos/imagej/imagej-ops/pulls/378","id":62470303,"html_url":"https://github.com/imagej/imagej-ops/pull/378","diff_url":"https://github.com/imagej/imagej-ops/pull/378.diff","patch_url":"https://github.com/imagej/imagej-ops/pull/378.patch","issue_url":"https://api.github.com/repos/imagej/imagej-ops/issues/378","number":378,"state":"open","locked":false,"title":"DistanceTransform Op added","user":{"login":"SimonSchmid","id":12066057,"avatar_url":"https://avatars.githubusercontent.com/u/12066057?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSchmid","html_url":"https://github.com/SimonSchmid","followers_url":"https://api.github.com/users/SimonSchmid/followers","following_url":"https://api.github.com/users/SimonSchmid/following{/other_user}","gists_url":"https://api.github.com/users/SimonSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSchmid/subscriptions","organizations_url":"https://api.github.com/users/SimonSchmid/orgs","repos_url":"https://api.github.com/users/SimonSchmid/repos","events_url":"https://api.github.com/users/SimonSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSchmid/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T22:54:21Z","updated_at":"2016-03-11T07:30:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69388314cd044b38a77cf69d3a400a621c567521","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/imagej/imagej-ops/pulls/378/commits","review_comments_url":"https://api.github.com/repos/imagej/imagej-ops/pulls/378/comments","review_comment_url":"https://api.github.com/repos/imagej/imagej-ops/pulls/comments{/number}","comments_url":"https://api.github.com/repos/imagej/imagej-ops/issues/378/comments","statuses_url":"https://api.github.com/repos/imagej/imagej-ops/statuses/6ecf1a15be525f7388d39ba5188959d35baa0641","head":{"label":"SimonSchmid:distance-transform","ref":"distance-transform","sha":"6ecf1a15be525f7388d39ba5188959d35baa0641","user":{"login":"SimonSchmid","id":12066057,"avatar_url":"https://avatars.githubusercontent.com/u/12066057?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSchmid","html_url":"https://github.com/SimonSchmid","followers_url":"https://api.github.com/users/SimonSchmid/followers","following_url":"https://api.github.com/users/SimonSchmid/following{/other_user}","gists_url":"https://api.github.com/users/SimonSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSchmid/subscriptions","organizations_url":"https://api.github.com/users/SimonSchmid/orgs","repos_url":"https://api.github.com/users/SimonSchmid/repos","events_url":"https://api.github.com/users/SimonSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSchmid/received_events","type":"User","site_admin":false},"repo":{"id":53621393,"name":"imagej-ops","full_name":"SimonSchmid/imagej-ops","owner":{"login":"SimonSchmid","id":12066057,"avatar_url":"https://avatars.githubusercontent.com/u/12066057?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonSchmid","html_url":"https://github.com/SimonSchmid","followers_url":"https://api.github.com/users/SimonSchmid/followers","following_url":"https://api.github.com/users/SimonSchmid/following{/other_user}","gists_url":"https://api.github.com/users/SimonSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonSchmid/subscriptions","organizations_url":"https://api.github.com/users/SimonSchmid/orgs","repos_url":"https://api.github.com/users/SimonSchmid/repos","events_url":"https://api.github.com/users/SimonSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/SimonSchmid/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SimonSchmid/imagej-ops","description":"ImageJ Ops: \"Write once, run anywhere\" image processing","fork":true,"url":"https://api.github.com/repos/SimonSchmid/imagej-ops","forks_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/forks","keys_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/teams","hooks_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/hooks","issue_events_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/issues/events{/number}","events_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/events","assignees_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/assignees{/user}","branches_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/branches{/branch}","tags_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/tags","blobs_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/statuses/{sha}","languages_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/languages","stargazers_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/stargazers","contributors_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/contributors","subscribers_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/subscribers","subscription_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/subscription","commits_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/contents/{+path}","compare_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/merges","archive_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/downloads","issues_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/issues{/number}","pulls_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/pulls{/number}","milestones_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/milestones{/number}","notifications_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/labels{/name}","releases_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/releases{/id}","deployments_url":"https://api.github.com/repos/SimonSchmid/imagej-ops/deployments","created_at":"2016-03-10T22:24:35Z","updated_at":"2016-03-10T22:24:40Z","pushed_at":"2016-03-10T22:52:29Z","git_url":"git://github.com/SimonSchmid/imagej-ops.git","ssh_url":"git@github.com:SimonSchmid/imagej-ops.git","clone_url":"https://github.com/SimonSchmid/imagej-ops.git","svn_url":"https://github.com/SimonSchmid/imagej-ops","homepage":"http://imagej.net/Ops","size":7689,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"imagej:master","ref":"master","sha":"a85a64252d494685a612fb861bd980b2326b9d5d","user":{"login":"imagej","id":1268233,"avatar_url":"https://avatars.githubusercontent.com/u/1268233?v=3","gravatar_id":"","url":"https://api.github.com/users/imagej","html_url":"https://github.com/imagej","followers_url":"https://api.github.com/users/imagej/followers","following_url":"https://api.github.com/users/imagej/following{/other_user}","gists_url":"https://api.github.com/users/imagej/gists{/gist_id}","starred_url":"https://api.github.com/users/imagej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagej/subscriptions","organizations_url":"https://api.github.com/users/imagej/orgs","repos_url":"https://api.github.com/users/imagej/repos","events_url":"https://api.github.com/users/imagej/events{/privacy}","received_events_url":"https://api.github.com/users/imagej/received_events","type":"Organization","site_admin":false},"repo":{"id":17508889,"name":"imagej-ops","full_name":"imagej/imagej-ops","owner":{"login":"imagej","id":1268233,"avatar_url":"https://avatars.githubusercontent.com/u/1268233?v=3","gravatar_id":"","url":"https://api.github.com/users/imagej","html_url":"https://github.com/imagej","followers_url":"https://api.github.com/users/imagej/followers","following_url":"https://api.github.com/users/imagej/following{/other_user}","gists_url":"https://api.github.com/users/imagej/gists{/gist_id}","starred_url":"https://api.github.com/users/imagej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/imagej/subscriptions","organizations_url":"https://api.github.com/users/imagej/orgs","repos_url":"https://api.github.com/users/imagej/repos","events_url":"https://api.github.com/users/imagej/events{/privacy}","received_events_url":"https://api.github.com/users/imagej/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/imagej/imagej-ops","description":"ImageJ Ops: \"Write once, run anywhere\" image processing","fork":false,"url":"https://api.github.com/repos/imagej/imagej-ops","forks_url":"https://api.github.com/repos/imagej/imagej-ops/forks","keys_url":"https://api.github.com/repos/imagej/imagej-ops/keys{/key_id}","collaborators_url":"https://api.github.com/repos/imagej/imagej-ops/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/imagej/imagej-ops/teams","hooks_url":"https://api.github.com/repos/imagej/imagej-ops/hooks","issue_events_url":"https://api.github.com/repos/imagej/imagej-ops/issues/events{/number}","events_url":"https://api.github.com/repos/imagej/imagej-ops/events","assignees_url":"https://api.github.com/repos/imagej/imagej-ops/assignees{/user}","branches_url":"https://api.github.com/repos/imagej/imagej-ops/branches{/branch}","tags_url":"https://api.github.com/repos/imagej/imagej-ops/tags","blobs_url":"https://api.github.com/repos/imagej/imagej-ops/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/imagej/imagej-ops/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/imagej/imagej-ops/git/refs{/sha}","trees_url":"https://api.github.com/repos/imagej/imagej-ops/git/trees{/sha}","statuses_url":"https://api.github.com/repos/imagej/imagej-ops/statuses/{sha}","languages_url":"https://api.github.com/repos/imagej/imagej-ops/languages","stargazers_url":"https://api.github.com/repos/imagej/imagej-ops/stargazers","contributors_url":"https://api.github.com/repos/imagej/imagej-ops/contributors","subscribers_url":"https://api.github.com/repos/imagej/imagej-ops/subscribers","subscription_url":"https://api.github.com/repos/imagej/imagej-ops/subscription","commits_url":"https://api.github.com/repos/imagej/imagej-ops/commits{/sha}","git_commits_url":"https://api.github.com/repos/imagej/imagej-ops/git/commits{/sha}","comments_url":"https://api.github.com/repos/imagej/imagej-ops/comments{/number}","issue_comment_url":"https://api.github.com/repos/imagej/imagej-ops/issues/comments{/number}","contents_url":"https://api.github.com/repos/imagej/imagej-ops/contents/{+path}","compare_url":"https://api.github.com/repos/imagej/imagej-ops/compare/{base}...{head}","merges_url":"https://api.github.com/repos/imagej/imagej-ops/merges","archive_url":"https://api.github.com/repos/imagej/imagej-ops/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/imagej/imagej-ops/downloads","issues_url":"https://api.github.com/repos/imagej/imagej-ops/issues{/number}","pulls_url":"https://api.github.com/repos/imagej/imagej-ops/pulls{/number}","milestones_url":"https://api.github.com/repos/imagej/imagej-ops/milestones{/number}","notifications_url":"https://api.github.com/repos/imagej/imagej-ops/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/imagej/imagej-ops/labels{/name}","releases_url":"https://api.github.com/repos/imagej/imagej-ops/releases{/id}","deployments_url":"https://api.github.com/repos/imagej/imagej-ops/deployments","created_at":"2014-03-07T09:19:29Z","updated_at":"2016-02-16T17:55:20Z","pushed_at":"2016-03-10T22:54:21Z","git_url":"git://github.com/imagej/imagej-ops.git","ssh_url":"git@github.com:imagej/imagej-ops.git","clone_url":"https://github.com/imagej/imagej-ops.git","svn_url":"https://github.com/imagej/imagej-ops","homepage":"http://imagej.net/Ops","size":9675,"stargazers_count":11,"watchers_count":11,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":90,"forks":18,"open_issues":90,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/378"},"html":{"href":"https://github.com/imagej/imagej-ops/pull/378"},"issue":{"href":"https://api.github.com/repos/imagej/imagej-ops/issues/378"},"comments":{"href":"https://api.github.com/repos/imagej/imagej-ops/issues/378/comments"},"review_comments":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/378/comments"},"review_comment":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/imagej/imagej-ops/pulls/378/commits"},"statuses":{"href":"https://api.github.com/repos/imagej/imagej-ops/statuses/6ecf1a15be525f7388d39ba5188959d35baa0641"}}}}