other:dsx:software_development_kit
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
other:dsx:software_development_kit [2024/07/17 15:21] – sgranger | other:dsx:software_development_kit [2025/01/17 18:43] (current) – Removed table formatting. wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Software Development Kit ====== | + | ===== Software Development Kit ===== |
- | \\ | + | To allow users of the [[Other: |
+ | Currently the SDK enables our DSX users to develop their own LCS algorithms that can be applied in [[Other: | ||
- | To enable users of the [[Other: | + | ==== DSX SDK Software |
- | Currently the SDK enables | + | In order for the generated dll files to work properly with the DSX applications they need to be compiled and build with the same compiler that is used for DSX Suite. |
+ | |||
+ | Debugging | ||
+ | |||
+ | Current **Qt** version: 5.13.1 | ||
+ | |||
+ | Current **VTK** version: 8.2 | ||
+ | |||
+ | ==== Downloading the DSX SDK ==== | ||
+ | |||
+ | HAS-Motion software is all downloaded over the Internet at [[https:// | ||
+ | |||
+ | After logging into your customer account, you will see a screen similar to this: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Click the **DOWNLOAD** Buttons to save the DSX SDK installation file to your computer. Most web browsers will offer you a choice of where to save the downloaded file; make sure you remember where you save the downloaded file. Run the installation executable file you downloaded. | ||
+ | |||
+ | We recommend saving at least one prior installation file of the DSX SDK that works for you, as older installation files may be removed from the HAS-Motion download page without notification. | ||
+ | |||
+ | ==== Installing the DSX SDK ==== | ||
+ | |||
+ | When you run the executable file that you downloaded you will be guided though the installation steps. Your computer may ask you to confirm that you trust the source of the program you are installing. | ||
+ | |||
+ | The installer will install | ||
+ | - a number of header files in the //include// folder | ||
+ | - one source file (CMGlobalTime.cpp) in the //src// folder | ||
+ | - 4 static library files in the //lib// folder | ||
+ | - a working example in the //Example// folder. | ||
+ | |||
+ | It will also add the **CM_DSXSDK_DIR** variable to the computer' | ||
+ | |||
+ | When the Completed dialog appears the DSX SDK has been successfully installed on your computer. | ||
+ | |||
+ | ==== Using the DSX SDK ==== | ||
+ | |||
+ | The easiest way to get started is to copy the contents of the //Example// folder in the SDK installation folder to a location where you have write permission. The names of the three *.vcxproj files can be changed in Windows Explorer (e.g. into MyDll.vcxproj, | ||
+ | |||
+ | The names of the header and source files can be changed in Visual Studio. New files (with new C++ classes) can be added as well. On exit Visual Studio will give the opportunity to save the *.sln (solution) file. This is not required, but is a means of keeping multiple VS projects (i.e., multiple dlls) together. | ||
+ | |||
+ | === Export directive === | ||
+ | |||
+ | The LCSExampleModule.h (or MyDllModule.h) file defines a macro that defines the export directive. When the name of the macro is changed, the LCSExampleTransform.h (or MyTransform.h) and LCSExampleFactory.cpp (or MyFactory.cpp) files need to be edited accordingly as well. Make sure the MYLCS_EXPORT**S** entry matches the preprocessor definition in the properties of the project for both Debug and Release mode. | ||
+ | |||
+ | === Algorithm class === | ||
+ | |||
+ | To implement a new LCS algorithm, one would create a C++ class like the LCSExampleTransform class; the new class would inherit from CMLCSTransformBase, | ||
+ | * The // | ||
+ | * The //m_Side// variable enables the implementation of both the proximal and distal LCS algorithms for a particular bone in one C++ class. | ||
+ | * The // | ||
+ | |||
+ | The implementation of the algorithm goes into the internalUpdate() function. The function will use the object' | ||
+ | |||
+ | === Factory === | ||
+ | |||
+ | Additionally a factory class like the LCSExampleFactory is needed. The class is derived from cmFactoryBase and is used in the DSX applications to create the correct instantiation of a LCS algorithm class object from the description string that is chosen | ||
+ | |||
+ | < | ||
+ | '' | ||
+ | </ | ||
+ | |||
+ | The CM_CREATE_CREATE_FUNCTION macro (defined in cmFactoryBase.h) is used to create the static functions that the factory uses to create the algorithm class objects and is used as follows: | ||
+ | |||
+ | < | ||
+ | '' | ||
+ | </ | ||
+ | |||
+ | In the constructor of the factory class the various algorithm classes are registered: | ||
+ | |||
+ | < | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | '' | ||
+ | |||
+ | %%//%% register built-in classes | ||
+ | **MyTransform** lcs_algo = **MyTransform**:: | ||
+ | this-> | ||
+ | lcs_algo-> | ||
+ | lcs_algo-> | ||
+ | 0, | ||
+ | cmObjectFactoryCreate**MyTransform**); | ||
+ | lcs_algo-> | ||
+ | |||
+ | '' | ||
+ | </ | ||
+ | |||
+ | **NOTE:** Depending on the situation, each factory uses either the string returned with // | ||
+ | |||
+ | **NOTE:** Ignore the warning C4275: non dll-interface class ' | ||
- | | DSX SDK Software Requirements | + | === Debugging your code === |
- | |In order for the generated dll files to work properly with the DSX applications they need to be compiled and build with the same compiler that is used for DSX Suite. Currently this is: **Microsoft Visual Studio 2019**.\\ \\ In order to debug the newly developed | + | |
- | | Downloading | + | Debugging code created with the DSX SDK requires |
- | |C-Motion software is all downloaded over the Internet at [[https:// | + | |
- | | Installing the DSX SDK | | + | **NOTE: |
- | |When you run the executable file that you downloaded you will be guided though | + | |
- | | Use of the DSX SDK | | + | ==== Including your dll in DSX applications ==== |
- | |The easiest way to get started is to copy the contents of the //Example// folder in the SDK installation folder to a location where you have write permission. The names of the three *.vcxproj files can be changed in Windows Explorer (e.g. into MyDll.vcxproj, | + | |
- | | Debugging your code | | + | The DSX applications need to know in which folder to look for your dll file. To accomplish this create an environment variable |
- | |Debugging code created with the DSX SDK requires the DSX Suite to be installed as well. Because the applications | + | |
- | | Including your dll in DSX applications | + | {{: |
- | |The DSX applications need to know in which folder to look for your dll file. To accomplish this create an environment variable **CM_DSX_USER_DIR** that points to this folder.\\ \\ {{: | + | |
other/dsx/software_development_kit.1721229701.txt.gz · Last modified: 2024/07/17 15:21 by sgranger