From c4cd1a87aa7c0722ef7719e588b33ba01e0e6ca3 Mon Sep 17 00:00:00 2001 From: gdd Date: Tue, 8 Nov 2011 10:37:52 +0000 Subject: [PATCH] rnc: fixed some compilation issues realted to the new ShapeRecognition package --- configure.ac | 1 + src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx | 8 +++++--- src/EntityGUI/EntityGUI_PictureImportDlg.cxx | 4 ++-- src/EntityGUI/Makefile.am | 2 ++ src/Makefile.am | 8 ++++---- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index fda5d9f0b..1adb80209 100644 --- a/configure.ac +++ b/configure.ac @@ -337,6 +337,7 @@ echo testing Opencv echo --------------------------------------------- echo CHECK_OPENCV +AC_DEFINE_UNQUOTED(WITH_OPENCV,${WITH_OPENCV}) echo echo --------------------------------------------- diff --git a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx index a3570c28a..8be541587 100644 --- a/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx +++ b/src/EntityGUI/EntityGUI_FeatureDetectorDlg.cxx @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include @@ -39,6 +37,7 @@ #include #include #include +#include #include #include @@ -504,15 +503,18 @@ bool EntityGUI_FeatureDetectorDlg::execute( ObjectList& objects ) return res; // Build an instance of detection used to perform image processing operations - OCCViewer_FeatureDetector* aDetector = new OCCViewer_FeatureDetector( theImgFileName ); + ShapeRec_FeatureDetector* aDetector = new ShapeRec_FeatureDetector( theImgFileName ); int height = aDetector->GetImgHeight(); int width = aDetector->GetImgWidth(); + +// NOTE: OLD int winHeight = vp->height(); int winWidth = vp->width(); double x_offset, y_offset; int i; +// NOTE: OLD // Recompute of the values computed in OCC OpenGl_view.c // while waiting for a function to retrieve parameters of the displayed backgroun image double hratio = winHeight * 1.0 / height; diff --git a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx index a513fa1ee..dbd02bd5b 100644 --- a/src/EntityGUI/EntityGUI_PictureImportDlg.cxx +++ b/src/EntityGUI/EntityGUI_PictureImportDlg.cxx @@ -40,7 +40,7 @@ #include -#include +#include #include @@ -182,7 +182,7 @@ bool EntityGUI_PictureImportDlg::execute( ObjectList& objects ) if ( theImgFileName.isEmpty() ) return res; - OCCViewer_FeatureDetector* aDetector = new OCCViewer_FeatureDetector( theImgFileName ); + ShapeRec_FeatureDetector* aDetector = new ShapeRec_FeatureDetector( theImgFileName ); int height = aDetector->GetImgHeight(); int width = aDetector->GetImgWidth(); diff --git a/src/EntityGUI/Makefile.am b/src/EntityGUI/Makefile.am index 0023761b4..a1fbbcb93 100644 --- a/src/EntityGUI/Makefile.am +++ b/src/EntityGUI/Makefile.am @@ -106,6 +106,7 @@ libEntityGUI_la_CPPFLAGS = \ -I$(srcdir)/../GEOMImpl \ -I$(srcdir)/../GEOMFiltersSelection \ -I$(srcdir)/../SKETCHER \ + -I$(srcdir)/../ShapeRecognition \ -I$(srcdir)/../GEOM \ -I$(top_builddir)/src/DlgRef \ -I$(top_builddir)/idl @@ -115,6 +116,7 @@ libEntityGUI_la_LDFLAGS = \ ../GEOMBase/libGEOMBase.la \ ../SKETCHER/libGEOMSketcher.la \ ../GEOMGUI/libGEOM.la \ + ../ShapeRecognition/libGEOMShapeRec.la \ $(QT_MT_LIBS) \ $(CAS_TKTopAlgo) -lTKernel \ $(Opencv_libs) diff --git a/src/Makefile.am b/src/Makefile.am index f429148aa..61851d56e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,6 +27,10 @@ SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER OCC2VTK GEOM \ STEPImport STLExport VTKExport ShHealOper GEOMImpl GEOM_I \ GEOMClient GEOM_I_Superv GEOM_SWIG GEOM_PY +if WITH_OPENCV + SUBDIRS += ShapeRecognition +endif + if GEOM_ENABLE_GUI SUBDIRS += OBJECT DlgRef GEOMFiltersSelection GEOMGUI GEOMBase GEOMToolsGUI \ DisplayGUI BasicGUI PrimitiveGUI GenerationGUI EntityGUI BuildGUI \ @@ -34,10 +38,6 @@ if GEOM_ENABLE_GUI GroupGUI BlocksGUI AdvancedGUI GEOM_SWIG_WITHIHM endif -if WITH_OPENCV - SUBDIRS += ShapeRecognition -endif - DIST_SUBDIRS = ARCHIMEDE NMTDS NMTTools GEOMAlgo SKETCHER OCC2VTK GEOM BREPExport\ BREPImport IGESExport IGESImport STEPExport STEPImport STLExport \ VTKExport ShHealOper GEOMImpl GEOM_I GEOMClient GEOM_I_Superv \ -- 2.39.2