{"action":"created","comment":{"url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/comments/69301089","id":69301089,"diff_hunk":"@@ -0,0 +1,145 @@\n+/*\n+ * Copyright 2015 University of Basel, Graphics and Vision Research Group\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package scalismo.mesh.boundingSpheres\n+\n+import breeze.numerics._\n+import BSDistance.{Distance2, Index, _}\n+import scalismo.geometry.{Point, Vector, _3D}\n+import scalismo.mesh.TriangleMesh\n+\n+\n+trait PointSetDistance {\n+  def closestPoint(point: Point[_3D]): (Point[_3D], Double, Int)\n+}\n+\n+\n+/**\n+  * PointSetDistance\n+  */\n+object PointSetDistance {","path":"src/main/scala/scalismo/mesh/boundingSpheres/PointSetDistance.scala","position":32,"original_position":32,"commit_id":"7ce2a586584314d84ba4dbe9996d8c0cc8b43208","original_commit_id":"7ce2a586584314d84ba4dbe9996d8c0cc8b43208","user":{"login":"Ghazi-Bouabene","id":10944449,"avatar_url":"https://avatars.githubusercontent.com/u/10944449?v=3","gravatar_id":"","url":"https://api.github.com/users/Ghazi-Bouabene","html_url":"https://github.com/Ghazi-Bouabene","followers_url":"https://api.github.com/users/Ghazi-Bouabene/followers","following_url":"https://api.github.com/users/Ghazi-Bouabene/following{/other_user}","gists_url":"https://api.github.com/users/Ghazi-Bouabene/gists{/gist_id}","starred_url":"https://api.github.com/users/Ghazi-Bouabene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ghazi-Bouabene/subscriptions","organizations_url":"https://api.github.com/users/Ghazi-Bouabene/orgs","repos_url":"https://api.github.com/users/Ghazi-Bouabene/repos","events_url":"https://api.github.com/users/Ghazi-Bouabene/events{/privacy}","received_events_url":"https://api.github.com/users/Ghazi-Bouabene/received_events","type":"User","site_admin":false},"body":"I would be in favor of naming this VantagePointTree instead of PointSetDistance which is anyway confusing as one expects a distance to be returned when calling the factory methods. If we want a generic name instead of the algorithm' one, then I would be in favor of SpatialIndex","created_at":"2016-07-01T13:43:40Z","updated_at":"2016-07-01T13:43:40Z","html_url":"https://github.com/unibas-gravis/scalismo/pull/134#discussion_r69301089","pull_request_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134","_links":{"self":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/comments/69301089"},"html":{"href":"https://github.com/unibas-gravis/scalismo/pull/134#discussion_r69301089"},"pull_request":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134"}}},"pull_request":{"url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134","id":75971934,"html_url":"https://github.com/unibas-gravis/scalismo/pull/134","diff_url":"https://github.com/unibas-gravis/scalismo/pull/134.diff","patch_url":"https://github.com/unibas-gravis/scalismo/pull/134.patch","issue_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/134","number":134,"state":"open","locked":false,"title":"Closest point on surface","user":{"login":"Andreas-Forster","id":4980582,"avatar_url":"https://avatars.githubusercontent.com/u/4980582?v=3","gravatar_id":"","url":"https://api.github.com/users/Andreas-Forster","html_url":"https://github.com/Andreas-Forster","followers_url":"https://api.github.com/users/Andreas-Forster/followers","following_url":"https://api.github.com/users/Andreas-Forster/following{/other_user}","gists_url":"https://api.github.com/users/Andreas-Forster/gists{/gist_id}","starred_url":"https://api.github.com/users/Andreas-Forster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andreas-Forster/subscriptions","organizations_url":"https://api.github.com/users/Andreas-Forster/orgs","repos_url":"https://api.github.com/users/Andreas-Forster/repos","events_url":"https://api.github.com/users/Andreas-Forster/events{/privacy}","received_events_url":"https://api.github.com/users/Andreas-Forster/received_events","type":"User","site_admin":false},"body":"The new scalismo.mesh.boundingSpheres package offers functionality to find the closest point on a triangulated surface. An example usage is:\r\n`import scalismo.mesh.boundingSpheres._`\r\n\r\n`val mesh: TriangleMesh3D = ???`\r\n`val sd = SurfaceDistance.fromTriangleMesh3D(mesh)`\r\n\r\n`val p = Point(0,0,0)`\r\n`val (cp,dist2) = sd.getClosestPoint(p)`\r\n\r\nThere is also the functionality to find the closest point in a set of points. Further the package is open to be extended to find the closest point on a set of lines, eg a future LineMesh.","created_at":"2016-07-01T12:22:58Z","updated_at":"2016-07-01T13:43:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82a169ec53e94f379f0a6d3fc6132d9b840a4fc0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134/commits","review_comments_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134/comments","review_comment_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/134/comments","statuses_url":"https://api.github.com/repos/unibas-gravis/scalismo/statuses/7ce2a586584314d84ba4dbe9996d8c0cc8b43208","head":{"label":"unibas-gravis:closestPointOnSurface","ref":"closestPointOnSurface","sha":"7ce2a586584314d84ba4dbe9996d8c0cc8b43208","user":{"login":"unibas-gravis","id":2787582,"avatar_url":"https://avatars.githubusercontent.com/u/2787582?v=3","gravatar_id":"","url":"https://api.github.com/users/unibas-gravis","html_url":"https://github.com/unibas-gravis","followers_url":"https://api.github.com/users/unibas-gravis/followers","following_url":"https://api.github.com/users/unibas-gravis/following{/other_user}","gists_url":"https://api.github.com/users/unibas-gravis/gists{/gist_id}","starred_url":"https://api.github.com/users/unibas-gravis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unibas-gravis/subscriptions","organizations_url":"https://api.github.com/users/unibas-gravis/orgs","repos_url":"https://api.github.com/users/unibas-gravis/repos","events_url":"https://api.github.com/users/unibas-gravis/events{/privacy}","received_events_url":"https://api.github.com/users/unibas-gravis/received_events","type":"Organization","site_admin":false},"repo":{"id":30758554,"name":"scalismo","full_name":"unibas-gravis/scalismo","owner":{"login":"unibas-gravis","id":2787582,"avatar_url":"https://avatars.githubusercontent.com/u/2787582?v=3","gravatar_id":"","url":"https://api.github.com/users/unibas-gravis","html_url":"https://github.com/unibas-gravis","followers_url":"https://api.github.com/users/unibas-gravis/followers","following_url":"https://api.github.com/users/unibas-gravis/following{/other_user}","gists_url":"https://api.github.com/users/unibas-gravis/gists{/gist_id}","starred_url":"https://api.github.com/users/unibas-gravis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unibas-gravis/subscriptions","organizations_url":"https://api.github.com/users/unibas-gravis/orgs","repos_url":"https://api.github.com/users/unibas-gravis/repos","events_url":"https://api.github.com/users/unibas-gravis/events{/privacy}","received_events_url":"https://api.github.com/users/unibas-gravis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unibas-gravis/scalismo","description":"Scalable Image Analysis and Shape Modelling","fork":false,"url":"https://api.github.com/repos/unibas-gravis/scalismo","forks_url":"https://api.github.com/repos/unibas-gravis/scalismo/forks","keys_url":"https://api.github.com/repos/unibas-gravis/scalismo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unibas-gravis/scalismo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unibas-gravis/scalismo/teams","hooks_url":"https://api.github.com/repos/unibas-gravis/scalismo/hooks","issue_events_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/events{/number}","events_url":"https://api.github.com/repos/unibas-gravis/scalismo/events","assignees_url":"https://api.github.com/repos/unibas-gravis/scalismo/assignees{/user}","branches_url":"https://api.github.com/repos/unibas-gravis/scalismo/branches{/branch}","tags_url":"https://api.github.com/repos/unibas-gravis/scalismo/tags","blobs_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/refs{/sha}","trees_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unibas-gravis/scalismo/statuses/{sha}","languages_url":"https://api.github.com/repos/unibas-gravis/scalismo/languages","stargazers_url":"https://api.github.com/repos/unibas-gravis/scalismo/stargazers","contributors_url":"https://api.github.com/repos/unibas-gravis/scalismo/contributors","subscribers_url":"https://api.github.com/repos/unibas-gravis/scalismo/subscribers","subscription_url":"https://api.github.com/repos/unibas-gravis/scalismo/subscription","commits_url":"https://api.github.com/repos/unibas-gravis/scalismo/commits{/sha}","git_commits_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/commits{/sha}","comments_url":"https://api.github.com/repos/unibas-gravis/scalismo/comments{/number}","issue_comment_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/comments{/number}","contents_url":"https://api.github.com/repos/unibas-gravis/scalismo/contents/{+path}","compare_url":"https://api.github.com/repos/unibas-gravis/scalismo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unibas-gravis/scalismo/merges","archive_url":"https://api.github.com/repos/unibas-gravis/scalismo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unibas-gravis/scalismo/downloads","issues_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues{/number}","pulls_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls{/number}","milestones_url":"https://api.github.com/repos/unibas-gravis/scalismo/milestones{/number}","notifications_url":"https://api.github.com/repos/unibas-gravis/scalismo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unibas-gravis/scalismo/labels{/name}","releases_url":"https://api.github.com/repos/unibas-gravis/scalismo/releases{/id}","deployments_url":"https://api.github.com/repos/unibas-gravis/scalismo/deployments","created_at":"2015-02-13T13:58:38Z","updated_at":"2016-06-21T10:20:23Z","pushed_at":"2016-07-01T12:55:38Z","git_url":"git://github.com/unibas-gravis/scalismo.git","ssh_url":"git@github.com:unibas-gravis/scalismo.git","clone_url":"https://github.com/unibas-gravis/scalismo.git","svn_url":"https://github.com/unibas-gravis/scalismo","homepage":null,"size":126738,"stargazers_count":28,"watchers_count":28,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":28,"default_branch":"master"}},"base":{"label":"unibas-gravis:develop","ref":"develop","sha":"78eb8db3c6eee1ce33ca67d65b2f0a8fad3c47ff","user":{"login":"unibas-gravis","id":2787582,"avatar_url":"https://avatars.githubusercontent.com/u/2787582?v=3","gravatar_id":"","url":"https://api.github.com/users/unibas-gravis","html_url":"https://github.com/unibas-gravis","followers_url":"https://api.github.com/users/unibas-gravis/followers","following_url":"https://api.github.com/users/unibas-gravis/following{/other_user}","gists_url":"https://api.github.com/users/unibas-gravis/gists{/gist_id}","starred_url":"https://api.github.com/users/unibas-gravis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unibas-gravis/subscriptions","organizations_url":"https://api.github.com/users/unibas-gravis/orgs","repos_url":"https://api.github.com/users/unibas-gravis/repos","events_url":"https://api.github.com/users/unibas-gravis/events{/privacy}","received_events_url":"https://api.github.com/users/unibas-gravis/received_events","type":"Organization","site_admin":false},"repo":{"id":30758554,"name":"scalismo","full_name":"unibas-gravis/scalismo","owner":{"login":"unibas-gravis","id":2787582,"avatar_url":"https://avatars.githubusercontent.com/u/2787582?v=3","gravatar_id":"","url":"https://api.github.com/users/unibas-gravis","html_url":"https://github.com/unibas-gravis","followers_url":"https://api.github.com/users/unibas-gravis/followers","following_url":"https://api.github.com/users/unibas-gravis/following{/other_user}","gists_url":"https://api.github.com/users/unibas-gravis/gists{/gist_id}","starred_url":"https://api.github.com/users/unibas-gravis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unibas-gravis/subscriptions","organizations_url":"https://api.github.com/users/unibas-gravis/orgs","repos_url":"https://api.github.com/users/unibas-gravis/repos","events_url":"https://api.github.com/users/unibas-gravis/events{/privacy}","received_events_url":"https://api.github.com/users/unibas-gravis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/unibas-gravis/scalismo","description":"Scalable Image Analysis and Shape Modelling","fork":false,"url":"https://api.github.com/repos/unibas-gravis/scalismo","forks_url":"https://api.github.com/repos/unibas-gravis/scalismo/forks","keys_url":"https://api.github.com/repos/unibas-gravis/scalismo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unibas-gravis/scalismo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unibas-gravis/scalismo/teams","hooks_url":"https://api.github.com/repos/unibas-gravis/scalismo/hooks","issue_events_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/events{/number}","events_url":"https://api.github.com/repos/unibas-gravis/scalismo/events","assignees_url":"https://api.github.com/repos/unibas-gravis/scalismo/assignees{/user}","branches_url":"https://api.github.com/repos/unibas-gravis/scalismo/branches{/branch}","tags_url":"https://api.github.com/repos/unibas-gravis/scalismo/tags","blobs_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/refs{/sha}","trees_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unibas-gravis/scalismo/statuses/{sha}","languages_url":"https://api.github.com/repos/unibas-gravis/scalismo/languages","stargazers_url":"https://api.github.com/repos/unibas-gravis/scalismo/stargazers","contributors_url":"https://api.github.com/repos/unibas-gravis/scalismo/contributors","subscribers_url":"https://api.github.com/repos/unibas-gravis/scalismo/subscribers","subscription_url":"https://api.github.com/repos/unibas-gravis/scalismo/subscription","commits_url":"https://api.github.com/repos/unibas-gravis/scalismo/commits{/sha}","git_commits_url":"https://api.github.com/repos/unibas-gravis/scalismo/git/commits{/sha}","comments_url":"https://api.github.com/repos/unibas-gravis/scalismo/comments{/number}","issue_comment_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues/comments{/number}","contents_url":"https://api.github.com/repos/unibas-gravis/scalismo/contents/{+path}","compare_url":"https://api.github.com/repos/unibas-gravis/scalismo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unibas-gravis/scalismo/merges","archive_url":"https://api.github.com/repos/unibas-gravis/scalismo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unibas-gravis/scalismo/downloads","issues_url":"https://api.github.com/repos/unibas-gravis/scalismo/issues{/number}","pulls_url":"https://api.github.com/repos/unibas-gravis/scalismo/pulls{/number}","milestones_url":"https://api.github.com/repos/unibas-gravis/scalismo/milestones{/number}","notifications_url":"https://api.github.com/repos/unibas-gravis/scalismo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unibas-gravis/scalismo/labels{/name}","releases_url":"https://api.github.com/repos/unibas-gravis/scalismo/releases{/id}","deployments_url":"https://api.github.com/repos/unibas-gravis/scalismo/deployments","created_at":"2015-02-13T13:58:38Z","updated_at":"2016-06-21T10:20:23Z","pushed_at":"2016-07-01T12:55:38Z","git_url":"git://github.com/unibas-gravis/scalismo.git","ssh_url":"git@github.com:unibas-gravis/scalismo.git","clone_url":"https://github.com/unibas-gravis/scalismo.git","svn_url":"https://github.com/unibas-gravis/scalismo","homepage":null,"size":126738,"stargazers_count":28,"watchers_count":28,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134"},"html":{"href":"https://github.com/unibas-gravis/scalismo/pull/134"},"issue":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/issues/134"},"comments":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/issues/134/comments"},"review_comments":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134/comments"},"review_comment":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/pulls/134/commits"},"statuses":{"href":"https://api.github.com/repos/unibas-gravis/scalismo/statuses/7ce2a586584314d84ba4dbe9996d8c0cc8b43208"}}}}
{"actor":{"display_login":"Ghazi-Bouabene"}}