{"action":"created","comment":{"url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/comments/45874593","id":45874593,"diff_hunk":"@@ -380,10 +380,9 @@ int vtkIGTLToMRMLPolyData::MRMLToIGTL(unsigned long event, vtkMRMLNode* mrmlNode\n     \n     //------------------------------------------------------------\n     // Allocate Status Message Class\n-    if (this->OutPolyDataMessage.IsNull())\n-      {\n-      this->OutPolyDataMessage = igtl::PolyDataMessage::New();\n-      }\n+    // Overwrite old message because we want to clear arrays from previous\n+    // calls that will not be set anew.\n+    this->OutPolyDataMessage = igtl::PolyDataMessage::New();","path":"MRML/vtkIGTLToMRMLPolyData.cxx","position":46,"original_position":46,"commit_id":"5612b271d2b751ca2ee34a102c1397e7c976e631","original_commit_id":"5612b271d2b751ca2ee34a102c1397e7c976e631","user":{"login":"christiana","id":436646,"avatar_url":"https://avatars.githubusercontent.com/u/436646?v=3","gravatar_id":"","url":"https://api.github.com/users/christiana","html_url":"https://github.com/christiana","followers_url":"https://api.github.com/users/christiana/followers","following_url":"https://api.github.com/users/christiana/following{/other_user}","gists_url":"https://api.github.com/users/christiana/gists{/gist_id}","starred_url":"https://api.github.com/users/christiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiana/subscriptions","organizations_url":"https://api.github.com/users/christiana/orgs","repos_url":"https://api.github.com/users/christiana/repos","events_url":"https://api.github.com/users/christiana/events{/privacy}","received_events_url":"https://api.github.com/users/christiana/received_events","type":"User","site_admin":false},"body":"@tokjun As @lassoan  mentioned, content from the previous message must be cleared before receiving a new one. I experienced a bug here when two polydata messages arrived but contained different structures. In this case the last message got content from the previous one.\r\n\r\nIf performance is an issue, one could manually clear each content of the structure instead, IF the new message don't contain such a structure. The code would be less elegant but maybe more efficient.","created_at":"2015-11-25T14:51:01Z","updated_at":"2015-11-25T14:51:01Z","html_url":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57#discussion_r45874593","pull_request_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/comments/45874593"},"html":{"href":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57#discussion_r45874593"},"pull_request":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57","id":46895215,"html_url":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57","diff_url":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57.diff","patch_url":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57.patch","issue_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/57","number":57,"state":"open","locked":false,"title":" Fix for issues #54, #55 and #56","user":{"login":"christiana","id":436646,"avatar_url":"https://avatars.githubusercontent.com/u/436646?v=3","gravatar_id":"","url":"https://api.github.com/users/christiana","html_url":"https://github.com/christiana","followers_url":"https://api.github.com/users/christiana/followers","following_url":"https://api.github.com/users/christiana/following{/other_user}","gists_url":"https://api.github.com/users/christiana/gists{/gist_id}","starred_url":"https://api.github.com/users/christiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiana/subscriptions","organizations_url":"https://api.github.com/users/christiana/orgs","repos_url":"https://api.github.com/users/christiana/repos","events_url":"https://api.github.com/users/christiana/events{/privacy}","received_events_url":"https://api.github.com/users/christiana/received_events","type":"User","site_admin":false},"body":"Fixes for several issues encountered while sending vtkPolyData and vtkImageData out from and into Slicer3D. See issues #54, #55 and #56 for details.\r\n\r\nThe pull request has been tested manually on the nightly Slicer build, MacOSX only. Another version of the code (in https://github.com/SINTEFMedtek/CustusX/tree/master/source/resource/OpenIGTLinkUtilities) has also been tested on Ubuntu14.04 and Windows 8.","created_at":"2015-10-06T12:20:09Z","updated_at":"2015-11-25T14:51:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbbc314e91ed0c1802eea1d5792e4ece326d7676","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57/commits","review_comments_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57/comments","review_comment_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/57/comments","statuses_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/statuses/5612b271d2b751ca2ee34a102c1397e7c976e631","head":{"label":"SINTEFMedtek:master","ref":"master","sha":"5612b271d2b751ca2ee34a102c1397e7c976e631","user":{"login":"SINTEFMedtek","id":436512,"avatar_url":"https://avatars.githubusercontent.com/u/436512?v=3","gravatar_id":"","url":"https://api.github.com/users/SINTEFMedtek","html_url":"https://github.com/SINTEFMedtek","followers_url":"https://api.github.com/users/SINTEFMedtek/followers","following_url":"https://api.github.com/users/SINTEFMedtek/following{/other_user}","gists_url":"https://api.github.com/users/SINTEFMedtek/gists{/gist_id}","starred_url":"https://api.github.com/users/SINTEFMedtek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SINTEFMedtek/subscriptions","organizations_url":"https://api.github.com/users/SINTEFMedtek/orgs","repos_url":"https://api.github.com/users/SINTEFMedtek/repos","events_url":"https://api.github.com/users/SINTEFMedtek/events{/privacy}","received_events_url":"https://api.github.com/users/SINTEFMedtek/received_events","type":"Organization","site_admin":false},"repo":{"id":43565981,"name":"OpenIGTLinkIF","full_name":"SINTEFMedtek/OpenIGTLinkIF","owner":{"login":"SINTEFMedtek","id":436512,"avatar_url":"https://avatars.githubusercontent.com/u/436512?v=3","gravatar_id":"","url":"https://api.github.com/users/SINTEFMedtek","html_url":"https://github.com/SINTEFMedtek","followers_url":"https://api.github.com/users/SINTEFMedtek/followers","following_url":"https://api.github.com/users/SINTEFMedtek/following{/other_user}","gists_url":"https://api.github.com/users/SINTEFMedtek/gists{/gist_id}","starred_url":"https://api.github.com/users/SINTEFMedtek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SINTEFMedtek/subscriptions","organizations_url":"https://api.github.com/users/SINTEFMedtek/orgs","repos_url":"https://api.github.com/users/SINTEFMedtek/repos","events_url":"https://api.github.com/users/SINTEFMedtek/events{/privacy}","received_events_url":"https://api.github.com/users/SINTEFMedtek/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SINTEFMedtek/OpenIGTLinkIF","description":"OpenIGTLink interface module for 3D Slicer 4.x","fork":true,"url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF","forks_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/forks","keys_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/teams","hooks_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/hooks","issue_events_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/issues/events{/number}","events_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/events","assignees_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/assignees{/user}","branches_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/branches{/branch}","tags_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/tags","blobs_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/git/refs{/sha}","trees_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/statuses/{sha}","languages_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/languages","stargazers_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/stargazers","contributors_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/contributors","subscribers_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/subscribers","subscription_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/subscription","commits_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/commits{/sha}","git_commits_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/git/commits{/sha}","comments_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/comments{/number}","issue_comment_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/issues/comments{/number}","contents_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/contents/{+path}","compare_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/merges","archive_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/downloads","issues_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/issues{/number}","pulls_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/pulls{/number}","milestones_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/milestones{/number}","notifications_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/labels{/name}","releases_url":"https://api.github.com/repos/SINTEFMedtek/OpenIGTLinkIF/releases{/id}","created_at":"2015-10-02T17:15:52Z","updated_at":"2015-10-02T17:15:53Z","pushed_at":"2015-10-06T12:06:57Z","git_url":"git://github.com/SINTEFMedtek/OpenIGTLinkIF.git","ssh_url":"git@github.com:SINTEFMedtek/OpenIGTLinkIF.git","clone_url":"https://github.com/SINTEFMedtek/OpenIGTLinkIF.git","svn_url":"https://github.com/SINTEFMedtek/OpenIGTLinkIF","homepage":null,"size":544,"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":"openigtlink:master","ref":"master","sha":"435b1c315b72f467910b8b60653d0526cbfa3570","user":{"login":"openigtlink","id":945382,"avatar_url":"https://avatars.githubusercontent.com/u/945382?v=3","gravatar_id":"","url":"https://api.github.com/users/openigtlink","html_url":"https://github.com/openigtlink","followers_url":"https://api.github.com/users/openigtlink/followers","following_url":"https://api.github.com/users/openigtlink/following{/other_user}","gists_url":"https://api.github.com/users/openigtlink/gists{/gist_id}","starred_url":"https://api.github.com/users/openigtlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openigtlink/subscriptions","organizations_url":"https://api.github.com/users/openigtlink/orgs","repos_url":"https://api.github.com/users/openigtlink/repos","events_url":"https://api.github.com/users/openigtlink/events{/privacy}","received_events_url":"https://api.github.com/users/openigtlink/received_events","type":"Organization","site_admin":false},"repo":{"id":9077728,"name":"OpenIGTLinkIF","full_name":"openigtlink/OpenIGTLinkIF","owner":{"login":"openigtlink","id":945382,"avatar_url":"https://avatars.githubusercontent.com/u/945382?v=3","gravatar_id":"","url":"https://api.github.com/users/openigtlink","html_url":"https://github.com/openigtlink","followers_url":"https://api.github.com/users/openigtlink/followers","following_url":"https://api.github.com/users/openigtlink/following{/other_user}","gists_url":"https://api.github.com/users/openigtlink/gists{/gist_id}","starred_url":"https://api.github.com/users/openigtlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openigtlink/subscriptions","organizations_url":"https://api.github.com/users/openigtlink/orgs","repos_url":"https://api.github.com/users/openigtlink/repos","events_url":"https://api.github.com/users/openigtlink/events{/privacy}","received_events_url":"https://api.github.com/users/openigtlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openigtlink/OpenIGTLinkIF","description":"OpenIGTLink interface module for 3D Slicer 4.x","fork":false,"url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF","forks_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/forks","keys_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/teams","hooks_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/hooks","issue_events_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/events{/number}","events_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/events","assignees_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/assignees{/user}","branches_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/branches{/branch}","tags_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/tags","blobs_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/git/refs{/sha}","trees_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/statuses/{sha}","languages_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/languages","stargazers_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/stargazers","contributors_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/contributors","subscribers_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/subscribers","subscription_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/subscription","commits_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/commits{/sha}","git_commits_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/git/commits{/sha}","comments_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/comments{/number}","issue_comment_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/comments{/number}","contents_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/contents/{+path}","compare_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/merges","archive_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/downloads","issues_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues{/number}","pulls_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls{/number}","milestones_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/milestones{/number}","notifications_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/labels{/name}","releases_url":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/releases{/id}","created_at":"2013-03-28T13:36:40Z","updated_at":"2015-10-27T03:43:07Z","pushed_at":"2015-11-25T13:09:50Z","git_url":"git://github.com/openigtlink/OpenIGTLinkIF.git","ssh_url":"git@github.com:openigtlink/OpenIGTLinkIF.git","clone_url":"https://github.com/openigtlink/OpenIGTLinkIF.git","svn_url":"https://github.com/openigtlink/OpenIGTLinkIF","homepage":null,"size":536,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57"},"html":{"href":"https://github.com/openigtlink/OpenIGTLinkIF/pull/57"},"issue":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/57"},"comments":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/openigtlink/OpenIGTLinkIF/statuses/5612b271d2b751ca2ee34a102c1397e7c976e631"}}}}