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
00037
00038
00039
00040 #ifndef PCL_REGISTRATION_CORRESPONDENCE_SORTING_H_
00041 #define PCL_REGISTRATION_CORRESPONDENCE_SORTING_H_
00042
00043 #if defined __GNUC__
00044 # pragma GCC system_header
00045 #endif
00046
00047 #include <pcl/registration/correspondence_types.h>
00048
00049 namespace pcl
00050 {
00051 namespace registration
00052 {
00057 struct sortCorrespondencesByQueryIndex : public std::binary_function<pcl::Correspondence, pcl::Correspondence, bool>
00058 {
00059 bool
00060 operator()( pcl::Correspondence a, pcl::Correspondence b)
00061 {
00062 return (a.index_query < b.index_query);
00063 }
00064 };
00065
00070 struct sortCorrespondencesByMatchIndex : public std::binary_function<pcl::Correspondence, pcl::Correspondence, bool>
00071 {
00072 bool
00073 operator()( pcl::Correspondence a, pcl::Correspondence b)
00074 {
00075 return (a.index_match < b.index_match);
00076 }
00077 };
00078
00083 struct sortCorrespondencesByDistance : public std::binary_function<pcl::Correspondence, pcl::Correspondence, bool>
00084 {
00085 bool
00086 operator()( pcl::Correspondence a, pcl::Correspondence b)
00087 {
00088 return (a.distance < b.distance);
00089 }
00090 };
00091
00096 struct sortCorrespondencesByQueryIndexAndDistance : public std::binary_function<pcl::Correspondence, pcl::Correspondence, bool>
00097 {
00098 inline bool
00099 operator()( pcl::Correspondence a, pcl::Correspondence b)
00100 {
00101 if (a.index_query < b.index_query)
00102 return (true);
00103 else if ( (a.index_query == b.index_query) && (a.distance < b.distance) )
00104 return (true);
00105 return (false);
00106 }
00107 };
00108
00113 struct sortCorrespondencesByMatchIndexAndDistance : public std::binary_function<pcl::Correspondence, pcl::Correspondence, bool>
00114 {
00115 inline bool
00116 operator()( pcl::Correspondence a, pcl::Correspondence b)
00117 {
00118 if (a.index_match < b.index_match)
00119 return (true);
00120 else if ( (a.index_match == b.index_match) && (a.distance < b.distance) )
00121 return (true);
00122 return (false);
00123 }
00124 };
00125
00126 }
00127 }
00128
00129 #endif