Ver código fonte

added fthrow in ICETools, LFSiftPP and LocalFeatureSift, where visualization was needed

Alexander Luetz 13 anos atrás
pai
commit
9f40a67148

+ 58 - 57
baselib/ICETools.cpp

@@ -33,67 +33,68 @@ ICETools::~ICETools()
 
 
 void ICETools::selectRectangles ( const NICE::Image & panel, NICE::Image & overlay, vector<Vector> & x, int color )
 void ICETools::selectRectangles ( const NICE::Image & panel, NICE::Image & overlay, vector<Vector> & x, int color )
 {
 {
-#ifndef NOVISUAL
-    // new NICE code
-    vector<RectT<double> > rectangles;
-	 //TODO check this!
-//     NICE::selectRectangles ( panel, rectangles, "select rectangles" );
-// 	 selectRectangles ( panel, rectangles, "select rectangles" );
-
-    for ( vector<RectT<double> >::const_iterator i = rectangles.begin();
-	i != rectangles.end(); i++ )
-    {
-	Vector vec (4);
-	vec[0] = i->left;
-	vec[1] = i->top;
-	vec[2] = i->right();
-	vec[3] = i->bottom();
-
-	x.push_back ( vec ); 
-    }
-#else
-    fprintf (stderr, "ICETools::selectRectangles: visualization disabled !\n");
-#endif
-
+	fthrow("ICETools::selectRectangles -- not yet implemented due to old ICE version.");
+// #ifndef NOVISUAL
+//     // new NICE code
+//     vector<RectT<double> > rectangles;
+// 	 //TODO check this!
+// //     NICE::selectRectangles ( panel, rectangles, "select rectangles" );
+// // 	 selectRectangles ( panel, rectangles, "select rectangles" );
+// 
+//     for ( vector<RectT<double> >::const_iterator i = rectangles.begin();
+// 	i != rectangles.end(); i++ )
+//     {
+// 	Vector vec (4);
+// 	vec[0] = i->left;
+// 	vec[1] = i->top;
+// 	vec[2] = i->right();
+// 	vec[3] = i->bottom();
+// 
+// 	x.push_back ( vec ); 
+//     }
+// #else
+//     fprintf (stderr, "ICETools::selectRectangles: visualization disabled !\n");
+// #endif
 }
 }
 
 
 void ICETools::selectPoints ( const NICE::Image & panel, NICE::Image & overlay, vector<Vector> & x, int color )
 void ICETools::selectPoints ( const NICE::Image & panel, NICE::Image & overlay, vector<Vector> & x, int color )
 {
 {
-#ifndef NOVISUAL
-    vector<CoordT<double> > points;
-	 //TODO check this!
-//     NICE::selectPoints ( panel, points, "select points" );
-// 	selectPoints ( panel, points, "select points" );
-
-    for ( vector<CoordT<double> >::const_iterator i = points.begin();
-	i != points.end(); i++ )
-    {
-	Vector vec (2);
-	vec[0] = i->x;
-	vec[1] = i->y;
-
-	x.push_back ( vec ); 
-    }
-   
-    /** OLD ICE Code
-    int p[2];
-    int rc = -1;
-
-    while ( (rc = SelPoint ( DEFAULT, panel, p )) != -1 )
-    {
-        int x1, y1;
-        x1 = p[0]; y1 = p[1];
-        // refactor-nice.pl: check this substitution
-        // old: Marker ( DEFAULT, p[0], p[1], color, 5, overlay );
-        // REFACTOR-FIXME Unable to map this statement
-        // refactor-nice.pl: check this substitution
-        // old: x.push_back ( Vector(x1, y1) );
-        // REFACTOR-FIXME Unable to std::map this statement
-    }
-    */
-#else
-    fprintf (stderr, "ICETools::selectPoints: visualization disabled !\n");
-#endif
+	fthrow("ICETools::selectPoints -- not yet implemented due to old ICE version.");
+// #ifndef NOVISUAL
+//     vector<CoordT<double> > points;
+// 	 //TODO check this!
+// //     NICE::selectPoints ( panel, points, "select points" );
+// // 	selectPoints ( panel, points, "select points" );
+// 
+//     for ( vector<CoordT<double> >::const_iterator i = points.begin();
+// 	i != points.end(); i++ )
+//     {
+// 	Vector vec (2);
+// 	vec[0] = i->x;
+// 	vec[1] = i->y;
+// 
+// 	x.push_back ( vec ); 
+//     }
+//    
+//     /** OLD ICE Code
+//     int p[2];
+//     int rc = -1;
+// 
+//     while ( (rc = SelPoint ( DEFAULT, panel, p )) != -1 )
+//     {
+//         int x1, y1;
+//         x1 = p[0]; y1 = p[1];
+//         // refactor-nice.pl: check this substitution
+//         // old: Marker ( DEFAULT, p[0], p[1], color, 5, overlay );
+//         // REFACTOR-FIXME Unable to map this statement
+//         // refactor-nice.pl: check this substitution
+//         // old: x.push_back ( Vector(x1, y1) );
+//         // REFACTOR-FIXME Unable to std::map this statement
+//     }
+//     */
+// #else
+//     fprintf (stderr, "ICETools::selectPoints: visualization disabled !\n");
+// #endif
 
 
 }
 }
 
 

+ 1 - 0
features/localfeatures/LFSiftPP.cpp

@@ -196,6 +196,7 @@ void LFSiftPP::visualizeFeatures ( NICE::Image & mark,
 				 const VVector & positions,
 				 const VVector & positions,
 				 size_t color ) const
 				 size_t color ) const
 {
 {
+	fthrow("LFSiftPP::visualizeFeatures -- not yet implemented due to old ICE version.");
 // #ifdef NICE_USELIB_ICE
 // #ifdef NICE_USELIB_ICE
 //     ice::Image mark_ice = ice::NewImg ( mark.width(), 
 //     ice::Image mark_ice = ice::NewImg ( mark.width(), 
 // 	mark.height(), 255 );
 // 	mark.height(), 255 );

+ 2 - 1
features/localfeatures/LocalFeatureSift.cpp

@@ -171,6 +171,8 @@ void LocalFeatureSift::visualizeFeatures ( NICE::Image & mark,
 				 const VVector & positions,
 				 const VVector & positions,
 				 size_t color ) const
 				 size_t color ) const
 {
 {
+	fthrow("LocalFeatureSift::visualizeFeatures -- not yet implemented due to old ICE version.");
+//TODO check this!
 // #ifdef NICE_USELIB_ICE
 // #ifdef NICE_USELIB_ICE
 //     ice::Image mark_ice = ice::NewImg ( mark.width(), 
 //     ice::Image mark_ice = ice::NewImg ( mark.width(), 
 // 	mark.height(), 255 );
 // 	mark.height(), 255 );
@@ -212,6 +214,5 @@ void LocalFeatureSift::visualizeFeatures ( NICE::Image & mark,
 // #else
 // #else
 // 	cerr << "uses ice visualization, please install ice or change to NICE visualization" << endl;
 // 	cerr << "uses ice visualization, please install ice or change to NICE visualization" << endl;
 // #endif
 // #endif
-//TODO check this!
 }
 }