====== ID Module Synthetic Data Generator ====== ===== Linux Development Environment ===== ==== Set Up ==== - Cloned fork; - Installed Qt5.4.0 from download.qt.io. - Ran ''qtchooser -install qt5.4.0 /opt/Qt5.4.0/5.4/gcc_64/bin/qmake'' to make installed Qt version available. - Added line ''export QT_SELECT="qt5.4.0"'' to ''~/.bashrc'' to pick correct Qt version at launch. - Installed ''qtbase5-dev'' to fix "Missing Qt5Core"-error during compilation. - Installed ''qtdeclarative5-dev'' to fix "Missing QtQuick"-error during compilation. - Installed ''qml-module-qtquick-layouts qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qt-labs-settings qml-module-qtmultimedia'' to fix "missing qml module"-errors during execution. - Installed ''libgl1-mesa-swx11'' to fix "LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb"-error during execution. ==== Usage ==== - Connect using ''ssh -X @'' - Switch to directory with scripts ''cd ~/Dekstop/mpvsynthdatafork/MultivariateProjectionViewer/tools'' - Run ''./xShell_Build.sh'' to compile the project. - Run ''./xShell_Start.sh'' to run the executable. - Run ''exit'' to close connection. ==== Issues ==== When starting the project, it takes a while for window to show up, interaction with menu, buttons etc is very slow. Furthermore, the color scheme looks suspicious: {{ ::screenshot_from_2018-11-30_13-39-34.png?400 |}} {{ :screenshot_from_2018-11-30_13-39-27.png?400 |}} Color issue can be related to color depth property. This can be adjusted in ''/etc/ssh/sshd_config'' by changing ''DefaultDepth'' property. However, other application seem not to be influenced by this: {{ ::screenshot_from_2018-11-30_13-55-11.png?400 |}} ===== User Tutorial ===== {{ :tutorial.odt |}} {{ :tutorial_images.tar.gz |}} ===== Code Structure ===== ==== Overview ==== {{ :synthdatagenerator.png?400 |}} ==== Details ==== //QML_For_Module_SyntheticMultidimensionalDataGenerator.qml// Layout (''itemforModuleSyntheticMultidimensionalDataGeneratorID'') consists of 2 main parts: menu that provides overview of available tools and visualization area where a scatter plot of the dataset is displayed. - Menu (''recMenu''): this part of the layout consists of another 3 sub-areas: (''recDimensionalitySwitch'') that contains an element that allows to switch between plot dimensionalities (2d/3d); (''recMenuTools'') that contains a number of icons that call certain functions or set the interaction mode and determine how a mouse will work; (''recMenuToolsOptions'') if a certain tool requires some additional parameters to be specified, they will appear in this area (e.g. magnet's power, stroke's size etc) - Visualization area (''recVisualizationArea''): large area in the right and middle part of the screen is used to display a scatter plot of selected dimensions of the generated dataset. //IUI/syntheticMultidimensionalDataGenerator.h(.cpp)// Module to synthetic data generation that supports (1) generation/import, (2) visualization, (3) modification, and (4) export of dataset. - Generation/import: dataset is generated in ''generateDataset()'' that fills IMatrix object with uniform distributed random numbers. When ''updateModule()'' is called and an existing dataset was imported, ''importDataset()'' method is called, which converts OriginalDataset obtained from import to the internal representation of dataset, namely IMatrix object and converts IMetadata to a number of vectors which contain individual metadata attributes for all dimensions. - Visualization: dataset is visualized using QPainter functionality combined with QCustomPlot. In 2-dimensional plot, QCustomPlot is used to visualize and update x- and y-axis, scales and grid. The 2D-plot consists of 4 layers: Axis-Grid Layer, Dataset Layer, Selection Layer, and Interaction Layer. Each layer is represented by QPixmap and updated when mVisualizationMode is set to a respective value. Each layer is updated separately to reduce the total plotting and update time. Each layer is updated in ''update[Name]Layer()''-method. 3-dimensional plot is implemented using purely QPainter-functionality. All models (axis, cubes, planes, datapoints) are 3D-objects, which are then projected onto xy-plane and rendered according to the z-value. This plot consists of a single layer in order to easily determine the rendering order in one place. - Modification of the dataset: dataset modifications happen when mouse events are triggered: ''mousePressEvent'', ''mouseMoveEvent'', ''mouseReleaseEvent'', ''wheelEvent''. General idea: on ''mousePressEvent'', required interaction parameters are initialized (e.g. magnet's center, starting point of the translation etc). On ''mouseMoveEvent'', these parameters (e.g. magnet's center is moved, selection rectangle is being drawn) and dataset itself are updated (e.g. on drag'n'drop, all selected points are moved using translation vector). On ''mouseReleaseEvent'', parameters are set to default, and dataset is updated for the final time. Corresponding scatter plot is updated 50 times per second, following the strategy: on ''mousePressEvent'', a timer is started which is triggered 50 times a second. On timeout(), ''update()'' method of the module, inherited from QQuickPaintedItem is called. On ''mouseReleaseEvent'', timer is stopped and connection to update()-method is closed. - Export: in ''exportDataset()'' an empty IMetadata object is created and filled with relevant data for all dimensions. This object, as well as dataset in form of IMatrix is passed to ''IConverterSynth::convert()'' method which converts these two input parameters to the suitable dataset representation. //IFile/IConverterSynth.h(.cpp)// This class extends ''convert()'' method which now takes IMetadata and IMatrix object as input and saves these object in correct representation (dataset is stored as .data file, metadata is stored as .data.json). For more details, refer to in-code documentation. ===== Icon Credits ===== - change_class_*_icon: Icon made by Freepik from www.flaticon.com - choose_dimension_*_icon: Icon made by Smashicons from www.flaticon.com - dataset_details_*_icon: Icon made by Freepik from www.flaticon.com - drag_n_drop_*_icon: Icon made by Pixel perfect from www.flaticon.com - exploration_tool_*_icon: Icon made by Pixel Buddha from www.flaticon.com - export_dataset_*_icon: Icon made by Smashicons from www.flaticon.com - generate_dataset_icon:Icon made by Smashicons from www.flaticon.com - information_icon: Icon made by Smashicons from www.flaticon.com - magnet_*_icon: Icon made by Smashicons from www.flaticon.com - strokes_*_icon: Icon made by Smashicons from www.flaticon.com - switch_*: Icon made by Smashicons from www.flaticon.com - tool_options_*: Icon made by Gregor Cresnar from www.flaticon.com - tools_icon: Icon made by Smashicons from www.flaticon.com