-
Notifications
You must be signed in to change notification settings - Fork 0
3.1. Transfer Functions
The following functions were developed as part of a master's thesis and have been revised in new versions of the software.
To run the scenario, the two programmes Microsoft Excel and Plant@Hand3D are required. In addition, a .csv file is needed that contains the activity data of the visualisation from Plant@Hand. This file can be found in the project under the name "activityDataCSVRGB.csv ".
Unfortunately, reading out the parameters of the interaction carried out within PlantAtHand only works through a file called "parameters.json", which is generated/overwritten each time a selection is made within PlantAtHand. In order for this file to be generated at all, the PlantAtHand code must be extended - more precisely, the lower two methods of the class ToolModule.cs must look like this:
If PlantAtHand cannot be adapted in this way, a "parameters.json file can be found in the resources/files folder of this project. This data must be in the same folder as the .exe of the PlantAtHand programme.
The scenario is to be executed as follows:
- the .exe files "EXCEL " and "Plant@Hand3D " have to be dragged into the toolpool.
- the .csv file "activityDataCSVRGB.csv " must be dragged into the datapool.
- "EXCEL " is first dragged into the graphpool, to the right of it "Plant@Hand3D " must be dragged.
- "activityDataCSVRGB.csv " must be linked to "EXCEL, i.e. dragged into the same Timeslot. The "[] Draw Edges " checkbox must be selected, as ConnectionNodes can only be created in this mode. 6.
- an edge must be drawn between "EXCEL " and "Plant@Hand3D " by dragging an edge from "EXCEL " to "Plant@Hand3D ". 7. a ConnectionNode opens. Now a ConnectionSettings opens and the "[] Draw Edges " checkbox can be deactivated again. 8. Within the ConnectionSettings both Add connection buttons must be selected. 9. In the two halves of the ConnectionSettings, the configuration menus of the ExchangeProcesses now open, which must be configured as follows:
- Now the upper left Add transform button must be selected so that a transformation is carried out when exchanging data from "EXCEL " to "Plant@Hand3D ". 11. A menu opens in which the Tabular Data button must be selected. 12.
- now the transformation window has been opened, in which the individual columns of the data set linked to the tool can be edited. Since all columns are to be edited in the scenario, the upper right Add rule button must be selected 7 times. 13.
- from left to right, the dropdowns should be selected so that each table column is selected once. The German translations of the table columns are then written into the text fields below the dropdowns. 15. In the two columns of the variables Time and color, the Add rule buttons below them must be selected once each. The resulting dropdown pairs are configured as follows:
The transformation window can now be closed by selecting the Apply button. 17. By selecting the Edit-->Execute Toolchain menu, the scenario can now be started. 18. 18. in the Executor window, the first step is to be started by interacting with the Next Step button. 19. Microsoft Excel opens and displays the file "activityDataCSVRGB.csv ". The file should not be interacted with in this step. For a correct transformation Excel must now be closed again! 20. After Excel has been closed, the second step should be started. 21. 21) Plant@Hand3D opens and, depending on the configuration, either the Hospital scene is started directly or it must be selected in the StartMenu under "scenes/hospital.pah. 22. at the bottom of the application the manager examination should be selected. The billboard of any patient should now be selected. 24. 24. in the newly opened lower right window, the Start button shall now be selected to open the visualisation tool. 25. by an interaction within the visualisation, any time interval can now be selected. As a result of a selection, a file called "parameters.json is created in the Plant@Hand3D directory, which is of no further interest to the user. 26. Plant@Hand3D can now be closed and the Executor can be used to return to the first step. 27. 27 Excel opens again, but this time a file called "activityDataCSVRGB_modified has been opened, which consists of the selected sub-area. To sort the data, the Data-->Sort menu of Excel must be opened. 29. 29. in this menu, the Add-Level button is selected 5 times, after which the variables from sleeping to jogging are selected in the left dropdowns. The sorting is then carried out by selecting the OK button. 30. 30 The file must now be saved, after which Excel must be closed again! The second step can now be carried out again using the Executor, whereupon the visualisation can be opened again as in steps 21-24. The visualisation now shows the sorted sub-range of the total data set and the scenario is completed at this point.
Since some files are overwritten by the scenario, they must be reset for a renewed execution of the scenario:
- On the one hand, the "activityDataCSVRGB file.
- On the other hand the visualisation file in Health@Hand, which is located in the path "DIRECTORY_OF_P@H_EXE\Plant@Hand3D_Data\StreamingAssets\hospital\anomaliedata\IGD_DEMO_WEB\activity.html".
These two original files are stored in the resources/files folder of this project.
The important classes for enabling the configuration of exchange processes are the following:
- ConnectionSlot --> Basically the equivalent of Timeslot. After a timeslot has been created by dragging and dropping, an invisible invisible ConnectionSlot behind is automatically instantiated. A ConnectionSlot holds 0-n ConnectionNodes.
- ConnectionSettings --> Is the window that is created after dragging an edge between two SourceInSlotViews. After creation, it is placed in the associated ConnectionSlot. A ConnectionSettings holds a reference to its source and target tool. The buttons can be used to create ExchangeProcessViews.
- ExchangeProcessView --> Is the row consisting of the 4 dropdowns that let you define the parameters for Action, Scope, Segmentation and Reuse. An ExchangeProcess object is not instantiated until a step change is made.
-
ExchangeProcess --> Based on the ExchangeProcessViews, ExchangeProcess objects are created by the ExchangeProcessCreator.
An ExchangeProcess is structured as follows:
- 2x SourceInSlot --> Holds a reference to the source and target tool, needed to find the linked records.
- Action --> Abstract class from which PlantAtHandSelection and ExcelSorting inherit. Action is primarily there to return the parameters of a performed interaction.
- Scope --> Enum which can take the values Parameter, Dataset or Combination. The TransportData is then generated according to the selection.
- Quantity --> Interface which is implemented by PlantAtHandDeltaQuantity, FullQuantity, EmptyQuantity and ExcelFullQuantity. Depending on the selection, the data set of the source tool is returned, or (in the case of PlantAtHandDeltaQuantity) a subset is extracted (based on the parameters read by the action).
- Reuse --> Interface implemented by PlantAtHandDeltaModifier and DefaultReuse. Of interest here is the PlantAtHand class, which writes the result of the extraction of delta data into the .html file. into the .html file that represents the visualisation.
- TransportData --> class which only holds references to the transferred data set and/or the parameter file
- Transformation --> Is created after Apply has been pressed in the transformation menu. A transformation is an abstract class that holds a reference to the name of the table column to be processed. Depending on the type of transformation selected (Rename = ColumnNameConverter, TimeConversion = TimeConverter, ColourConversion = ColorConverter), the values of the assigned column will be are processed differently in each case
After the transformations and the ExchangeProcesses have been defined in the respective windows, the toolchain can be started. Based on the ExchangeProcessViews within the ConnectionSettingsView, the ExchangeProcesses are instantiated. The generateTransportData() method is then called, which generates the transport data to be transferred based on the variables of the types Action, Scope and Quantity. transport data to be transmitted based on the variables of the types Action, Scope and Quantity. All previously defined transformations are then applied to this transport data. If the TransportData object of an ExchangeProcess was successfully transformed, the defined Reuse is then applied.