High-Performance Computing at the NIH
GitHub YouTube @nih_hpc RSS Feed
elastix on Biowulf & Helix

Description

elastix is a tool for (medical) image registration. It's based on the Insight Segmentation and Registration Toolkit (ITK).

There may be multiple versions of elastix available. An easy way of selecting the version is to use modules. To see the modules available, type

module avail elastix 

To select a module use

module load elastix/[version]

where [version] is the version of choice.

Environment variables set

Dependencies

Dependent modules are loaded automatically.

References

Documentation

Interactive job on Biowulf

Allocate an interactive session with sinteractive and use as shown below

biowulf$ sinteractive 
node$ module load elastix
[+] Loading Intel 2015.1.133 Compilers ...
[+] Loading elastix 4.8
node$ elastix --help
elastix version: 4.800

elastix registers a moving image to a fixed image.
The registration-process is specified in the parameter file.
  --help, -h displays this message and exit
  --version  output version information and exit
[...snip...]
node$ elastix -f fixedImage.ext \
                 -m movingImage.ext \
                 -out outputDirectory \
                 -p parameterFile.txt
node$ exit
biowulf$
Batch job on Biowulf

Create a batch script similar to the following example:

#! /bin/bash
# this file is elastix.sh

module load elastix || exit 1
elastix -f fixedImage.ext \
        -m movingImage.ext \
        -out outputDirectory \
        -p parameterFile.txt

Submit to the queue with sbatch:

biowulf$ sbatch elastix.batch
Swarm of jobs on Biowulf

Create a swarm command file similar to the following example:

# this file is elastix.swarm
elastix -f fixedImage.ext -m movingImage.ext -out outputDirectory1 -p parameterFile1.txt
elastix -f fixedImage.ext -m movingImage.ext -out outputDirectory2 -p parameterFile2.txt
elastix -f fixedImage.ext -m movingImage.ext -out outputDirectory3 -p parameterFile3.txt

And submit to the queue with swarm

biowulf$ swarm -f elastix.swarm