Using the ShapeWorks Matlab Interface
This example Matlab program demonstrates how to use the ShapeWorks Matlab interface via Java to perform the following tasks:
- Create a ShapeWorks project
- Generate Ellipsoids
- Add shapes to the project
- Set grooming parameters
- Set correspondence parameters
- Save/Load the project
- Run the ShapeWorks grooming pipeline
- Run the ShapeWorks correspondence optimization
- Launch the ShapeWorks Analysis GUI
Building the ShapeWorks Java Interface
The ShapeWorks Java interface is built using the Java Compiler. To build it:
cd shapeworks/Java
javac -d . *.java
This will place the compiled classes in the shapeworks/Java
directory.
Building the Example Java Program
cd shapeworks/Examples/Java
javac -cp ../../Java *.java
Running the Example Matlab Program
Note: The example Matlab program uses the Java interface and needs the paths to the ShapeWorks executables. Ensure that you update the paths in the start of the script.
Running the Example Matlab Program
From the Matlab terminal, run the following:
cd shapeworks/Examples/Matlab
javaaddpath('../../Java')
MatlabExample