Heimdali’s overview

Heimdali is a set of commmand line tools to perform Image processing tools, based on ITK and HDF5

User guide

Installation

The recommanded way to install Heimdali is using the Conda package manager.

Conda installation

Download the Python 2.7 version of miniconda corresponding to your plateform from http://conda.pydata.org/miniconda.html

Execute the downloaded file: this will install the Conda package manager.

Add the dfroger binstar channel to your config:

conda config --add channels https://conda.binstar.org/dfroger

Heimdali installation

Install the heimdali package in a environment called heim or whather name you want:

conda create -n heim heimdali

Activate the environment:

source activate heim

Your are ready to use Heimdali.

Test Heimdali installation

Download some input data to test:

git clone https://github.com/dfroger/heimdali-data

Execute the par command:

par heimdali-data/imtest_z5_y4_x3_c2.h5

Heimdali update

You can update Heimdali when a new version is released:

conda update heimdali

You may also want to keep the currently installed Heimdali version, and install a new version in another Conda environment:

conda create -n heim0.1 heimdali==0.1.0

You can now switch between the two version of Heimdali:

source activate heim

or

source activate heim0.1

Format options

These are options describing the image format. There are used each time an image is created.

option description
-z N Number of planes
-y N Number of lines
-x N Number of pixel per line
-v N Number of value per pixel
-r Floating point values

par

par prints format parameters of images.

Synopsis

par  [--wr <output.txt>] [--x0] [--y0] [--z0] [-o] [-x] [-y] [-z] [--]
     [--version] [-h] <INPUT> ...

Description

par print on stdout in the file outout.txt, the format parameters of iamges given as arguments.

The –wr options can be given the special file names stdout and stderr. If the file name output.txt starts with >>, result are written at the end of the file.

If one or more options –x0 –y0 –z0 -x -y -z is given, par print the corresponding parameters, in the Format options. This allow to use par in command subsitution, as for example:

create image-copy.h5 `par -x -y image.h5` -r

If no options are given, all format parameters are printed for all images on argument.

h5toinr

h5toinr convert an HDF5 image into INRimage image.

Synopsis

h5toinr  [--] [--version] [-h] <inputFilename> <outputFilename>

inrtoh5

inrtoh5 convert an INRimage image into HDF5 image.

Synopsis

inrtoh5  [--] [--version] [-h] <inputFilename> <outputFilename>

Artithmetic operations

Arithmetic operations between two images element by element.

Synopsis

ad image0-in image1-in [image-out]
so image0-in image1-in [image-out]
mu image0-in image1-in [image-out]
di image0-in image1-in [image-out]
min image0-in image1-in [image-out]
max image0-in image1-in [image-out]

Description

All of these commands perform an operation between image0-in and image1-in and write result to image-out. If argument image0-in or image1-in is equal to -, the command reads on standard input. If argument image-out is absent, the command writes to standard output.

command description
ad Add two images
so Substract two images
mu Multiply two images
div Divide two images
min Compute minimum of two images
max Compute maximum of two images

All operation are performed on pixels element by element.

Description

See also Local artithmetic operations.

Local artithmetic operations

Heimdali API

Community

Developer guide

Build Heimdali in development mode

Create a conda enviromnent named heimdali containing all dependencies:

conda config --add channels http://conda.binstar.org/dfroger
conda create -n heimdali h5unixpipe itk tclap cmake pip

Install lettuce:

source activate heimdali
hash -r
pip install lettuce

Get Heimdali data files, and set HEIMDALI_DATA_DIR:

git clone https://github.com/dfroger/heimdali-data
export HEIMDALI_DATA_DIR=/path/to/heimdali-data

Build heidmali:

variable meaning
CONDA_ENV_PATH For example, ~/miniconda/envs/heimdali
CMAKE_PREFIX_PATH Where CMake will search for dependent libraries
CMAKE_INSTALL_PREFIX Where CMake will install Heimdali
.. Path to Heimdali main CMakeLists.txt
mkdir build
cd build
source activate heimdali
CONDA_ENV_PATH=$(conda info -e | grep '*' | tr -s ' ' | cut -d" " -f3)
cmake \
    -DCMAKE_PREFIX_PATH=$CONDA_ENV_PATH \
    -DCMAKE_INSTALL_PREFIX=$PWD/../install \
    ..
make
make install

Set up environment to search executables and libraries installed by CMake in heimdali/install (read the few notes in the script develop_heimdali_bash.sh):

source script/develop_heimdali_bash.sh

Execute the functional tests:

cd tests
lettuce

Indices and tables