This repository contains Matlab codes to import anonymised clinical cases in a shoulder database (shoulderDB), and update this database with complementary clinical, radiological, morphological, or biomechanical data. This project is a collaboration between Laboratory of Biomechanical Orthopedics of the Ecole Polytechnique Federal de Lausanne (EPFL-LBO), the ARTORG center of the University of Bern, the Orthopedic Service of the University Hospital of Lausanne (CHUV-OTR), and the Radiological Department of the University Hospital of Lausanne (CHUV-RAD).
Clone or download this repository. Open MATLAB, set the working directory to be the downloaded repository and run setup.m. This setup() function will create a config.txt file that is detailed below.
The base folder must contain a "config.txt" with the following fields:
- maxSCaseIDDigits: This is the maximum allowed number of digits in the SCase IDs.
With maxSCaseIDDigits = 3, 'P123' is a valid ID, 'P1234' is not valid.
- SCaseIDValidTypes: These are the allowed letters used as a prefix in the SCase IDs.
With SCaseIDValidTypes = 'NP', 'P123' is a valid ID, 'Z1234' is not valid.
- pythonDir: This is the path to the rotator cuff segmentation system.
- dataDir: This is the root path to the data used i.e. /shoulder/dataDev or /shoulder/data on lbovenus.epfl.ch
A full config.txt example for a system working on lbovenus.epfl.ch contains the four following lines:
maxSCaseIDDigits = 3 SCaseIDValidTypes = 'NP' pythonDir = '/shoulder/methods/python/rcseg' dataDir = '/shoulder/dataDev'
This is the default config file created by setup.m.
There are five main features within this system. Be sure to add this system's folders and subfolders to your MATLAB path.
Data are restricted to authorised users, in a dedicated EPFL server. The data related to a specific case can be accessed thanks to the ShoulderCaseLoader class. For example:
database = ShoulderCaseLoader(); SCase = database.loadCase('P527');
Will load the data related to the case 'P527' into the variable SCase. The function loadSCase() will do the same even more directly:
SCase = loadSCase('P527');
The ShoulderCaseLoader class features several other methods to access the data. To get the list of all the available cases run:
database = ShoulderCaseLoader(); SCaseList = database.getAllCasesIDs();
To load all the available cases in an cell array run:
database = ShoulderCaseLoader(); AllTheSCases = database.loadAllCases();
All the measured data are directly available in a loaded ShoulderCase's properties.
To observe and interact with a cases's data run:
database = ShoulderCaseLoader(); SCase = database.loadCase('P527'); SCase.plot();
To update the measured values of the shoulder cases use the function measureSCase(). Refer to the function's documentation for further informations.
To import new cases (basically add a CT-files folder at the right place) use the importSCase GUI. The importSCase code is located in the sub-directory importSCase. Its description is detailed there. It currently only work for Windows.
For a loaded SCase, you can have all of the measurements by calling SCaseDataToTable method of ShoulderCase.m as:
The result will be a table with all of the information and measurements for the SCase. Also you can have all of the information and measurements for all of the SCases by calling exportSCaseData function as:
The filename is your specified csv or excel file which all of the measurements will be exprted to it.
Should be added here:
- datastructure design
- class diagram
- ./anatomy contains scripts used by Amira manual measurements and what looks like deprecated scripts that are now part of the Scapula class.
- ./ShoulderCase contains the class and scripts used to update and access to the data. See here how are organized class files and folders.
- ./ImportSCase contains the GUI used to import new data into the database.
- ./Generated_Amira_TCL_Scripts used to store TCL scripts. Not tracked by git.
- ./log contains log files.
- ./XLS_MySQL_DB contains scripts used to read data in .xls files and write in SQL database.
- ./upsert contains a script to update and insert data in a database. Looks like it's an external not LBO-made feature.
- *config.txt* is mandatory.
- *csv2xlxSCase.m* Matlab script to transform CSV files into XLS files
- *dicominfoSCase.m* Matlab script used after new SCase importations. Check utility in ImportSCase SOP
- *listSCase.m* Matlab script that create a list of SCases. Deprecated, should be replaced by ShoulderCaseLoader methods everywhere.
- *loadDicomCTscan* Looks like a worksheet. Probably removable.
- *measureSCase.m* Matlab Script used to update data. (check SOP for more details)
- *openConfigFile.m* Deprecated, should be replaced by the ConfigFileExtractor methods everywhere.
- *openLogFile.m* Deprecated, should be replaced by the Logger methods everywhere.
- *plotSCase.m* Deprecated, should be replaced by ShoulderCase.plot() method everywhere.
- *statSCase.m* Statistical analysis on all the cases. Probably deprecated.
Current version is 1.0.5
- Alexandre Terrier, 2012-now
- Julien Ston, 2012-2014
- Antoine Dewarrat, 2014-2015
- Raphael Obrist, 2015-2017
- Killian Cosendey, 2017
- Valérie Malfroy Camine, 2017
- Jorge Solana-Muñoz, 2018-2019
- Bharath Narayanan, 2018
- Paul Cimadomo, 2018
- Lore Hoffmann, 2019
- Nathan Donini, 2019
- Benoit Delecourt, 2019
- Amirsiavosh Bashardoust, 2020
- Matthieu Boubat, 2019-now
EPFL CC BY-NC-SA 4.0 Int.