# Computing Medial Surface To compile and run `skeltools` on compute canada (CC) clusters you first need to load two modules `itk` and `eigen`. The current version of skeltools works with `itk-5.4` and `eigen-3.4`. Before submitting a job to the cluster, ensure that you clone the reposity and compile the code.On CC clusters, there is no need to explicitly set the `ITK_DIR` variable in the `CMakeLists.txt` file, so it can be safetly commented out. Use the following commands to clone and compile skeltools on CC clusters: ```bash $ git clone https://github.com/HaaPut/skeltools.git $ cd skeltools $ sed -i '10s/^/#/' CMakeLists.txt $ mkdir -v build $ cd build $ module load itk/5.4 $ module load eigen/3.4 $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make -j ``` Create a job submission script (say `skel-job.sh`) based on the template below. Set the `account` variable to appropriate value and set `mail-user` to your email id. ```bash #!/bin/bash #SBATCH --account=def-pi #SBATCH --time=00:05:00 #SBATCH --ntasks=1 #SBATCH --cpus-per-task=8 #SBATCH --mem=8G #SBATCH --job-name=medial-surface #SBATCH --output=skeltools_%x_id_%j.log #SBATCH --mail-user=user@mail.ca #SBATCH --mail-type=ALL module load itk/5.4 module load eigen/3.4 ./skeltool -priority distance -surface -input ../data/dinosaur.tif -smooth 0.1 -fillholes -output ../results/dino_surface.tif -anchor aof -slow ``` Finally, submit the job using `sbatch` as follows ```bash $ sbatch skel-job.sh ```