case GEOMOp::OpFeatureDetect: // FEATURE DETECTION
aDlg = new EntityGUI_FeatureDetectorDlg( getGeometryGUI(), parent );
break;
+#endif
case GEOMOp::OpPictureImport: // IMPORT PICTURE IN VIEWER
aDlg = new EntityGUI_PictureImportDlg( getGeometryGUI(), parent );
break;
-#endif
default:
app->putInfo( tr( "GEOM_PRP_COMMAND" ).arg( theCommandID ) );
break;
#include <TopoDS.hxx>
#include <GEOMImpl_Types.hxx>
-
-#include <ShapeRec_FeatureDetector.hxx>
+// #include <ShapeRec_FeatureDetector.hxx>
#include <QFileDialog>
bool modal, Qt::WindowFlags fl )
: GEOMBase_Skeleton( theGeometryGUI, parent, modal, fl )
{
-// QPixmap image0( SUIT_Session::session()->resourceMgr()->loadPixmap( "GEOM", tr( "ICON_DLG_LINE_2P" ) ) );
setWindowTitle( tr( "GEOM_IMPORT_PICT_TITLE" ) );
mainFrame()->GroupConstructors->setTitle( tr( "GEOM_PICTURE" ) );
-// mainFrame()->RadioButton1->setIcon( image0 );
-// mainFrame()->RadioButton2->setIcon( image2 );
mainFrame()->RadioButton2->setAttribute(Qt::WA_DeleteOnClose);
mainFrame()->RadioButton2->close();
if ( theImgFileName.isEmpty() )
return res;
- ShapeRec_FeatureDetector* aDetector = new ShapeRec_FeatureDetector();
- aDetector->SetPath( theImgFileName.toStdString() );
-
- int height = aDetector->GetImgHeight();
- int width = aDetector->GetImgWidth();
-
+ QPixmap* pixmap = new QPixmap(theImgFileName);
+ int height = pixmap->height();
+ int width = pixmap->width();
GEOM::GEOM_Object_var P1 = aBasicOperations->MakePointXYZ( -0.5*width, -0.5*height, 0 );
GEOM::GEOM_Object_var P2 = aBasicOperations->MakePointXYZ( -0.5*width, 0.5*height, 0 );
FeatureDetectorDlg_Header = EntityGUI_FeatureDetectorDlg.h
FeatureDetectorDlg_Sources = EntityGUI_FeatureDetectorDlg.cxx
FeatureDetectorDlg_moc = EntityGUI_FeatureDetectorDlg_moc.cxx
- PictureImportDlg_Header = EntityGUI_PictureImportDlg.h
- PictureImportDlg_Sources = EntityGUI_PictureImportDlg.cxx
- PictureImportDlg_moc = EntityGUI_PictureImportDlg_moc.cxx
Opencv_libs = $(OPENCV_LIBS)
Opencv_includes = $(OPENCV_INCLUDES)
ShapeRec_dir = $(srcdir)/../ShapeRecognition
ShapeRec_la = ../ShapeRecognition/libGEOMShapeRec.la
endif
+PictureImportDlg_Header = EntityGUI_PictureImportDlg.h
+PictureImportDlg_Sources = EntityGUI_PictureImportDlg.cxx
+PictureImportDlg_moc = EntityGUI_PictureImportDlg_moc.cxx
+
# Libraries targets
lib_LTLIBRARIES = libEntityGUI.la
</message>
<message>
<source>GEOM_DETECT_ZONE</source>
- <translation>Select a detection zone (default is whole picture)</translation>
+ <translation>Select a detection zone
+(default is whole picture)</translation>
+ </message>
+ <message>
+ <source>GEOM_DETECT_OUTPUT</source>
+ <translation>Output type</translation>
</message>
<message>
<source>GEOM_PICTURE</source>
<source>GEOM_PICTURE</source>
<translation>Picture</translation>
</message>
+ <message>
+ <source>GEOM_FILE</source>
+ <translation>File name</translation>
+ </message>
<message>
<source>GEOM_IMPORT_PICT_TITLE</source>
<translation>Import picture in viewer</translation>
case GEOMOp::OpExplode: // MENU ENTITY - EXPLODE
#ifdef WITH_OPENCV
case GEOMOp::OpFeatureDetect: // MENU ENTITY - FEATURE DETECTION
- case GEOMOp::OpPictureImport: // MENU ENTITY - IMPORT PICTURE IN VIEWER
#endif
+ case GEOMOp::OpPictureImport: // MENU ENTITY - IMPORT PICTURE IN VIEWER
libName = "EntityGUI";
break;
case GEOMOp::OpEdge: // MENU BUILD - EDGE
createGeomAction( GEOMOp::OpExplode, "EXPLODE" );
#ifdef WITH_OPENCV
createGeomAction( GEOMOp::OpFeatureDetect,"FEATURE_DETECTION" );
- createGeomAction( GEOMOp::OpPictureImport,"PICTURE_IMPORT" );
#endif
+ createGeomAction( GEOMOp::OpPictureImport,"PICTURE_IMPORT" );
createGeomAction( GEOMOp::OpEdge, "EDGE" );
createGeomAction( GEOMOp::OpWire, "WIRE" );
createMenu( separator(), newEntId, -1 );
-#ifdef WITH_OPENCV
createMenu( GEOMOp::OpPictureImport, newEntId, -1 );
+#ifdef WITH_OPENCV
createMenu( GEOMOp::OpFeatureDetect, newEntId, -1 );
#endif
createTool( separator(), operTbId );
#ifdef WITH_OPENCV
createTool( GEOMOp::OpFeatureDetect, operTbId );
+#endif
createTool( GEOMOp::OpPictureImport, operTbId );
createTool( separator(), operTbId );
-#endif
+
createTool( GEOMOp::OpPartition, operTbId );
createTool( GEOMOp::OpArchimede, operTbId );
createTool( GEOMOp::OpShapesOnShape, operTbId );
OpExplode = 3302, // MENU NEW ENTITY - EXPLODE
#ifdef WITH_OPENCV
OpFeatureDetect = 3303, // MENU NEW ENTITY - FEATURE DETECTION
- OpPictureImport = 3304, // MENU NEW ENTITY - IMPORT PICTURE IN VIEWER
#endif
+ OpPictureImport = 3304, // MENU NEW ENTITY - IMPORT PICTURE IN VIEWER
+
// BuildGUI ------------------//--------------------------------
OpEdge = 3400, // MENU NEW ENTITY - BUILD - EDGE
OpWire = 3401, // MENU NEW ENTITY - BUILD - WIRE