00001 00063 #ifndef COB_3D_MAPPING_TOOLS_GUI_TYPES_H_ 00064 #define COB_3D_MAPPING_TOOLS_GUI_TYPES_H_ 00065 00066 #include <highgui.h> 00067 00068 #include <pcl/point_types.h> 00069 #include <pcl/io/pcd_io.h> 00070 00071 00072 namespace Gui 00073 { 00074 typedef cv::Mat_<cv::Vec3b> cvImage; 00075 typedef boost::shared_ptr<cvImage> cvImagePtr; 00076 typedef boost::shared_ptr<wxBitmap> wxBitmapPtr; 00077 00078 namespace ViewTypes 00079 { 00080 struct View2D {}; 00081 struct View3D {}; 00082 struct ViewText {}; 00083 00084 struct Color : public View2D { static const std::string STR; }; 00085 struct Depth_Z : public View2D { static const std::string STR; }; 00086 template<size_t Channel> 00087 struct Normal : public View2D { static const std::string STR; }; 00088 00089 // not implemented, totally different approach necessary! 00090 // use OnIdle in MainApp -> wxApp 00091 struct Depth_3D : public View3D { static const std::string STR; }; 00092 struct Histogram : public View2D { static const std::string STR; }; 00093 // not implemented 00094 struct Curvature : public View2D { static const std::string STR; }; 00095 // not implemented 00096 struct SomethingWithText : public ViewText { static const std::string STR; }; 00097 // not implemented 00098 00099 const std::string Color::STR = "Color View"; 00100 const std::string Depth_Z::STR = "Depth View"; 00101 template<> const std::string Normal<0>::STR = "Normal x View"; 00102 template<> const std::string Normal<1>::STR = "Normal y View"; 00103 template<> const std::string Normal<2>::STR = "Normal z View"; 00104 const std::string Depth_3D::STR = "Depth3D View"; 00105 const std::string Histogram::STR = "Histogram View"; 00106 const std::string Curvature::STR = "Curvature View"; 00107 const std::string SomethingWithText::STR = "Text View"; 00108 } 00109 00110 namespace ResourceTypes 00111 { 00112 struct BaseCloud {}; 00113 00114 template<typename PT> 00115 struct PointCloud : public BaseCloud 00116 { 00117 static const std::string STR; 00118 typedef pcl::PointCloud<PT> DataTypeRaw; 00119 typedef typename pcl::PointCloud<PT>::Ptr DataTypePtr; 00120 typedef PT PointType; // special typedef for all base clouds 00121 }; 00122 00123 template<typename PT> 00124 struct OrganizedPointCloud : public BaseCloud 00125 { 00126 static const std::string STR; 00127 typedef pcl::PointCloud<PT> DataTypeRaw; 00128 typedef typename pcl::PointCloud<PT>::Ptr DataTypePtr; 00129 typedef PT PointType; // special typedef for all base clouds 00130 }; 00131 00132 struct Image 00133 { 00134 typedef cvImage DataTypeRaw; 00135 typedef cvImagePtr DataTypePtr; 00136 static const std::string STR; 00137 }; 00138 00139 template<typename PT> const std::string PointCloud<PT>::STR = "Cloud"; 00140 template<typename PT> const std::string OrganizedPointCloud<PT>::STR = "OrgaCloud"; 00141 const std::string Image::STR = "Image"; 00142 } 00143 } 00144 00145 #endif