Compiled version of CERR - cerr/CERR GitHub Wiki

Compiling on your own

The first step is to download the "master" branch of CERR. This can be done using the git bash. After switching to the directory where you want to download the files, use the following command to download the "master" branch:

git clone [email protected]:cerr/CERR.git --branch master --single-branch

Any CERR routine can be compiled as follows:

% Add CERR to Matlab path
addpath(genpath('/path/to/CERR'))

% Location of target executable
compileDir = '/path/to/target_executable_dir';

% Additional dependencies not directly referencedin CERR software. These might have been invoked using the eval function.
dirS = dir(fullfile(getCERRPath,'Contouring/customProcessing/*.m'));
addFuncC = {dirS.name};

% To compile the DL segmentation wrapper
compile_func('runSegClinic.m',compileDir,addFuncC);

% To compile CERR GUI
compile_func('CERR.m',compileDir,addFuncC);

The above steps can also be performed from Matlab GUI as follows.

  1. Fire up Matlab. Go to the "Apps" tab at the top and click on "Application Compiler". This opens a new window.
  2. In the Application Compiler Window, select the "+" sign at the top and browse to the "CERR.m" file in the CERR directory:
  3. Wait for Matlab to automatically recognize and add the supporting files required for CERR to run.
  4. Once all the files are added, click on the "Package" button on the top right.
  5. Browse to where the compiled CERR is to be saved.
  6. Once the process completes, go back to the Matlab command window and execute the "copyDependenciesForCERR" passing the path of the compiled CERR directory selected in step #5: copyDependenciesForCERRCompile('/home/.../.../target_executable_dir')
  7. After the function is finished executing, navigate to the compiled CERR directory to find the resulting executables and files.

Here's a video of the entire process (View in full screen and HD):

Note that it might take a couple of minutes for the CERR GUI to load, if this is the first time you are invoking !CERR. Subsequent calls to the executable should be fast to load the GUI.

Deploying the compiled version

  1. Install the Matlab Component Runtime. This needs to be installed just once.
  2. Copy the compiled directory (e.g. '/home/.../.../target_executable_dir' created above) to the computer where CERR is to be deployed.