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_REGISTRATION_CORRESPONDENCE_SORTING_H_
00037 #define PCL_REGISTRATION_CORRESPONDENCE_SORTING_H_
00038
00039 #include <pcl/registration/correspondence_types.h>
00040
00041 namespace pcl
00042 {
00043 namespace registration
00044 {
00045
00049 struct sortCorrespondencesByQueryIndex : public std::binary_function<pcl::registration::Correspondence, pcl::registration::Correspondence, bool>
00050 {
00051 bool operator()( pcl::registration::Correspondence a, pcl::registration::Correspondence b)
00052 {
00053 return (a.indexQuery < b.indexQuery);
00054 }
00055 };
00056
00060 struct sortCorrespondencesByMatchIndex : public std::binary_function<pcl::registration::Correspondence, pcl::registration::Correspondence, bool>
00061 {
00062 bool operator()( pcl::registration::Correspondence a, pcl::registration::Correspondence b)
00063 {
00064 return (a.indexMatch < b.indexMatch);
00065 }
00066 };
00067
00071 struct sortCorrespondencesByDistance : public std::binary_function<pcl::registration::Correspondence, pcl::registration::Correspondence, bool>
00072 {
00073 bool operator()( pcl::registration::Correspondence a, pcl::registration::Correspondence b)
00074 {
00075 return (a.distance < b.distance);
00076 }
00077 };
00078
00082 struct sortCorrespondencesByQueryIndexAndDistance : public std::binary_function<pcl::registration::Correspondence, pcl::registration::Correspondence, bool>
00083 {
00084 bool operator()( pcl::registration::Correspondence a, pcl::registration::Correspondence b)
00085 {
00086 if (a.indexQuery < b.indexQuery)
00087 return true;
00088 else if ( (a.indexQuery == b.indexQuery) && (a.distance < b.distance) )
00089 return true;
00090 return false;
00091 }
00092 };
00093
00097 struct sortCorrespondencesByMatchIndexAndDistance : public std::binary_function<pcl::registration::Correspondence, pcl::registration::Correspondence, bool>
00098 {
00099 bool operator()( pcl::registration::Correspondence a, pcl::registration::Correspondence b)
00100 {
00101 if (a.indexMatch < b.indexMatch)
00102 return true;
00103 else if ( (a.indexMatch == b.indexMatch) && (a.distance < b.distance) )
00104 return true;
00105 return false;
00106 }
00107 };
00108
00109
00110 }
00111 }
00112
00113 #endif