00001 // This is brl/bbas/bsta/bsta_joint_histogram_3d_base.h 00002 #ifndef bsta_joint_histogram_3d_base_h_ 00003 #define bsta_joint_histogram_3d_base_h_ 00004 //: 00005 // \file 00006 // \brief Abstract base class for joint_histogram_3d 00007 // \author Joseph L. Mundy 00008 // \date June 29, 2011 00009 // \verbatim 00010 // Modifications 00011 // \endverbatim 00012 #include <vbl/vbl_ref_count.h> 00013 #include <vcl_compiler.h> 00014 class bsta_joint_histogram_3d_base : public vbl_ref_count 00015 { 00016 public: 00017 enum bsta_joint_hist_3d_type 00018 { 00019 HIST_TYPE_UNKNOWN = 0, 00020 HIST_TYPE_FLOAT = 1, 00021 HIST_TYPE_DOUBLE = 2, 00022 HIST_TYPE_END = 3 00023 }; 00024 bsta_joint_histogram_3d_base(): type_(HIST_TYPE_UNKNOWN){} 00025 00026 virtual ~bsta_joint_histogram_3d_base() {} 00027 00028 bsta_joint_hist_3d_type type_; 00029 }; 00030 00031 template <class T> 00032 class bsta_joint_histogram_3d_traits 00033 { 00034 public: 00035 static bsta_joint_histogram_3d_base::bsta_joint_hist_3d_type type(){ 00036 return bsta_joint_histogram_3d_base::HIST_TYPE_UNKNOWN;} 00037 }; 00038 00039 VCL_DEFINE_SPECIALIZATION 00040 class bsta_joint_histogram_3d_traits<float> 00041 { 00042 public: 00043 static bsta_joint_histogram_3d_base::bsta_joint_hist_3d_type type(){ 00044 return bsta_joint_histogram_3d_base::HIST_TYPE_FLOAT;} 00045 }; 00046 00047 VCL_DEFINE_SPECIALIZATION 00048 class bsta_joint_histogram_3d_traits<double> 00049 { 00050 public: 00051 static bsta_joint_histogram_3d_base::bsta_joint_hist_3d_type type(){ 00052 return bsta_joint_histogram_3d_base::HIST_TYPE_DOUBLE;} 00053 }; 00054 00055 #endif // bsta_joint_histogram_3d_base_h_