{"action":"created","issue":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1295","labels_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1295/labels{/name}","comments_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1295/comments","events_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1295/events","html_url":"https://github.com/PointCloudLibrary/pcl/pull/1295","id":100396041,"number":1295,"title":"Made it so that PointCloudColorHandlerRGBField uses pcl::getFieldInde…","user":{"login":"indianajohn-aemass","id":13701031,"avatar_url":"https://avatars.githubusercontent.com/u/13701031?v=3","gravatar_id":"","url":"https://api.github.com/users/indianajohn-aemass","html_url":"https://github.com/indianajohn-aemass","followers_url":"https://api.github.com/users/indianajohn-aemass/followers","following_url":"https://api.github.com/users/indianajohn-aemass/following{/other_user}","gists_url":"https://api.github.com/users/indianajohn-aemass/gists{/gist_id}","starred_url":"https://api.github.com/users/indianajohn-aemass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianajohn-aemass/subscriptions","organizations_url":"https://api.github.com/users/indianajohn-aemass/orgs","repos_url":"https://api.github.com/users/indianajohn-aemass/repos","events_url":"https://api.github.com/users/indianajohn-aemass/events{/privacy}","received_events_url":"https://api.github.com/users/indianajohn-aemass/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-11T19:59:10Z","updated_at":"2015-08-11T21:40:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/pulls/1295","html_url":"https://github.com/PointCloudLibrary/pcl/pull/1295","diff_url":"https://github.com/PointCloudLibrary/pcl/pull/1295.diff","patch_url":"https://github.com/PointCloudLibrary/pcl/pull/1295.patch"},"body":"…x, allowing PointCloudColorHandlerRGBField to be instantiated by clouds without RGB fields. In the absence of RGB fields, clouds are colored white. This was done to prevent a compilation error for the next change: made it so that PCLVisualizer::addPointCloud<CustomPointT>(cloud) uses a PointCloudColroHandlerRGBField by default if an RGB field is present in the custom point type. If an RGB field is not present, the previous behavior prevails. Previously, if addPointCloud<CustomPointT>(cloud) were called, a cryptic runtime error stating that the RGB field was not capable was given; these changes seem to implement a more intuitive behavior.\r\n\r\nTo reproduce the erroneous behavior in the previous versions of PCL, create a custom point type with fields identical to pcl::PointXYZRGBA and add try the following snippet:\r\n\r\n```C++\r\nPCLVisualizer myVisualizer;\r\n...\r\npcl::PointCloud<MyCustomPointType>::Ptr cloud;\r\n...\r\nmyVisualizer.addPointCloud<MyCustomPointType>(cloud,\"test\");\r\n```\r\n\r\nThe above code results in a compilation error."},"comment":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/comments/130085928","html_url":"https://github.com/PointCloudLibrary/pcl/pull/1295#issuecomment-130085928","issue_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/1295","id":130085928,"user":{"login":"indianajohn-aemass","id":13701031,"avatar_url":"https://avatars.githubusercontent.com/u/13701031?v=3","gravatar_id":"","url":"https://api.github.com/users/indianajohn-aemass","html_url":"https://github.com/indianajohn-aemass","followers_url":"https://api.github.com/users/indianajohn-aemass/followers","following_url":"https://api.github.com/users/indianajohn-aemass/following{/other_user}","gists_url":"https://api.github.com/users/indianajohn-aemass/gists{/gist_id}","starred_url":"https://api.github.com/users/indianajohn-aemass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianajohn-aemass/subscriptions","organizations_url":"https://api.github.com/users/indianajohn-aemass/orgs","repos_url":"https://api.github.com/users/indianajohn-aemass/repos","events_url":"https://api.github.com/users/indianajohn-aemass/events{/privacy}","received_events_url":"https://api.github.com/users/indianajohn-aemass/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T21:40:21Z","updated_at":"2015-08-11T21:40:21Z","body":"Hi Sergey,\r\n\r\nI addressed your comments in subsequent commit 0f5f3ff74b37ab35a29e5fc65072037edbee67e0. Let me know if I can be of further help.\r\n\r\nJohn"}}