This is an old revision of the document!
qtchooser -install qt5.4.0 /opt/Qt5.4.0/5.4/gcc_64/bin/qmake to make installed Qt version available.export QT_SELECT=“qt5.4.0” to ~/.bashrc to pick correct Qt version at launch.qtbase5-dev to fix “Missing Qt5Core”-error during compilation.qtdeclarative5-dev to fix “Missing QtQuick”-error during compilation.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.libgl1-mesa-swx11 to fix “LLVM ERROR: Cannot select: intrinsic %llvm.x86.sse41.pblendvb”-error during execution.ssh -X <username>@<hostname>
- 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.
==== Current Issues ====
Relevant threads for current errors:
* https://forum.qt.io/topic/81112/qt-won-t-start-via-remote-desktop/2
* https://forum.qt.io/topic/24315/qt-5-0-1-failed-to-initialize-xrandr
* https://github.com/spyder-ide/spyder/issues/3713
* https://github.com/YuvalNirkin/face_swap/issues/25
* https://serverfault.com/questions/788503/xrandr-error-when-accessing-debian-vm-over-vnc
* https://sourceforge.net/p/turbovnc/mailman/message/33087882/
* https://serverfault.com/questions/788503/xrandr-error-when-accessing-debian-vm-over-vnc
* https://bugreports.qt.io/browse/QTBUG-33319
* https://support.rstudio.com/hc/en-us/community/posts/207987538-RStudio-simply-will-not-work-through-a-remote-connection
===== User Tutorial =====
tutorial.odt
tutorial_images.tar.gz
===== Code Structure =====
==== Overview ====
==== 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.