Table of Contents
Creating a V3D pipeline is a hard mission and requires a lot of technical and scientific knowledge. Manipulating an existing pipeline is not always easy and manipulating it dynamically and automatically via code is an even more complicated task. We introduce the MATLAB V3D wrapper package. This code package is aimed to create, and launch V3D pipelines using intuitive MATLAB commands, while offering the user dynamic change at each pipeline easily. This dynamic change can be used to iterate through subjects, and trials, change each trial model to fit small adjustments(changeMetric), and automate the whole process so an experiment can be processed through V3D to MATLAB tables using a single MATLAB script.
a good starting point will be by altering the example script.
C- motion - Visual-3D, licensed need to be instaled for launcing pipelines.
-
Clone the repo
git clone https://github.com/ItayCoifman/V3D_Matlab.git
-
set Path via matlab to the cloned project (with subfolders)
-
change path_V3D at the exmaple file to the relevant directory.
Optional – added features that can be added to the pipeline through the MATLAB command, for example, scaleModel(path_pipeLine, ‘path_staticTrial’,…), if the optional fields are not used, the pipeline will use the V3D default (typically it will pop up a window to choose the relevant file via the V3D GUI.
Model is declared by the path to the static trial, i.e., ‘path_staticTrial’ = ‘modelName’
createPipeLine(path_pipeLine) creates an empty pipeline, where all data is going to be stored in.
scaleModel(path_pipeLine) – creates a hybrid model, using ‘path_staticTrial’ (optional), apply scale on the template model ‘path_GenericModel’ (optional), sets model subject weight and height by using ‘subjectHeight’ and ‘subjectWeight’ (optional).
changeMetric(path_pipeLine,METRIC_NAME,METRIC_VALUE) – changes model metric using the Metric_Name. change the metric to Metric_Value. The change will be applied on ‘modelName’ (optional). *NOTE! If ‘modelName’ is not used, the metric change will be applied on the last model that was scaled. *NOTE! metric need to exist at the model.
addMotion(path pipeline, varargin) – add motion to the workspace and assign a biomechanical model ‘modelName’ (optional) to analyze it.
fixForcePlateData (path pipeline) – a lot of times small adjustments need to be applied to the force plate data, so V3D can work fine. Each lab will need to adjust this function to its force plate type, more info can be found here.
lowPassMotionCapture(path_pipeLine,'cutoff',cutOff) - apply V3D lowpass filter on MOCAP data, using ‘cutoff’(default -20Hz).
lowPassAnalog(path_pipeLine,'cutoff',cutOff) - apply V3D lowpass filter on MOCAP data, using ‘cutoff’(default -10Hz).
calculateJoint(path_pipeLine, functionName, jointName) function Names: 'JOINT_ANGLE','JOINT_MOMENT','JOINT_POWER','JOINT_VELOCITY' joints: 'hip','knee','ankle' direction (optional) defaults 'R', for left side calculations use 'L’.
exportMatFile(path_pipeLine)- export all relevant calculations for MATLAB files. Note! Right now, this function export, angels, angular velocity, moments, and powers of the right side of the lower extremity (hip, knee, ankle). This function needs to be more generalized to better fit the general case.
saveWorkSpace – save workspace.cmz, if ‘path’(optional), is used, the file can be saved with a specific name at a specific destination folder.
getV3DTabels(v3dData\ v3dPath) – utility function that read all the exportMatFile data and transfer it to MATLAB tables.
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/ItayCoifman/V3D_Matlab