{"action":"created","comment":{"url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/comments/38747863","id":38747863,"diff_hunk":"@@ -0,0 +1,181 @@\n+/**\n+ *  This program is free software: you can redistribute it and/or modify\n+ *  it under the terms of the GNU Lesser General Public License as\n+ *  published by the Free Software Foundation, either version 3 of the\n+ *  License, or  (at your option) any later version.\n+ *\n+ *  This program is distributed in the hope that it will be useful,\n+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ *  GNU General Public License for more details.\n+ *\n+ *  You should have received a copy of the GNU General Public License\n+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ **/\n+\n+#pragma once\n+\n+/**\n+ * @file LambdaMST3D.h\n+ * @author Kacper Pluta (\\c kacper.pluta@esiee.fr )\n+ * Laboratoire d'Informatique Gaspard-Monge - LIGM, France\n+ *\n+ * @date 2014/10/06\n+ *\n+ * This file is part of the DGtal library.\n+ */\n+\n+#if defined(LAMBDAMST3D_RECURSES)\n+#error Recursive header files inclusion detected in LambdaMST3D.h\n+#else // defined(LAMBDAMST3D_RECURSES)\n+/** Prevents recursive inclusion of headers. */\n+#define LAMBDAMST3D_RECURSES\n+\n+#if !defined LAMBDAMST3D_h\n+/** Prevents repeated inclusion of headers. */\n+#define LAMBDAMST3D_h\n+\n+#include <algorithm>\n+#include <iterator>\n+#include <cmath>\n+#include <map>\n+#include <DGtal/base/Common.h>\n+#include <DGtal/helpers/StdDefs.h>\n+#include \"DGtal/kernel/CSpace.h\"\n+#include \"DGtal/kernel/PointVector.h\"\n+#include \"DGtal/geometry/curves/CIncrementalSegmentComputer.h\"\n+#include \"DGtal/geometry/curves/estimation/FunctorsLambdaMST.h\"\n+\n+namespace DGtal {\n+  \n+  template < typename TSpace, typename TSegmentation, typename Functor >\n+  class LambdaMST3DEstimator\n+  {\n+  public: \n+    ///Checking concepts\n+    BOOST_CONCEPT_ASSERT(( concepts::CSpace<TSpace> ));\n+    BOOST_STATIC_ASSERT(( TSpace::dimension == 3 ));\n+    BOOST_CONCEPT_ASSERT(( CIncrementalSegmentComputer<typename TSegmentation::SegmentComputer> ));\n+    // ----------------------- Types ------------------------------\n+  public:\n+    typedef TSegmentation Segmentation;\n+    typedef typename TSegmentation::SegmentComputer SegmentComputer;\n+    typedef typename SegmentComputer::ConstIterator ConstIterator;\n+    typedef typename Functor::Value Value;\n+    typedef typename TSpace::RealVector RealVector;\n+    typedef typename TSpace::Point Point;\n+    \n+    // ----------------------- Standard services ------------------------------\n+  public:\n+    LambdaMST3DEstimator();\n+    \n+    /**\n+     * Initialisation.\n+     * @param itb begin iterator\n+     * @param ite end iterator\n+     */\n+    void init ( const ConstIterator& itb, const ConstIterator& ite );\n+    \n+    /**\n+     * @param segmentComputer - DSS segmentation algorithm\n+     */\n+    void attach ( const TSegmentation & segmentComputer );\n+    \n+    /**\n+     * Checks the validity/consistency of the object.\n+     * @return 'true' if the object is valid, 'false' otherwise.\n+     */\n+    bool isValid() const;\n+    \n+    /**\n+     * @param point of the underlying curve to calculate a tangent to it\n+     * @return tangent direction\n+     */\n+    RealVector eval ( const Point & point );\n+    \n+    /**\n+     * More efficient way to compute tangent for all points of a curve.\n+     * @param result back_insert_iterator to insert element to underlying container.\n+     */\n+    template < typename Containter >\n+    void eval ( std::back_insert_iterator < Containter > result );\n+    \n+    // ------------------------- Internals ------------------------------------\n+  protected:\n+    \n+    template < typename Containter >\n+    void accumulate ( std::multimap < Point, Value > & outValues, std::back_insert_iterator < Containter > result );\n+    \n+    // ------------------------- Private Datas --------------------------------\n+  private:\n+    ConstIterator myBegin;\n+    ConstIterator myEnd;\n+    const TSegmentation * dssSegments;\n+    Functor myFunctor;\n+    \n+  }; // end of class LambdaTangentFromDSSEstimator \n+  \n+  /**\n+   * Description of class 'LambdaTangentFromDSS' <p> Aim:\n+   */","path":"src/DGtal/geometry/curves/estimation/LambdaMST3D.h","position":121,"original_position":121,"commit_id":"3f1ab53c87f3b3b727bd5cf7d6a6d3cf04cb1b1d","original_commit_id":"3f1ab53c87f3b3b727bd5cf7d6a6d3cf04cb1b1d","user":{"login":"JacquesOlivierLachaud","id":793707,"avatar_url":"https://avatars.githubusercontent.com/u/793707?v=3","gravatar_id":"","url":"https://api.github.com/users/JacquesOlivierLachaud","html_url":"https://github.com/JacquesOlivierLachaud","followers_url":"https://api.github.com/users/JacquesOlivierLachaud/followers","following_url":"https://api.github.com/users/JacquesOlivierLachaud/following{/other_user}","gists_url":"https://api.github.com/users/JacquesOlivierLachaud/gists{/gist_id}","starred_url":"https://api.github.com/users/JacquesOlivierLachaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JacquesOlivierLachaud/subscriptions","organizations_url":"https://api.github.com/users/JacquesOlivierLachaud/orgs","repos_url":"https://api.github.com/users/JacquesOlivierLachaud/repos","events_url":"https://api.github.com/users/JacquesOlivierLachaud/events{/privacy}","received_events_url":"https://api.github.com/users/JacquesOlivierLachaud/received_events","type":"User","site_admin":false},"body":"Same remarks as for the 2D version in all the file.","created_at":"2015-09-04T12:52:00Z","updated_at":"2015-09-04T12:52:00Z","html_url":"https://github.com/DGtal-team/DGtal/pull/1021#discussion_r38747863","pull_request_url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021","_links":{"self":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/comments/38747863"},"html":{"href":"https://github.com/DGtal-team/DGtal/pull/1021#discussion_r38747863"},"pull_request":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021"}}},"pull_request":{"url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021","id":38440889,"html_url":"https://github.com/DGtal-team/DGtal/pull/1021","diff_url":"https://github.com/DGtal-team/DGtal/pull/1021.diff","patch_url":"https://github.com/DGtal-team/DGtal/pull/1021.patch","issue_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1021","number":1021,"state":"open","locked":false,"title":"* Lambda-MST 2D/3D tangent estimator","user":{"login":"copyme","id":456607,"avatar_url":"https://avatars.githubusercontent.com/u/456607?v=3","gravatar_id":"","url":"https://api.github.com/users/copyme","html_url":"https://github.com/copyme","followers_url":"https://api.github.com/users/copyme/followers","following_url":"https://api.github.com/users/copyme/following{/other_user}","gists_url":"https://api.github.com/users/copyme/gists{/gist_id}","starred_url":"https://api.github.com/users/copyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copyme/subscriptions","organizations_url":"https://api.github.com/users/copyme/orgs","repos_url":"https://api.github.com/users/copyme/repos","events_url":"https://api.github.com/users/copyme/events{/privacy}","received_events_url":"https://api.github.com/users/copyme/received_events","type":"User","site_admin":false},"body":"* Naive3DDSSComputer - DSS computer which uses only valid projections\r\n* Another related changes","created_at":"2015-06-24T13:21:41Z","updated_at":"2015-09-04T12:52:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a856b61c5e6456fc736c85b8f8e17b5e645aa68a","assignee":null,"milestone":{"url":"https://api.github.com/repos/DGtal-team/DGtal/milestones/9","html_url":"https://github.com/DGtal-team/DGtal/milestones/0.9","labels_url":"https://api.github.com/repos/DGtal-team/DGtal/milestones/9/labels","id":776797,"number":9,"title":"0.9","description":"","creator":{"login":"dcoeurjo","id":700165,"avatar_url":"https://avatars.githubusercontent.com/u/700165?v=3","gravatar_id":"","url":"https://api.github.com/users/dcoeurjo","html_url":"https://github.com/dcoeurjo","followers_url":"https://api.github.com/users/dcoeurjo/followers","following_url":"https://api.github.com/users/dcoeurjo/following{/other_user}","gists_url":"https://api.github.com/users/dcoeurjo/gists{/gist_id}","starred_url":"https://api.github.com/users/dcoeurjo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcoeurjo/subscriptions","organizations_url":"https://api.github.com/users/dcoeurjo/orgs","repos_url":"https://api.github.com/users/dcoeurjo/repos","events_url":"https://api.github.com/users/dcoeurjo/events{/privacy}","received_events_url":"https://api.github.com/users/dcoeurjo/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":23,"state":"open","created_at":"2014-09-03T13:26:56Z","updated_at":"2015-09-02T12:38:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021/commits","review_comments_url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021/comments","review_comment_url":"https://api.github.com/repos/DGtal-team/DGtal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/1021/comments","statuses_url":"https://api.github.com/repos/DGtal-team/DGtal/statuses/3f1ab53c87f3b3b727bd5cf7d6a6d3cf04cb1b1d","head":{"label":"copyme:LambdaMST","ref":"LambdaMST","sha":"3f1ab53c87f3b3b727bd5cf7d6a6d3cf04cb1b1d","user":{"login":"copyme","id":456607,"avatar_url":"https://avatars.githubusercontent.com/u/456607?v=3","gravatar_id":"","url":"https://api.github.com/users/copyme","html_url":"https://github.com/copyme","followers_url":"https://api.github.com/users/copyme/followers","following_url":"https://api.github.com/users/copyme/following{/other_user}","gists_url":"https://api.github.com/users/copyme/gists{/gist_id}","starred_url":"https://api.github.com/users/copyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copyme/subscriptions","organizations_url":"https://api.github.com/users/copyme/orgs","repos_url":"https://api.github.com/users/copyme/repos","events_url":"https://api.github.com/users/copyme/events{/privacy}","received_events_url":"https://api.github.com/users/copyme/received_events","type":"User","site_admin":false},"repo":{"id":19267623,"name":"DGtal","full_name":"copyme/DGtal","owner":{"login":"copyme","id":456607,"avatar_url":"https://avatars.githubusercontent.com/u/456607?v=3","gravatar_id":"","url":"https://api.github.com/users/copyme","html_url":"https://github.com/copyme","followers_url":"https://api.github.com/users/copyme/followers","following_url":"https://api.github.com/users/copyme/following{/other_user}","gists_url":"https://api.github.com/users/copyme/gists{/gist_id}","starred_url":"https://api.github.com/users/copyme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/copyme/subscriptions","organizations_url":"https://api.github.com/users/copyme/orgs","repos_url":"https://api.github.com/users/copyme/repos","events_url":"https://api.github.com/users/copyme/events{/privacy}","received_events_url":"https://api.github.com/users/copyme/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/copyme/DGtal","description":"Digital Geometry Tools and Algorithm Library","fork":true,"url":"https://api.github.com/repos/copyme/DGtal","forks_url":"https://api.github.com/repos/copyme/DGtal/forks","keys_url":"https://api.github.com/repos/copyme/DGtal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/copyme/DGtal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/copyme/DGtal/teams","hooks_url":"https://api.github.com/repos/copyme/DGtal/hooks","issue_events_url":"https://api.github.com/repos/copyme/DGtal/issues/events{/number}","events_url":"https://api.github.com/repos/copyme/DGtal/events","assignees_url":"https://api.github.com/repos/copyme/DGtal/assignees{/user}","branches_url":"https://api.github.com/repos/copyme/DGtal/branches{/branch}","tags_url":"https://api.github.com/repos/copyme/DGtal/tags","blobs_url":"https://api.github.com/repos/copyme/DGtal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/copyme/DGtal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/copyme/DGtal/git/refs{/sha}","trees_url":"https://api.github.com/repos/copyme/DGtal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/copyme/DGtal/statuses/{sha}","languages_url":"https://api.github.com/repos/copyme/DGtal/languages","stargazers_url":"https://api.github.com/repos/copyme/DGtal/stargazers","contributors_url":"https://api.github.com/repos/copyme/DGtal/contributors","subscribers_url":"https://api.github.com/repos/copyme/DGtal/subscribers","subscription_url":"https://api.github.com/repos/copyme/DGtal/subscription","commits_url":"https://api.github.com/repos/copyme/DGtal/commits{/sha}","git_commits_url":"https://api.github.com/repos/copyme/DGtal/git/commits{/sha}","comments_url":"https://api.github.com/repos/copyme/DGtal/comments{/number}","issue_comment_url":"https://api.github.com/repos/copyme/DGtal/issues/comments{/number}","contents_url":"https://api.github.com/repos/copyme/DGtal/contents/{+path}","compare_url":"https://api.github.com/repos/copyme/DGtal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/copyme/DGtal/merges","archive_url":"https://api.github.com/repos/copyme/DGtal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/copyme/DGtal/downloads","issues_url":"https://api.github.com/repos/copyme/DGtal/issues{/number}","pulls_url":"https://api.github.com/repos/copyme/DGtal/pulls{/number}","milestones_url":"https://api.github.com/repos/copyme/DGtal/milestones{/number}","notifications_url":"https://api.github.com/repos/copyme/DGtal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/copyme/DGtal/labels{/name}","releases_url":"https://api.github.com/repos/copyme/DGtal/releases{/id}","created_at":"2014-04-29T07:24:17Z","updated_at":"2014-06-26T08:23:45Z","pushed_at":"2015-09-02T09:17:58Z","git_url":"git://github.com/copyme/DGtal.git","ssh_url":"git@github.com:copyme/DGtal.git","clone_url":"https://github.com/copyme/DGtal.git","svn_url":"https://github.com/copyme/DGtal","homepage":"http://libdgtal.org","size":141498,"stargazers_count":0,"watchers_count":0,"language":"C++","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":"DGtal-team:master","ref":"master","sha":"a8a1ae2c49ac15a7cbb8d2bea5789d37e0523a96","user":{"login":"DGtal-team","id":1013900,"avatar_url":"https://avatars.githubusercontent.com/u/1013900?v=3","gravatar_id":"","url":"https://api.github.com/users/DGtal-team","html_url":"https://github.com/DGtal-team","followers_url":"https://api.github.com/users/DGtal-team/followers","following_url":"https://api.github.com/users/DGtal-team/following{/other_user}","gists_url":"https://api.github.com/users/DGtal-team/gists{/gist_id}","starred_url":"https://api.github.com/users/DGtal-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DGtal-team/subscriptions","organizations_url":"https://api.github.com/users/DGtal-team/orgs","repos_url":"https://api.github.com/users/DGtal-team/repos","events_url":"https://api.github.com/users/DGtal-team/events{/privacy}","received_events_url":"https://api.github.com/users/DGtal-team/received_events","type":"Organization","site_admin":false},"repo":{"id":1709095,"name":"DGtal","full_name":"DGtal-team/DGtal","owner":{"login":"DGtal-team","id":1013900,"avatar_url":"https://avatars.githubusercontent.com/u/1013900?v=3","gravatar_id":"","url":"https://api.github.com/users/DGtal-team","html_url":"https://github.com/DGtal-team","followers_url":"https://api.github.com/users/DGtal-team/followers","following_url":"https://api.github.com/users/DGtal-team/following{/other_user}","gists_url":"https://api.github.com/users/DGtal-team/gists{/gist_id}","starred_url":"https://api.github.com/users/DGtal-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DGtal-team/subscriptions","organizations_url":"https://api.github.com/users/DGtal-team/orgs","repos_url":"https://api.github.com/users/DGtal-team/repos","events_url":"https://api.github.com/users/DGtal-team/events{/privacy}","received_events_url":"https://api.github.com/users/DGtal-team/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DGtal-team/DGtal","description":"Digital Geometry Tools and Algorithm Library","fork":false,"url":"https://api.github.com/repos/DGtal-team/DGtal","forks_url":"https://api.github.com/repos/DGtal-team/DGtal/forks","keys_url":"https://api.github.com/repos/DGtal-team/DGtal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DGtal-team/DGtal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DGtal-team/DGtal/teams","hooks_url":"https://api.github.com/repos/DGtal-team/DGtal/hooks","issue_events_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/events{/number}","events_url":"https://api.github.com/repos/DGtal-team/DGtal/events","assignees_url":"https://api.github.com/repos/DGtal-team/DGtal/assignees{/user}","branches_url":"https://api.github.com/repos/DGtal-team/DGtal/branches{/branch}","tags_url":"https://api.github.com/repos/DGtal-team/DGtal/tags","blobs_url":"https://api.github.com/repos/DGtal-team/DGtal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DGtal-team/DGtal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DGtal-team/DGtal/git/refs{/sha}","trees_url":"https://api.github.com/repos/DGtal-team/DGtal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DGtal-team/DGtal/statuses/{sha}","languages_url":"https://api.github.com/repos/DGtal-team/DGtal/languages","stargazers_url":"https://api.github.com/repos/DGtal-team/DGtal/stargazers","contributors_url":"https://api.github.com/repos/DGtal-team/DGtal/contributors","subscribers_url":"https://api.github.com/repos/DGtal-team/DGtal/subscribers","subscription_url":"https://api.github.com/repos/DGtal-team/DGtal/subscription","commits_url":"https://api.github.com/repos/DGtal-team/DGtal/commits{/sha}","git_commits_url":"https://api.github.com/repos/DGtal-team/DGtal/git/commits{/sha}","comments_url":"https://api.github.com/repos/DGtal-team/DGtal/comments{/number}","issue_comment_url":"https://api.github.com/repos/DGtal-team/DGtal/issues/comments{/number}","contents_url":"https://api.github.com/repos/DGtal-team/DGtal/contents/{+path}","compare_url":"https://api.github.com/repos/DGtal-team/DGtal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DGtal-team/DGtal/merges","archive_url":"https://api.github.com/repos/DGtal-team/DGtal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DGtal-team/DGtal/downloads","issues_url":"https://api.github.com/repos/DGtal-team/DGtal/issues{/number}","pulls_url":"https://api.github.com/repos/DGtal-team/DGtal/pulls{/number}","milestones_url":"https://api.github.com/repos/DGtal-team/DGtal/milestones{/number}","notifications_url":"https://api.github.com/repos/DGtal-team/DGtal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DGtal-team/DGtal/labels{/name}","releases_url":"https://api.github.com/repos/DGtal-team/DGtal/releases{/id}","created_at":"2011-05-06T00:20:52Z","updated_at":"2015-08-24T19:21:26Z","pushed_at":"2015-09-03T09:31:47Z","git_url":"git://github.com/DGtal-team/DGtal.git","ssh_url":"git@github.com:DGtal-team/DGtal.git","clone_url":"https://github.com/DGtal-team/DGtal.git","svn_url":"https://github.com/DGtal-team/DGtal","homepage":"http://dgtal.org","size":198822,"stargazers_count":31,"watchers_count":31,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":42,"forks":39,"open_issues":42,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021"},"html":{"href":"https://github.com/DGtal-team/DGtal/pull/1021"},"issue":{"href":"https://api.github.com/repos/DGtal-team/DGtal/issues/1021"},"comments":{"href":"https://api.github.com/repos/DGtal-team/DGtal/issues/1021/comments"},"review_comments":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021/comments"},"review_comment":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DGtal-team/DGtal/pulls/1021/commits"},"statuses":{"href":"https://api.github.com/repos/DGtal-team/DGtal/statuses/3f1ab53c87f3b3b727bd5cf7d6a6d3cf04cb1b1d"}}}}