diff --git a/DiagramRecognizer/DiagramRecognizer b/DiagramRecognizer/DiagramRecognizer
new file mode 100755
index 0000000..f307475
Binary files /dev/null and b/DiagramRecognizer/DiagramRecognizer differ
diff --git a/DiagramRecognizer/DiagramRecognizer.pro b/DiagramRecognizer/DiagramRecognizer.pro
index b75983b..4824c21 100644
--- a/DiagramRecognizer/DiagramRecognizer.pro
+++ b/DiagramRecognizer/DiagramRecognizer.pro
@@ -19,7 +19,17 @@ SOURCES += main.cpp\
simpleFormsInitializer.cpp \
recognizers/mixedGesturesManager.cpp \
recognizers/nearestPosGridGesturesManager.cpp \
- recognizers/rectangleGesturesManager.cpp
+ recognizers/rectangleGesturesManager.cpp \
+ newfigure.cpp \
+ segmentator.cpp \
+ connectedComponent.cpp \
+ graph.cpp \
+ field.cpp \
+ eFigure.cpp \
+ eLink.cpp \
+ section.cpp \
+ figure.cpp \
+ link.cpp
HEADERS += \
geometricForms.h \
@@ -28,17 +38,25 @@ HEADERS += \
recognizers/curveKeyBuilder.h \
output.h \
component.h \
- figure.h \
- edge.h \
diagramRecognizer.h \
formSegmentator.h \
simpleFormsInitializer.h \
recognizers/mixedGesturesManager.h \
- recognizers/nearestPosGridGesturesmanager.h \
- recognizers/rectangleGesturesManager.h
+ recognizers/nearestPosGridGesturesManager.h \
+ recognizers/rectangleGesturesManager.h \
+ segmentator.h \
+ connectedComponent.h \
+ graph.h \
+ field.h \
+ eLink.h \
+ eFigure.h \
+ section.h \
+ figure.h \
+ link.h
FORMS +=
OTHER_FILES += \
readme.txt \
- Conception.jpg
+ Conception.jpg \
+ test1.txt
diff --git a/DiagramRecognizer/DiagramRecognizer.pro.user b/DiagramRecognizer/DiagramRecognizer.pro.user
new file mode 100644
index 0000000..ecdeab3
--- /dev/null
+++ b/DiagramRecognizer/DiagramRecognizer.pro.user
@@ -0,0 +1,255 @@
+
+
+
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ qt2
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ System
+ false
+ 4
+ false
+ true
+ 1
+ true
+ 0
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ false
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop-Qt 4.8.4 in PATH (System)
+ Desktop-Qt 4.8.4 in PATH (System)
+ {80cdbbb9-93f9-4f50-a8cf-e65d092db33a}
+ 1
+ 0
+ 0
+
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ false
+ true
+
+ false
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ false
+ -r -w
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ true
+ -r -w clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Qt 4.8.4 in PATH (System) Release
+
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ /home/kraychik/Desktop/tools/DiagramRecognizer-build-desktop-Qt_4_8_4_in_PATH__System__Release
+ false
+
+
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ false
+ true
+
+ false
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ false
+ -r -w
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+
+ -w
+ -r
+
+ true
+ -r -w clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Qt 4.8.4 in PATH (System) Debug
+
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+ /home/kraychik/Desktop/tools/DiagramRecognizer-build-desktop-Qt_4_8_4_in_PATH__System__Debug
+ false
+
+ 2
+
+
+ 0
+ Deploy
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ No deployment
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 25
+
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+ DiagramRecognizer
+
+ Qt4ProjectManager.Qt4RunConfiguration:/home/Kraychik/Desktop/proj/tools/DiagramRecognizer/DiagramRecognizer.pro
+ 2
+
+ DiagramRecognizer.pro
+ false
+ false
+
+
+ 3768
+ true
+ false
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.EnvironmentId
+ {c6d051b5-09f3-4d37-9c54-be836a6eed6b}
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 12
+
+
diff --git a/DiagramRecognizer/DiagramRecognizer.pro.user.2.6pre1 b/DiagramRecognizer/DiagramRecognizer.pro.user.2.6pre1
new file mode 100644
index 0000000..569eea7
--- /dev/null
+++ b/DiagramRecognizer/DiagramRecognizer.pro.user.2.6pre1
@@ -0,0 +1,242 @@
+
+
+
+
+
+ ProjectExplorer.Project.ActiveTarget
+ 0
+
+
+ ProjectExplorer.Project.EditorSettings
+
+ true
+ false
+ true
+
+ Cpp
+
+ qt2
+
+
+
+ QmlJS
+
+ QmlJSGlobal
+
+
+ 2
+ System
+ false
+ 4
+ false
+ true
+ 1
+ true
+ 0
+ true
+ 0
+ 8
+ true
+ 1
+ true
+ true
+ true
+ false
+
+
+
+ ProjectExplorer.Project.PluginSettings
+
+
+
+ ProjectExplorer.Project.Target.0
+
+ Desktop
+ Desktop
+ Qt4ProjectManager.Target.DesktopTarget
+ 1
+ 0
+ 0
+
+ ProjectExplorer.ToolChain.Gcc:{b4c9d09d-a2cc-4a44-a379-778ac272b427}
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ false
+ true
+
+ false
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+ false
+
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+ true
+ clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Qt 4.8.4 in PATH (System) Release
+
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 0
+ /home/kraychik/Desktop/tools/DiagramRecognizer-build-desktop-Qt_4_8_4_in_PATH__System__Release
+ 2
+ false
+
+
+ ProjectExplorer.ToolChain.Gcc:{b4c9d09d-a2cc-4a44-a379-778ac272b427}
+
+
+ true
+ qmake
+
+ QtProjectManager.QMakeBuildStep
+ false
+ true
+
+ false
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+ false
+
+
+
+ 2
+ Build
+
+ ProjectExplorer.BuildSteps.Build
+
+
+
+ true
+ Make
+
+ Qt4ProjectManager.MakeStep
+ true
+ clean
+
+
+ 1
+ Clean
+
+ ProjectExplorer.BuildSteps.Clean
+
+ 2
+ false
+
+ Qt 4.8.4 in PATH (System) Debug
+
+ Qt4ProjectManager.Qt4BuildConfiguration
+ 2
+ /home/kraychik/Desktop/tools/DiagramRecognizer-build-desktop-Qt_4_8_4_in_PATH__System__Debug
+ 2
+ false
+
+ 2
+
+
+ 0
+ Deploy
+
+ ProjectExplorer.BuildSteps.Deploy
+
+ 1
+ No deployment
+
+ ProjectExplorer.DefaultDeployConfiguration
+
+ 1
+
+ true
+
+ false
+ false
+ false
+ false
+ true
+ 0.01
+ 10
+ true
+ 25
+
+ true
+ valgrind
+
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ 12
+ 13
+ 14
+
+ DiagramRecognizer
+
+ Qt4ProjectManager.Qt4RunConfiguration
+ 2
+
+ DiagramRecognizer.pro
+ false
+ false
+
+
+ 3768
+ true
+ false
+ true
+
+ 1
+
+
+
+ ProjectExplorer.Project.TargetCount
+ 1
+
+
+ ProjectExplorer.Project.Updater.EnvironmentId
+ {c6d051b5-09f3-4d37-9c54-be836a6eed6b}
+
+
+ ProjectExplorer.Project.Updater.FileVersion
+ 11
+
+
diff --git a/DiagramRecognizer/Makefile b/DiagramRecognizer/Makefile
new file mode 100644
index 0000000..d7ed67d
--- /dev/null
+++ b/DiagramRecognizer/Makefile
@@ -0,0 +1,446 @@
+#############################################################################
+# Makefile for building: DiagramRecognizer
+# Generated by qmake (2.01a) (Qt 4.8.4) on: ?? ??? 25 17:20:16 2013
+# Project: DiagramRecognizer.pro
+# Template: app
+# Command: /usr/bin/qmake-qt4 -spec /usr/lib/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile DiagramRecognizer.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH = -I/usr/lib/qt4/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I.
+LINK = g++
+LFLAGS =
+LIBS = $(SUBLIBS) -L/usr/lib -lQtGui -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/bin/qmake-qt4
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP =
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ bitmap.cpp \
+ output.cpp \
+ component.cpp \
+ diagramRecognizer.cpp \
+ formSegmentator.cpp \
+ simpleFormsInitializer.cpp \
+ recognizers/mixedGesturesManager.cpp \
+ recognizers/nearestPosGridGesturesManager.cpp \
+ recognizers/rectangleGesturesManager.cpp \
+ newfigure.cpp \
+ segmentator.cpp \
+ connectedComponent.cpp \
+ graph.cpp \
+ field.cpp \
+ eFigure.cpp \
+ eLink.cpp \
+ section.cpp \
+ figure.cpp \
+ link.cpp moc_output.cpp \
+ moc_diagramRecognizer.cpp
+OBJECTS = main.o \
+ bitmap.o \
+ output.o \
+ component.o \
+ diagramRecognizer.o \
+ formSegmentator.o \
+ simpleFormsInitializer.o \
+ mixedGesturesManager.o \
+ nearestPosGridGesturesManager.o \
+ rectangleGesturesManager.o \
+ newfigure.o \
+ segmentator.o \
+ connectedComponent.o \
+ graph.o \
+ field.o \
+ eFigure.o \
+ eLink.o \
+ section.o \
+ figure.o \
+ link.o \
+ moc_output.o \
+ moc_diagramRecognizer.o
+DIST = /usr/lib/qt4/mkspecs/common/unix.conf \
+ /usr/lib/qt4/mkspecs/common/linux.conf \
+ /usr/lib/qt4/mkspecs/common/gcc-base.conf \
+ /usr/lib/qt4/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/qt4/mkspecs/common/g++-base.conf \
+ /usr/lib/qt4/mkspecs/common/g++-unix.conf \
+ /usr/lib/qt4/mkspecs/qconfig.pri \
+ /usr/lib/qt4/mkspecs/features/qt_functions.prf \
+ /usr/lib/qt4/mkspecs/features/qt_config.prf \
+ /usr/lib/qt4/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/qt4/mkspecs/features/default_pre.prf \
+ /usr/lib/qt4/mkspecs/features/debug.prf \
+ /usr/lib/qt4/mkspecs/features/default_post.prf \
+ /usr/lib/qt4/mkspecs/features/declarative_debug.prf \
+ /usr/lib/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
+ /usr/lib/qt4/mkspecs/features/warn_on.prf \
+ /usr/lib/qt4/mkspecs/features/qt.prf \
+ /usr/lib/qt4/mkspecs/features/unix/thread.prf \
+ /usr/lib/qt4/mkspecs/features/moc.prf \
+ /usr/lib/qt4/mkspecs/features/resources.prf \
+ /usr/lib/qt4/mkspecs/features/uic.prf \
+ /usr/lib/qt4/mkspecs/features/yacc.prf \
+ /usr/lib/qt4/mkspecs/features/lex.prf \
+ /usr/lib/qt4/mkspecs/features/include_source_dir.prf \
+ DiagramRecognizer.pro
+QMAKE_TARGET = DiagramRecognizer
+DESTDIR =
+TARGET = DiagramRecognizer
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+ { test -n "$(DESTDIR)" && DESTDIR="$(DESTDIR)" || DESTDIR=.; } && test $$(gdb --version | sed -e 's,[^0-9]\+\([0-9]\)\.\([0-9]\).*,\1\2,;q') -gt 72 && gdb --nx --batch --quiet -ex 'set confirm off' -ex "save gdb-index $$DESTDIR" -ex quit '$(TARGET)' && test -f $(TARGET).gdb-index && objcopy --add-section '.gdb_index=$(TARGET).gdb-index' --set-section-flags '.gdb_index=readonly' '$(TARGET)' '$(TARGET)' && rm -f $(TARGET).gdb-index || true
+
+Makefile: DiagramRecognizer.pro /usr/lib/qt4/mkspecs/linux-g++/qmake.conf /usr/lib/qt4/mkspecs/common/unix.conf \
+ /usr/lib/qt4/mkspecs/common/linux.conf \
+ /usr/lib/qt4/mkspecs/common/gcc-base.conf \
+ /usr/lib/qt4/mkspecs/common/gcc-base-unix.conf \
+ /usr/lib/qt4/mkspecs/common/g++-base.conf \
+ /usr/lib/qt4/mkspecs/common/g++-unix.conf \
+ /usr/lib/qt4/mkspecs/qconfig.pri \
+ /usr/lib/qt4/mkspecs/features/qt_functions.prf \
+ /usr/lib/qt4/mkspecs/features/qt_config.prf \
+ /usr/lib/qt4/mkspecs/features/exclusive_builds.prf \
+ /usr/lib/qt4/mkspecs/features/default_pre.prf \
+ /usr/lib/qt4/mkspecs/features/debug.prf \
+ /usr/lib/qt4/mkspecs/features/default_post.prf \
+ /usr/lib/qt4/mkspecs/features/declarative_debug.prf \
+ /usr/lib/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
+ /usr/lib/qt4/mkspecs/features/warn_on.prf \
+ /usr/lib/qt4/mkspecs/features/qt.prf \
+ /usr/lib/qt4/mkspecs/features/unix/thread.prf \
+ /usr/lib/qt4/mkspecs/features/moc.prf \
+ /usr/lib/qt4/mkspecs/features/resources.prf \
+ /usr/lib/qt4/mkspecs/features/uic.prf \
+ /usr/lib/qt4/mkspecs/features/yacc.prf \
+ /usr/lib/qt4/mkspecs/features/lex.prf \
+ /usr/lib/qt4/mkspecs/features/include_source_dir.prf \
+ /usr/lib/libQtGui.prl \
+ /usr/lib/libQtCore.prl
+ $(QMAKE) -spec /usr/lib/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile DiagramRecognizer.pro
+/usr/lib/qt4/mkspecs/common/unix.conf:
+/usr/lib/qt4/mkspecs/common/linux.conf:
+/usr/lib/qt4/mkspecs/common/gcc-base.conf:
+/usr/lib/qt4/mkspecs/common/gcc-base-unix.conf:
+/usr/lib/qt4/mkspecs/common/g++-base.conf:
+/usr/lib/qt4/mkspecs/common/g++-unix.conf:
+/usr/lib/qt4/mkspecs/qconfig.pri:
+/usr/lib/qt4/mkspecs/features/qt_functions.prf:
+/usr/lib/qt4/mkspecs/features/qt_config.prf:
+/usr/lib/qt4/mkspecs/features/exclusive_builds.prf:
+/usr/lib/qt4/mkspecs/features/default_pre.prf:
+/usr/lib/qt4/mkspecs/features/debug.prf:
+/usr/lib/qt4/mkspecs/features/default_post.prf:
+/usr/lib/qt4/mkspecs/features/declarative_debug.prf:
+/usr/lib/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
+/usr/lib/qt4/mkspecs/features/warn_on.prf:
+/usr/lib/qt4/mkspecs/features/qt.prf:
+/usr/lib/qt4/mkspecs/features/unix/thread.prf:
+/usr/lib/qt4/mkspecs/features/moc.prf:
+/usr/lib/qt4/mkspecs/features/resources.prf:
+/usr/lib/qt4/mkspecs/features/uic.prf:
+/usr/lib/qt4/mkspecs/features/yacc.prf:
+/usr/lib/qt4/mkspecs/features/lex.prf:
+/usr/lib/qt4/mkspecs/features/include_source_dir.prf:
+/usr/lib/libQtGui.prl:
+/usr/lib/libQtCore.prl:
+qmake: FORCE
+ @$(QMAKE) -spec /usr/lib/qt4/mkspecs/linux-g++ CONFIG+=debug CONFIG+=declarative_debug -o Makefile DiagramRecognizer.pro
+
+dist:
+ @$(CHK_DIR_EXISTS) .tmp/DiagramRecognizer1.0.0 || $(MKDIR) .tmp/DiagramRecognizer1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/DiagramRecognizer1.0.0/ && $(COPY_FILE) --parents geometricForms.h bitmap.h abstractRecognizer.h recognizers/curveKeyBuilder.h output.h component.h diagramRecognizer.h formSegmentator.h simpleFormsInitializer.h recognizers/mixedGesturesManager.h recognizers/nearestPosGridGesturesManager.h recognizers/rectangleGesturesManager.h segmentator.h connectedComponent.h graph.h field.h eLink.h eFigure.h section.h figure.h link.h .tmp/DiagramRecognizer1.0.0/ && $(COPY_FILE) --parents main.cpp bitmap.cpp output.cpp component.cpp diagramRecognizer.cpp formSegmentator.cpp simpleFormsInitializer.cpp recognizers/mixedGesturesManager.cpp recognizers/nearestPosGridGesturesManager.cpp recognizers/rectangleGesturesManager.cpp newfigure.cpp segmentator.cpp connectedComponent.cpp graph.cpp field.cpp eFigure.cpp eLink.cpp section.cpp figure.cpp link.cpp .tmp/DiagramRecognizer1.0.0/ && (cd `dirname .tmp/DiagramRecognizer1.0.0` && $(TAR) DiagramRecognizer1.0.0.tar DiagramRecognizer1.0.0 && $(COMPRESS) DiagramRecognizer1.0.0.tar) && $(MOVE) `dirname .tmp/DiagramRecognizer1.0.0`/DiagramRecognizer1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/DiagramRecognizer1.0.0
+
+
+clean:compiler_clean
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+check: first
+
+mocclean: compiler_moc_header_clean compiler_moc_source_clean
+
+mocables: compiler_moc_header_make_all compiler_moc_source_make_all
+
+compiler_moc_header_make_all: moc_output.cpp moc_diagramRecognizer.cpp
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_output.cpp moc_diagramRecognizer.cpp
+moc_output.cpp: component.h \
+ geometricForms.h \
+ bitmap.h \
+ formSegmentator.h \
+ output.h
+ /usr/lib/qt4/bin/moc $(DEFINES) $(INCPATH) output.h -o moc_output.cpp
+
+moc_diagramRecognizer.cpp: bitmap.h \
+ geometricForms.h \
+ component.h \
+ formSegmentator.h \
+ abstractRecognizer.h \
+ paintManager.h \
+ field.h \
+ link.h \
+ eLink.h \
+ eFigure.h \
+ section.h \
+ figure.h \
+ diagramRecognizer.h
+ /usr/lib/qt4/bin/moc $(DEFINES) $(INCPATH) diagramRecognizer.h -o moc_diagramRecognizer.cpp
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+main.o: main.cpp diagramRecognizer.h \
+ bitmap.h \
+ geometricForms.h \
+ component.h \
+ formSegmentator.h \
+ abstractRecognizer.h \
+ paintManager.h \
+ field.h \
+ link.h \
+ eLink.h \
+ eFigure.h \
+ section.h \
+ figure.h \
+ graph.h \
+ eItems.h \
+ connectedComponent.h \
+ segmentator.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+bitmap.o: bitmap.cpp bitmap.h \
+ geometricForms.h \
+ component.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o bitmap.o bitmap.cpp
+
+output.o: output.cpp output.h \
+ component.h \
+ geometricForms.h \
+ bitmap.h \
+ formSegmentator.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o output.o output.cpp
+
+component.o: component.cpp component.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o component.o component.cpp
+
+diagramRecognizer.o: diagramRecognizer.cpp diagramRecognizer.h \
+ bitmap.h \
+ geometricForms.h \
+ component.h \
+ formSegmentator.h \
+ abstractRecognizer.h \
+ paintManager.h \
+ field.h \
+ link.h \
+ eLink.h \
+ eFigure.h \
+ section.h \
+ figure.h \
+ simpleFormsInitializer.h \
+ recognizers/mixedGesturesManager.h \
+ output.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o diagramRecognizer.o diagramRecognizer.cpp
+
+formSegmentator.o: formSegmentator.cpp formSegmentator.h \
+ bitmap.h \
+ geometricForms.h \
+ component.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o formSegmentator.o formSegmentator.cpp
+
+simpleFormsInitializer.o: simpleFormsInitializer.cpp simpleFormsInitializer.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o simpleFormsInitializer.o simpleFormsInitializer.cpp
+
+mixedGesturesManager.o: recognizers/mixedGesturesManager.cpp recognizers/mixedGesturesManager.h \
+ abstractRecognizer.h \
+ geometricForms.h \
+ paintManager.h \
+ recognizers/rectangleGesturesManager.h \
+ recognizers/nearestPosGridGesturesManager.h \
+ recognizers/curveKeyBuilder.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mixedGesturesManager.o recognizers/mixedGesturesManager.cpp
+
+nearestPosGridGesturesManager.o: recognizers/nearestPosGridGesturesManager.cpp recognizers/nearestPosGridGesturesManager.h \
+ abstractRecognizer.h \
+ geometricForms.h \
+ paintManager.h \
+ recognizers/curveKeyBuilder.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o nearestPosGridGesturesManager.o recognizers/nearestPosGridGesturesManager.cpp
+
+rectangleGesturesManager.o: recognizers/rectangleGesturesManager.cpp recognizers/rectangleGesturesManager.h \
+ abstractRecognizer.h \
+ geometricForms.h \
+ paintManager.h \
+ recognizers/curveKeyBuilder.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o rectangleGesturesManager.o recognizers/rectangleGesturesManager.cpp
+
+newfigure.o: newfigure.cpp component.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o newfigure.o newfigure.cpp
+
+segmentator.o: segmentator.cpp segmentator.h \
+ figure.h \
+ eFigure.h \
+ section.h \
+ component.h \
+ geometricForms.h \
+ eLink.h \
+ link.h \
+ graph.h \
+ eItems.h \
+ connectedComponent.h \
+ field.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o segmentator.o segmentator.cpp
+
+connectedComponent.o: connectedComponent.cpp connectedComponent.h \
+ component.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o connectedComponent.o connectedComponent.cpp
+
+graph.o: graph.cpp graph.h \
+ eItems.h \
+ component.h \
+ geometricForms.h \
+ connectedComponent.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o graph.o graph.cpp
+
+field.o: field.cpp link.h \
+ eLink.h \
+ component.h \
+ geometricForms.h \
+ eFigure.h \
+ section.h \
+ figure.h \
+ field.h \
+ segmentator.h \
+ graph.h \
+ eItems.h \
+ connectedComponent.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o field.o field.cpp
+
+eFigure.o: eFigure.cpp eFigure.h \
+ section.h \
+ component.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o eFigure.o eFigure.cpp
+
+eLink.o: eLink.cpp eLink.h \
+ component.h \
+ geometricForms.h \
+ eFigure.h \
+ section.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o eLink.o eLink.cpp
+
+section.o: section.cpp section.h \
+ component.h \
+ geometricForms.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o section.o section.cpp
+
+figure.o: figure.cpp figure.h \
+ eFigure.h \
+ section.h \
+ component.h \
+ geometricForms.h \
+ eLink.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o figure.o figure.cpp
+
+link.o: link.cpp link.h \
+ eLink.h \
+ component.h \
+ geometricForms.h \
+ eFigure.h \
+ section.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o link.o link.cpp
+
+moc_output.o: moc_output.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_output.o moc_output.cpp
+
+moc_diagramRecognizer.o: moc_diagramRecognizer.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_diagramRecognizer.o moc_diagramRecognizer.cpp
+
+####### Install
+
+install: FORCE
+
+uninstall: FORCE
+
+FORCE:
+
diff --git a/DiagramRecognizer/abstractRecognizer.h b/DiagramRecognizer/abstractRecognizer.h
index 2e0cb3a..22d1fb6 100644
--- a/DiagramRecognizer/abstractRecognizer.h
+++ b/DiagramRecognizer/abstractRecognizer.h
@@ -4,7 +4,7 @@
#include
#include
#include "geometricForms.h"
-#include "paintmanager.h"
+#include "paintManager.h"
class GesturesManager
{
diff --git a/DiagramRecognizer/component.cpp b/DiagramRecognizer/component.cpp
index 466543f..7a004ec 100644
--- a/DiagramRecognizer/component.cpp
+++ b/DiagramRecognizer/component.cpp
@@ -155,3 +155,121 @@ bool Component::isNegligible() const
}
return true;
}
+
+bool Component::intersects(Component *comp1, Component *comp2)
+{
+ Component::Iterator itr1, itr2;
+ for (itr1 = comp1->begin(); itr1 != comp1->end(); itr1++)
+ {
+ for (itr2 = comp2->begin(); itr2 != comp2->end(); itr2++)
+ {
+ if (*itr1 == *itr2)
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+SquarePos Component::intersectsAt(Component *comp1, Component *comp2)
+{
+ SquarePos beg1 = comp1->first();
+ SquarePos beg2 = comp2->first();
+ SquarePos end1 = comp1->last();
+ SquarePos end2 = comp2->last();
+ if (beg1 == beg2) { return beg1; }
+ if (beg1 == end2) { return beg1; }
+ if (end1 == beg2) { return end1; }
+ if (end1 == end2) { return end1; }
+ return SquarePos(-1, -1); //such point does't exist; no intersection
+}
+bool Component::getIsFixed() const { return isFixed; }
+bool Component::setIsFixed(bool value) { isFixed = value; }
+SquarePos Component::center() const
+{
+ SquarePos res(0, 0);
+ int x = 0;
+ int y = 0;
+ int len = 0;
+ for (Component::const_iterator i = this->begin(); i != this->end(); i++)
+ {
+ x += (*i).first;
+ y += (*i).second;
+ len++;
+ }
+ res.first= x / len;
+ res.second = y / len;
+ return res;
+}
+SquarePos Component::getAnotherSide(SquarePos const & point) const
+{
+ SquarePos begin = this->first();
+ SquarePos end = this->last();
+ if (begin == point) { return end; }
+ else if (end == point) { return begin; }
+ else { return SquarePos(-1, -1); }
+}
+bool Component::isClosed() const
+{
+ return first() == last();
+}
+SquarePos Component::center(QList < Component *> *comps)
+{
+ SquarePos res(0, 0);
+ int x = 0;
+ int y = 0;
+ int len = 0;
+ for (QList < Component *>::const_iterator itr = comps->begin(); itr != comps->end(); itr++)
+ {
+ for (Component::const_iterator i = (*itr)->begin(); i != (*itr)->end(); i++)
+ {
+ x += (*i).first;
+ y += (*i).second;
+ len++;
+ }
+ }
+ res.first= x / len;
+ res.second = y / len;
+ return res;
+}
+
+QList < Component *>::iterator Component::getOuterComponent(QList < Component *> *comps)
+{
+ Component *cur;
+ int minX, minY;
+ int globMinX, globMinY;
+ QList < Component *>::iterator res;
+ globMinX = (*((*(comps->begin()))->begin())).first;
+ globMinY = (*((*(comps->begin()))->begin())).second;
+ for (QList < Component *>::iterator i = comps->begin(); i != comps->end(); i++)
+ {
+ cur = *i;
+ minX = (*(cur->begin())).first;
+ minY = (*(cur->begin())).second;
+ for (Component::const_iterator itr = cur->begin(); itr != cur->end(); itr++)
+ {
+ minX = (minX < (*itr).first) ? minX : (*itr).first;
+ minY = (minY < (*itr).second) ? minY : (*itr).second;
+ }
+ if (minX < globMinX)
+ {
+ globMinX = minX;
+ globMinY = minY;
+ res = i;
+ }
+ else
+ {
+ if (minY < globMinY)
+ {
+ globMinX = minX;
+ globMinY = minY;
+ res = i;
+ }
+ }
+ }
+ return res;
+}
+QList < Component *> *Component::prioritetSort(QList < Component *> *comps)
+{
+ return new QList < Component *>();
+}
diff --git a/DiagramRecognizer/component.h b/DiagramRecognizer/component.h
index 73e8e63..5d4a45f 100644
--- a/DiagramRecognizer/component.h
+++ b/DiagramRecognizer/component.h
@@ -7,6 +7,7 @@
class Component : public QList
{
public:
+ int num;
Component();
void insertPos(SquarePos const & pos);
void analyze();
@@ -17,8 +18,21 @@ class Component : public QList
bool hasSelfIntersection() const;
PathVector figure(int xMin, int yMin) const;
bool isNegligible() const;
+ bool getIsFixed() const;
+ bool setIsFixed(bool value);
+ SquarePos center() const; //finds center of the component
+ SquarePos getAnotherSide(const SquarePos & point) const; //returns another side of the component
+ bool isClosed() const;
+ //finds any outer component (for example, left-upper one)
+ static QList < Component *>::iterator getOuterComponent(QList < Component *> *comps);
+ //finds the center of the list of components
+ static SquarePos center(QList < Component *> *comps);
+ static QList < Component *> *prioritetSort(QList < Component *> *comps);
+ static bool intersects(Component *comp1, Component *comp2);
+ static SquarePos intersectsAt(Component *comp1, Component *comp2);
private:
+ bool isFixed;
bool isNeighbours(SquarePos const & pos1, SquarePos const & pos2) const;
static int mNextID;
bool mHasSelfIntersection;
diff --git a/DiagramRecognizer/connectedComponent.cpp b/DiagramRecognizer/connectedComponent.cpp
new file mode 100644
index 0000000..a97aaff
--- /dev/null
+++ b/DiagramRecognizer/connectedComponent.cpp
@@ -0,0 +1,49 @@
+#pragma once;
+#include
+
+CComponent::CComponent()
+{
+ mComps = new QList < Component *> ();
+}
+CComponent::CComponent(QList < Component *> *components) : mComps(components) { }
+CComponent::~CComponent()
+{
+ delete mComps;
+}
+int CComponent::size() const { return mComps->size(); }
+void CComponent::removeAll(Component *component)
+{
+ mComps->removeAll(component);
+}
+QList < Component *> *CComponent::getIntersectionList(Component *curComponent) //old version; better to delete
+{
+ QList < Component *> *result = new QList < Component *>();
+ for (QList < Component *>::iterator itr = mComps->begin(); itr != mComps->end(); itr++)
+ {
+ if (Component::intersects(*itr, curComponent))
+ {
+ result->push_front(*itr);
+ }
+ }
+ return result;
+}
+QList < Component *> *CComponent::getIntersectionList(QList < Component *> *comps)
+{
+}
+/*QList < Component *> *getIntersectionList(Component *curComponent, Segmentator *segmentator) //new version
+{
+QList < Component *> *result = new QList < Component *>(segmentator->mInterList[curComponent]);
+ for (QList < Component *>::iteartor itr = result->begin(); itr != result->end(); itr++)
+ {
+ if (!comps->contains(*itr))
+ {
+ result->erase(itr);
+ }
+ }
+ return res;
+}*/
+void CComponent::addComponent(Component *newComponent)
+{
+ mComps->push_front(newComponent);
+}
+QList < Component *> *CComponent::getComponents() const { return mComps; }
diff --git a/DiagramRecognizer/connectedComponent.h b/DiagramRecognizer/connectedComponent.h
new file mode 100644
index 0000000..ea179e3
--- /dev/null
+++ b/DiagramRecognizer/connectedComponent.h
@@ -0,0 +1,19 @@
+#pragma once;
+#include
+#include
+
+class CComponent //connected component
+{
+public:
+ CComponent();
+ CComponent(QList < Component *> *components);
+ ~CComponent();
+ int size() const;
+ void removeAll(Component *component);
+ QList < Component *> *getIntersectionList(Component *curComponent);
+ QList < Component *> *getIntersectionList(QList < Component *> *comps);
+ void addComponent(Component *newComponent);
+ QList < Component *> *getComponents() const;
+private:
+ QList < Component *> *mComps;
+};
diff --git a/DiagramRecognizer/diagramrecognizer.cpp b/DiagramRecognizer/diagramRecognizer.cpp
similarity index 83%
rename from DiagramRecognizer/diagramrecognizer.cpp
rename to DiagramRecognizer/diagramRecognizer.cpp
index 5d625c8..ede6e8c 100644
--- a/DiagramRecognizer/diagramrecognizer.cpp
+++ b/DiagramRecognizer/diagramRecognizer.cpp
@@ -4,6 +4,7 @@
#include "simpleFormsInitializer.h"
#include "recognizers/mixedGesturesManager.h"
#include "output.h"
+#include "field.h"
#include
#include
@@ -77,16 +78,30 @@ void DiagramRecognizer::recognizeDiagram()
//mRecognized = true;
mFormSegmentator = new FormSegmentator(mBitmap);
mFormSegmentator->uniteComponents();
+
QList objects = mFormSegmentator->getObjects();
+ QList < Component *> *objs = new QList < Component *>();
+ foreach (Component obj, objects)
+ {
+ Component *newComp = new Component(obj);
+ objs->push_back(newComp);
+ }
+ Field f(objs);
mDiagram.clear();
- foreach (Component const &object, objects) {
+ foreach (Component *object, *objs) {
PathVector recognizedObject = mAbstractRecognizer->recognizeObject(
- object.figure(mBitmap->xLeft(), mBitmap->yUpper()));
+ (*object).figure(mBitmap->xLeft(), mBitmap->yUpper()));
mDiagram.append(recognizedObject);
}
- foreach (Component const &edge, mFormSegmentator->getEdges()) {
+ /*foreach (Component const &edge, mFormSegmentator->getEdges()) {
mDiagram.append(edge.figure(mBitmap->xLeft(), mBitmap->yUpper()));
+ }*/
+ foreach (ELink *edge, *(f.getLinks()))
+ {
+ Component *comp = edge->getComponent();
+ mDiagram.append((*comp).figure(mBitmap->xLeft(), mBitmap->yUpper()));
}
+ delete objs;
emit print(mDiagram, mBitmap, mFormSegmentator);
}
diff --git a/DiagramRecognizer/diagramrecognizer.h b/DiagramRecognizer/diagramRecognizer.h
similarity index 86%
rename from DiagramRecognizer/diagramrecognizer.h
rename to DiagramRecognizer/diagramRecognizer.h
index 4940a1e..3270d94 100644
--- a/DiagramRecognizer/diagramrecognizer.h
+++ b/DiagramRecognizer/diagramRecognizer.h
@@ -1,9 +1,9 @@
#pragma once
#include "bitmap.h"
-#include "formsegmentator.h"
+#include "formSegmentator.h"
#include "abstractRecognizer.h"
#include
-
+#include
class DiagramRecognizer : public QWidget
{
@@ -27,5 +27,5 @@ public slots:
bool mRecognized;
QPoint mComponentPoint;
GesturesManager *mGesturesManager;
- AbstractRecognizer *mAbstractRecognizer;
+ AbstractRecognizer *mAbstractRecognizer;
};
diff --git a/DiagramRecognizer/diagramRecognizer.ui b/DiagramRecognizer/diagramRecognizer.ui
new file mode 100644
index 0000000..9bf5967
--- /dev/null
+++ b/DiagramRecognizer/diagramRecognizer.ui
@@ -0,0 +1,89 @@
+
+
+ DiagramRecognizer
+
+
+
+ 0
+ 0
+ 550
+ 538
+
+
+
+ DiagramRecognizer
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 415
+
+
+
+
+ -
+
+
+ QFrame::StyledPanel
+
+
+ QFrame::Raised
+
+
+
-
+
+
+ clear
+
+
+
+ -
+
+
+ recognize
+
+
+
+ -
+
+
+ recognize image
+
+
+
+
+
+
+
+
+
+
+
+ TopToolBarArea
+
+
+ false
+
+
+
+
+
+
+
+
diff --git a/DiagramRecognizer/eFigure.cpp b/DiagramRecognizer/eFigure.cpp
new file mode 100644
index 0000000..1b1fbe5
--- /dev/null
+++ b/DiagramRecognizer/eFigure.cpp
@@ -0,0 +1,61 @@
+#pragma once;
+#include
+
+EFigure::EFigure()
+{
+ mShell = new QList < Component *>();
+ mSections = new QList < Section *>();
+ mId = 0;
+}
+EFigure::EFigure(QList < Component *> *shell)
+{
+ mShell = new QList < Component *>(*shell);
+ mSections = new QList < Section *>();
+ mId = 0;
+}
+EFigure::EFigure(QList < Component *> *shell, QList < Section *> *sections)
+{
+ mShell = new QList < Component *>(*shell);
+ mSections = new QList < Section *>(*sections);
+ mId= 0;
+}
+EFigure::EFigure(QList < Component *> *shell, QList < Section *> *sections, int id)
+{
+ mShell = new QList < Component *>(*shell);
+ mSections = new QList < Section *>(*sections);
+ mId = id;
+}
+EFigure::EFigure(QList < Component *> *shell, int id)
+{
+ mShell = new QList < Component *>(*shell);
+ mSections = new QList < Section *>();
+ mId = id;
+}
+EFigure::EFigure(EFigure *figure)
+{
+ mShell = new QList < Component *>(*(figure->getShell()));
+ mSections = new QList < Section *>();
+ for (QList < Section *>::const_iterator i = figure->getSections()->begin(); i != figure->getSections()->end(); i++)
+ {
+ mSections->push_back(new Section(*i));
+ }
+ mId = figure->getId();
+}
+
+EFigure::~EFigure()
+{
+ delete mShell;
+ delete mSections;
+}
+
+void EFigure::addSection(QList < Component *> *comps)
+{
+ mSections->push_back(new Section(comps));
+}
+void EFigure::addSection(Section *section)
+{
+ mSections->push_back(section);
+}
+QList < Component *> *EFigure::getShell() const { return mShell; }
+QList < Section *> *EFigure::getSections() const { return mSections; }
+int EFigure::getId() const { return mId; }
diff --git a/DiagramRecognizer/eFigure.h b/DiagramRecognizer/eFigure.h
new file mode 100644
index 0000000..b02bd97
--- /dev/null
+++ b/DiagramRecognizer/eFigure.h
@@ -0,0 +1,25 @@
+#pragma once;
+#include
+#include
+
+class EFigure
+{
+public:
+ EFigure();
+ EFigure(QList < Component *> *shell);
+ EFigure(QList < Component *> *shell, QList < Section *> *sections);
+ EFigure(QList < Component *> *shell, QList < Section *> *sections, int id);
+ EFigure(QList < Component *> *shell, int id);
+ EFigure(EFigure *figure);
+ ~EFigure();
+ void addSection(QList < Component *> *comps);
+ void addSection(Section *section);
+ QList < Component *> *getShell() const;
+ QList < Section *> *getSections() const;
+ int getId() const;
+
+private:
+ QList < Component *> *mShell;
+ QList < Section *> *mSections;
+ int mId; //id in database
+};
diff --git a/DiagramRecognizer/eItems.cpp b/DiagramRecognizer/eItems.cpp
new file mode 100644
index 0000000..6a5e9ed
--- /dev/null
+++ b/DiagramRecognizer/eItems.cpp
@@ -0,0 +1,80 @@
+#pragma once;
+#include
+
+Recognizer::Recognizer() { }
+int Recognizer::getType(QList < Component *> *shell) { return 0; }
+
+Section::Section()
+{
+ mComps = new QList < Component *>();
+}
+Section::Section(QList < Component *> *components)
+{
+ mComps = new QList < Component *>(*components);
+}
+QList < Component *> * Section::getComps() const
+{
+ return mComps;
+}
+
+EFigure::EFigure()
+{
+ mShell = new QList < Component *>();
+ mSections = new QList < Section *>();
+ mId = 0;
+}
+EFigure::EFigure(QList < Component *> *shell)
+{
+ mShell = shell;
+ mSections = new QList < Section *>();
+ mId = 0;
+}
+EFigure::EFigure(QList < Component *> *shell, QList < Section *> *sections)
+{
+ mShell = shell;
+ mSections = sections;
+ mId= 0;
+}
+EFigure::EFigure(QList < Component *> *shell, QList < Section *> *sections, int id)
+{
+ mShell = shell;
+ mSections = sections;
+ mId = id;
+}
+EFigure::EFigure(QList < Component *> *shell, int id)
+{
+ mShell = shell;
+ mSections = new QList < Section *>();
+ mId = id;
+}
+void EFigure::addSection(QList < Component *> *comps)
+{
+ mSections->push_front(new Section(comps));
+}
+void EFigure::addSection(Section *section)
+{
+ mSections->push_front(section);
+}
+QList < Component *> *EFigure::getShell() const { return mShell; }
+QList < Section *> *EFigure::getSections() const { return mSections; }
+
+ELink::ELink()
+{
+ mComponent = new Component();
+ mFigure1 = mFigure2 = 0; //null
+}
+ELink::ELink(Component *component)
+{
+ mComponent = component;
+ mFigure1 = mFigure2 = 0; //null
+}
+ELink::ELink(Component *component, EFigure *figure1, EFigure *figure2)
+{
+ mComponent = component;
+ mFigure1 = figure1;
+ mFigure2 = figure2;
+}
+Component *ELink::getComponent() const { return mComponent; }
+EFigure *ELink::getFigure1() const { return mFigure1; }
+EFigure *ELink::getFigure2() const { return mFigure2; }
+
diff --git a/DiagramRecognizer/eItems.h b/DiagramRecognizer/eItems.h
new file mode 100644
index 0000000..8f9d7c2
--- /dev/null
+++ b/DiagramRecognizer/eItems.h
@@ -0,0 +1,5 @@
+#pragma once;
+#include