Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 #ifndef PCL_MODELER_CHANNEL_ACTOR_ITEM_H_
00037 #define PCL_MODELER_CHANNEL_ACTOR_ITEM_H_
00038 
00039 #include <vtkSmartPointer.h>
00040 #include <boost/shared_ptr.hpp>
00041 #include <pcl/common/eigen.h>
00042 #include <pcl/apps/modeler/qt.h>
00043 #include <pcl/apps/modeler/abstract_item.h>
00044 
00045 class vtkActor;
00046 class vtkPolyData;
00047 class vtkMatrix4x4;
00048 class vtkRenderWindow;
00049 
00050 
00051 namespace pcl
00052 {
00053   namespace modeler
00054   {
00055     class CloudMesh;
00056 
00057     class ChannelActorItem : public QTreeWidgetItem, public AbstractItem
00058     {
00059       public:
00060         ChannelActorItem(QTreeWidgetItem* parent,
00061                          const boost::shared_ptr<CloudMesh>& cloud_mesh,
00062                          const vtkSmartPointer<vtkRenderWindow>& render_window,
00063                          const vtkSmartPointer<vtkActor>& actor,
00064                          const std::string& channel_name);
00065         ~ChannelActorItem();
00066 
00067         void
00068         init();
00069 
00070         void
00071         update();
00072 
00073         void
00074         switchRenderWindow(vtkRenderWindow* render_window);
00075 
00076       protected:
00077         void
00078         attachActor();
00079 
00080         void
00081         detachActor();
00082 
00083         virtual void
00084         initImpl() = 0;
00085 
00086         virtual void
00087         updateImpl() = 0;
00088 
00089         virtual void
00090         prepareContextMenu(QMenu* menu) const;
00091 
00092         boost::shared_ptr<CloudMesh>      cloud_mesh_;
00093         vtkSmartPointer<vtkPolyData>      poly_data_;
00094         vtkSmartPointer<vtkRenderWindow>  render_window_;
00095         std::string                       color_scheme_;
00096         vtkSmartPointer<vtkActor>         actor_;
00097         double                            r_, g_, b_;
00098 
00099       private:
00100     };
00101   }
00102 }
00103 
00104 #endif // PCL_MODELER_CHANNEL_ACTOR_ITEM_H_