title: calculate normals and displaying with PCL
body: <p>Hello I'm trying to work whith a point cloud to get some planes by clustering the normals from the points, so I'm using the following code but it seems is not working as I want.
  I don`t know almost anything about programming on PCL, so my doubts are where is the variable that contains the cloud if I want to work with, and for displaying the normals is necessary to use PCLVisualizer, but I tried some stuff without getting a good result. 
  So could you pleas give some advices to get the results, that I need.
  Best Regards and thank you.</p>
  
  <pre><code>#include &lt;pcl/point_types.h&gt;
  #include &lt;pcl/visualization/pcl_visualizer.h&gt;    
  #include &lt;pcl/io/openni_grabber.h&gt;
  #include &lt;pcl/sample_consensus/sac_model_plane.h&gt;
  #include &lt;pcl/visualization/cloud_viewer.h&gt;
  #include &lt;pcl/features/normal_3d.h&gt;
  using namespace std;
  
  
  class SimpleOpenNIViewer
   {
     public:
       pcl::NormalEstimation&lt;pcl::PointXYZ, pcl::Normal&gt; ne;
       SimpleOpenNIViewer () : viewer ("PCL OpenNI Viewer") {}
       void cloud_cb_ (const pcl::PointCloud&lt;pcl::PointXYZ&gt;::ConstPtr &amp;cloud)
       {
         if (!viewer.wasStopped())
         {
              ne.setInputCloud (cloud);
  
              pcl::search::KdTree&lt;pcl::PointXYZ&gt;::Ptr tree (new pcl::search::KdTree&lt;pcl::PointXYZ&gt; ());
              ne.setSearchMethod (tree);
              pcl::PointCloud&lt;pcl::Normal&gt;::Ptr cloud_normals (new pcl::PointCloud&lt;pcl::Normal&gt;);
              ne.setRadiusSearch (0.03);
             ne.compute (*cloud_normals);
             cout&lt;&lt;"Normales calculadas"&lt;&lt;endl;
             viewer.showCloud (cloud);
         }
  
       }
       void run ()
       {
  
         pcl::Grabber* interface = new pcl::OpenNIGrabber();
         boost::function&lt;void (const pcl::PointCloud&lt;pcl::PointXYZ&gt;::ConstPtr&amp;)&gt; f =
         boost::bind (&amp;SimpleOpenNIViewer::cloud_cb_, this, _1);
  
         interface-&gt;registerCallback (f);
         interface-&gt;start ();
         while (!viewer.wasStopped())
         {
           boost::this_thread::sleep (boost::posix_time::seconds (1));
         }
         interface-&gt;stop ();
       }
       pcl::visualization::CloudViewer viewer;
   };
  
   int main ()
   {
     SimpleOpenNIViewer v;
     v.run ();
     return 0;
   }
  </code></pre>