PLearn 0.1
icp_test.cc
Go to the documentation of this file.
00001 
00002 #include "icpalign.h"
00003 
00004 int main (int argc, char ** argv) {
00005 
00006     if (argc < 3) {cout<< "error , provide model and scene name" ; return 0 ; }
00007     
00008     string name1 = string(argv[1]) + ".vrml" ; 
00009     string name2 = string(argv[2]) + ".vrml" ;
00010     
00011     PMolecule m1 , m2 ;  
00012     m1 = Molecule::readMolecule(string(argv[1])) ; 
00013     m2 = Molecule::readMolecule(string(argv[2])) ; 
00014     
00015     Mat wm ; 
00016     ::align(name1,m1->chem ,name2,m2->chem,wm)  ; 
00017     
00018     for(int i=0 ; i<wm.length() ; ++i) { 
00019         for(int j=0 ; j<wm.width() ; ++j) { 
00020             if (wm[i][j] > 0.5)
00021                 cout << i+1 << " " << j+1 << endl ; 
00022         }
00023 
00024     }
00025 
00026 }
00027 
00028 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines