\chapter{Mona2D Programs}
\newcommand\tabstart{\begin{tabular}{|p{0.12\columnwidth}|p{0.04\columnwidth}|p{0.1\columnwidth}|p{0.449\columnwidth}|p{0.1\columnwidth}|}
\hline}
\newcommand\tabend{\end{tabular}}
\newcommand\optinfile{--in-file & -i & string & input file name & (none) \\\hline}
\newcommand\optreffile{--ref-file & -r & string & reference file name & (none) \\\hline}
\newcommand\optoutfile{--out-file & -o & string & output file name & (none) \\\hline}
\newcommand\optoutbase{--out-base & -o & string & output file name base - a number and the type name will be added automatically& (none) \\\hline}
\newcommand\opttypetwod{--type & -t & string & output image file type (see Table \ref{tab:2dformats}) & png \\\hline}
\newcommand\opttypetwodb{--type & -t & string & output image file type (see Table \ref{tab:2dformats}) & exr \\\hline}
\newcommand\opttypethreed{--type & -t & string & output image file type (see Section \ref{tab:3dformats}) & vista \\\hline}
\newcommand\opthelpplugin{--help-plugins & & & print out all plugins and a short description & \\\hline}
This chapter lists all the software tools provided by mona2D.
The descriptions follow a designated pattern:
\begin{description}
\item [Program:]\emph{the command line program name}
\item [Description:]A description of the program
\item [Remarks:] additional notes
\item [Options:] list of options
\tabstart
long name & short name & value type & description of the parameter & default value\\
\hline
\tabend
\noindent
If no value type is given, then the option accepts no further parameter.
All programs support the following options:
\tabstart
--help & -? & & Print out some help & \\\hline
--usage & & & Print out a short help & \\\hline
--version & -v & & Print out version information & \\\hline
--copyright & & & Print out copyright information & \\\hline
--verbose & -V & string & set the verbosity of the output out of \{ debug, message, warning, fail, error, fatal\} & error \\\hline
\tabend
\end{description}
Input from and output to a variety of 2D and 3D file formats is implemented. Note, however, only binary and gray scale data is supported.
\begin{table}[h]
\caption{\label{tab:2dformats}2D image formats}
\centering{
\begin{tabular}{|l|l|c|}
\hline
File type description & on the web & suffix \\\hline
Windows Bitmap & http://www.daubnet.com/formats/BMP.html & bmp \\\hline
Portable Network Graphics & http://www.libpng.org & png \\\hline
Tagged Image File format & http://www.remotesensing.org/libtiff/libtiff.html & tif \\\hline
\end{tabular}
}
\end{table}
\begin{table}[h]
\caption{\label{tab:3dformats}3D image formats}
\centering{
\begin{tabular}{|l|l|c|}
\hline
File type description & on the web & suffix \\\hline
INRIA 3D File format &http://foveaproject.free.fr/softwareEng.html & inria \\\hline
Medical Imaging NetCDF & http://www.bic.mni.mcgill.ca/software/minc/ & mnc \\\hline
Sun TAAC Image File Format & & vff \\\hline
Vista File Format & http://www.cs.ubc.ca/nest/lci/vista/vista.html & v \\\hline
\end{tabular}
}
\end{table}
\section{Image Filtering}
\begin{description}
\item [Program:]\emph{eva-2dimagefilter}
\item [Description:]A 2D image filtering program. Supported filters are described in Section \ref{sec:plugins}.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypetwod
\opthelpplugin
\tabend
\item [Example:] Filtering an \texttt{input.png} with a median filter and anisotropic filtering and writing the output to \texttt{output.bmp},
thus converting the image to the Microsoft bitmap format after filtering.
\begin{lstlisting}
eva-2dimagefilter -i input.png -o output.bmp -t bmp \
median:w=3 aniso:iter=1000,psi=pm1
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:]\emph{eva-2dimagefilterstack}
\item [Description:]A 2D image filtering program that filters a series of images that are numbered consecutively.
Supported filters are described in Section \ref{sec:plugins}.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutbase
\opttypetwod
\opthelpplugin
\tabend
\item [Example:] Filtering images of the pattern \texttt{input0000.png} with a median filter and anisotropic
filtering and writing the output to \texttt{outputXXXX.bmp}, thus converting the image to the Microsoft
bitmap format after filtering.
XXXX represents the slice numbers that correspond to the input image slice numbers.
The number of digits corresponds to the number of digits in the input image file names.
\begin{lstlisting}
eva-2dimagefilterstack -i input0000.png -o output -t bmp \
median:w=3 aniso:iter=1000,psi=pm1
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:]\emph{eva-2dstackfilter}
\item [Description:]A 3D image filtering program that filters a series of images that are numbered consecutively.
the filters are applied as if the single images where slices of a 3D volume data set. i.e. the filters
are applied in a real 3D manner.
Supported filters are described in Section \ref{sec:2dstackfilters}.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypetwod
\opthelpplugin
\tabend
\item [Example:] Filtering images of the pattern \texttt{input0000.png} with a median filter and anisotropic
filtering and writing the output to \texttt{outputXXXX.bmp},
thus converting the image to the Microsoft bitmap format after filtering.
The number of digits corresponds to the number of digits in the input image file names.
\begin{lstlisting}
eva-2dfilterstack -i input0000.png -o output -t bmp \
median:w=3 aniso:iter=1000,psi=pm1
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-croproi }
\item [Description:] Selects a region of interest based on an intensity threshold from a stack of images.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypetwod
--br-thresh & -T & integer & background intensity threshold & 1 \\\hline
--borderwidth & -b & integer & width of the border to be preserved around the no-background area & 2 \\\hline
\tabend
\item [Example:] Crop a set of images by assuming all intensities below 10 are background, and a borderwidth of 4:
\begin{lstlisting}
eva-croproi -i input0000.png -o output%04d.png -T 10 -b 4
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-disttrans3d}
\item [Description:] Create a 3D distance map from a stack of binary images (white=object).
If the output images are stored in float format (currently only supported by the EXR format), then the scale parameter is ignored.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypetwodb
--scale & -s & float & fixed point scaling factor, corresponds to the --scale parameter of \emph{eva-distance2d} & 256 \\\hline
--self-test & & perform a self-test of the algorithm & \\\hline
\tabend
\item [Example 1:] create the distance transform images of input0000.png ... input0200.png and store the Euclidian distance scaled by a factor of 32
in dist0000.png ... dist0200.png
\begin{lstlisting}
eva-disttrans3d -i input0000.png -o dist -s 32
\end{lstlisting}
\item [Example 2:] create the distance transform images of input0000.png ... input0200.png and store the Euclidian distance as float values
dist0000.exr ... dist0200.exr
\begin{lstlisting}
eva-disttrans3d -i input0000.png -o dist -t exr
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-distance3d}
\item [Description:] evaluate the distances of a point set described by a stack of binary \emph{input} images to a point set defined by a stack of binary
\emph{reference} images. The output is a list of point coordinates plus distances given as a plain text file.
\item [Remarks:] It is required, that the input images and the reference images are of the same xy-size. However, it is not requred, that
th enumber of input images and reference images are equal.
It is only assumed that the z coordinate encoded in the image file name of \emph{input} and \emph{reference} images correspond.
\item [Options:] $\:$
\tabstart
\optinfile
\optreffile
\optoutfile
--self-test & & perform a self-test of the algorithm & \\\hline
\tabend
\item [Example:] Evaluate the distance of the points given in the image set image0000.png, \ldots to the point set given in the image set ref0000.png and
store the result in the text file distances.txt
\begin{lstlisting}
eva-disttrans3d -i image0000.png -r ref0000.png -o distances.txt
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-downscale3d}
\item [Description:] Downscaling of a stack of images in a real 3D manner
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypetwod
--size & -s & vector of integer & target 3D image size & 256,256,256 \\\hline
\tabend
\item [Example:]
\end{description}
\begin{description}
\item [Program:] \emph{eva-remap}
\item [Description:] apply k-means cluster values to an image
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--map & -m & string & k-means mapping file name & (none) \\\hline
--split & -s & & split the input file into a bit-file per class & \\\hline
\tabend
\item [Example:] Map the intensities of image \texttt{input.png} by using map \texttt{kmeans.txt} and write result to \texttt{mapped.png}.
\begin{lstlisting}
eva-remap -i input.png -m kmeans.map -o mapped.png
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-segment2d}
\item [Description:] a 2D fuzzy c-means segmentation with possible background field correction
\item [Remarks:] The bias field correction doesn't do work on tooth images.
Without it, it is better to use eva-cmeans on the histogram and remap the probabilities later.
Since the output probabilities are written to one file, the output format has to support multiple images per file (TIFF does).
This is not yet checked at runtime.
Since not all slices of an image stack contain all tissues, this program is not suited for doing real segmentations.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--no-of-classes & -a & integer & number of classes & 3 \\\hline
--bias-correct & -b & & apply bias field correction & \\\hline
--class-centres & -c & vector of float & initial class centers & \\\hline
--spread & -s & float & spread parameter describing the strength of tissue distinction & 64 \\\hline
\tabend
\item [Example:] Segment an image \texttt{input.tif} by using the standard parameters but show some processing output.
\begin{lstlisting}
eva-segment2d -i input.tif -o output.tif -V message
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-segment2dahmed}
\item [Description:] The modified fuzzy c-means algorithm described in \citet{ahmed02:cmeans}
\item [Remarks:] See \emph{eva-segment2d}.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--no-of-classes & -a & integer & number of classes & 3 \\\hline
--bias-correct & -b & & apply bias field correction & \\\hline
--class-centres & -c & vector of float & initial class centers & \\\hline
--neighbour & -n & string & a neighbourhood filter to smooth the segmentation & wmean:hw=1 \\\hline
--spread & -s & float & spread parameter describing the strength of tissue distinction & 64 \\\hline
\tabend
\item [Example:] Segment an image \texttt{input.tif} by using the standard parameters but show some processing output.
\begin{lstlisting}
eva-segment2dahmed -i input.tif -o output.tif -V message
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-segment3d}
\item [Description:] A 3D implementation of \emph{eva-segment2ddahmed}
\item [Remarks:] Without bias-fild corrections and filtering this programs boils down to a
memory-intensive version of \emph{eva-cmeans}.
Don't use it.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--no-of-classes & -a & integer & number of classes & 3 \\\hline
--bias-correct & -b & & apply bias field correction & \\\hline
--class-centres & -c & vector of float & initial class centers & \\\hline
--neighbour & -n & string & a neighbourhood filter to smooth the segmentation & (none) \\\hline
--spread & -s & float & spread parameter describing the strength of tissue distinction & 64 \\\hline
\tabend
\item [Example:] Segment an image \texttt{input.v} by using the standard parameters but show some processing output.
\begin{lstlisting}
eva-segment2dahmed -i input.v -o output.v -V message
\end{lstlisting}
\end{description}
\section{3D/2D image conversion}
\begin{description}
\item [Program:]\emph{eva-3dto2dimage}
\item [Description:]convert a 3D data set into a stack of 2D images
\item [Remarks:] The numbering of the output files starts with 0000 and numbers up to 9999 are supported.
The file name suffix is the same as the output type.
\item [Options:] $\:$
\tabstart
\optinfile
--out-basename & -o & string & output file name base & basename \\\hline
\opttypetwod
\tabend
\item [Example:] Convert a \emph{3D Sunraster} file \texttt{input.vff} to a set of \emph{Tagged Image File Format}
(TIFF) files \texttt{outputXXXX.tif}.
\begin{lstlisting}
eva-3dto2dimage -i input.vff -o output -t tif
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-raw2volume}
\item [Description:] convert raw image data to volume data
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--repn & -r & string & input pixel type & short \\\hline
--big-endian & -b & & set flag if input data is big endian & \\\hline
--size & -s & vector of integer & size of input NX,NY,NZ & 1,1,1 \\\hline
--scale & -f & vector of float & scale of input voxels FX,FY,FZ & 1.0,1.0,1.0 \\\hline
\opttypethreed
\tabend
\item [Example:] Convert a raw volume data set \texttt{input.dat} of size 260,260,400 with a voxel
size of 2.0,1.0,1.5 and big endian 16 bit integers to a vista image \texttt{output.v}
\begin{lstlisting}
eva-raw2volume -i input.dat -o output.v -s 260,260,400 -f 2.0,1.0,1.5 -b -r short
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-imagestackto3d}
\item [Description:] convert a stack of images to a 3D file
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\opttypethreed
\tabend
\item [Example:] Convert a stack of 2D images of pattern \texttt{input0000.png} to a SunRaster 3D file \texttt{output.vff}:
\begin{lstlisting}
eva-imagestackto3d -i input0000.png -t vff -o output.vff
\end{lstlisting}
\end{description}
\section{Image Analysis}
\begin{description}
\item [Program:] \emph{eva-count-pixels}
\item [Description:] This program takes a stack of binary images, counts the white pixels and writes the result to stdout.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
--pattern & -p & string & input file pattern given as C-format string & \\\hline
--start & & int & input start range for pattern & 0 \\\hline
--end & & int & input end range for pattern & 65535 \\\hline
--edge-length & 'e' & float & (homogenous) edge length of a voxel & 1.0 \\\hline
\tabend
\item [Example:] Count the pixels of the files from number 10 to 30 with pattern \texttt{enamel\%04d.png}, e.g. the result of enamel segmentation.
\begin{lstlisting}
eva-count-pixels -p enamel%04d.png --start 10 --end 30
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-distance2d }
\item [Description:] Evaluate the distance of an image to a reference which is given as a distance field produced by the plugin \emph{distace} (Section \ref{sec:distance}).
The result is written to \texttt{stdout}.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
--distance-file & -d& distance image file & \\\hline
--scale & -s & float & fixed point scaling factor, the standart value corresponds to the
scaling used by the distance transform plugin and \emph{eva-disttrans3d}& 256.0 \\\hline
--method & -m & string & distance measuring method (avg, max) & avg \\\hline
\tabend
\item [Example 1:] evaluate the distace of image \texttt{border.png} based on the distance image \texttt{refborder-distfield.png}:
\begin{lstlisting}
eva-distance2d -i border.png -d refborder-distfield.png
\end{lstlisting}
\item [Example 2:] evaluate the distace of image \texttt{border.png} to the reference border image \texttt{ref-border.png}
\begin{lstlisting}
eva-2dimagefilter -i ref-border.png -o refborder-distfield.png distance
eva-distance2d -i border.png -d refborder-distfield.png
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-intensity-projection}
\item [Description:] Evaluate an intensity projection of a image stack along the three orthogonal axis.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutbase
\opttypetwod
--op & -p & string & type of projection (average|max) & max \\\hline
\tabend
\item [Example:] Evaluate the maximum intensity projection of the files stack \texttt{tooth756\_0000.tif} and write it to \texttt{project\_axial.png},
\texttt{project\_coronal.png}, and \texttt{project\_saggital.png}.
\begin{lstlisting}
eva-intensity-projection -i tooth756_0000.tif -o project -t png -p max
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-multihisto }
\item [Description:] Evaluate the histogram of a stack of images and writes a suggested backgound threshold to stdout.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--single & -s & & override the number pattern and evaluate histogram of only the single image given at the command line & \\\hline
\tabend
\item [Example:] Evaluate the histogram of \texttt{tooth756\_0000.tif} and write the histogram to \texttt{histo.dat}.
\begin{lstlisting}
eva-imagestackto3d -i tooth756_0000.tif -o histo.dat
\end{lstlisting}
\end{description}
\section{Histogram processing}
These programs read from stdin and write to stdout. Therefore, the histogram and output should be piped.
\begin{description}
\item [Program:]\emph{eva-cmeans}
\item [Description:]fuzzy c-means algorithm for histograms
\item [Remarks:] Usually, it is a good idea to set the verbosity to \emph{message} in order to see, how well the classification works.
If two class centers converge to the very same value, it is best to increase the k-value.
\item [Options:] $\:$
\tabstart
--class-centers & -c & vector of float & initial class centers, values >1.0 refere to absolute intensities,
values <1.0 refere to values relative to the histogram size & \\\hline
--even-start & -e & & distribute the class centers evenly over the histogram, prior to processing (use instead of option -c)& \\\hline
--variance & -k & float & variance parameter, describes how well the clusters are seperated & 32 \\\hline
--max-iter & -m & integer & maximum number of iterations & 100 \\\hline
--nclasses & -n & integer & number of classes, don't use this with the -c option, because there, the number is given implicitely & 3 \\\hline
\tabend
\item [Example:] Cluster Histogram \texttt{histo.dat} into 3 classes with initially given centers and write the result to \texttt{cmeans.txt}.
\begin{lstlisting}
eva-cmeans <histo.dat -c 0,13000,32000 >cmeans.txt
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-kmeans}
\item [Description:] The k-meams algorithm for histograms
\item [Remarks:]
\item [Options:] $\:$
\tabstart
--even-start & -e & & distribute the class centers evenly over the histogram, prior to processing (use instead of option -c)& \\\hline
--max-iter & -m & integer & maximum number of iterations & 100 \\\hline
--nclasses & -n & integer & number of classes, don't use this with the -c option, because there, the number is given implicitely & 10 \\\hline
\tabend
\item [Example:] Cluster the histogram \texttt{histo.dat} into 12 classes, start evenly and write the result to \texttt{kmeans.txt}.
\begin{lstlisting}
eva-kmeans <histo.dat -c 12 -e >kmeans.txt
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-labelsort}
\item [Description:] Sort the histogram, and output a remapping map
\item [Remarks:]
\item [Options:] This program doesn not support further options.
\item [Example:] Sort the histogram \texttt{histo.dat} and write the mapping table to \texttt{map.txt}.
\begin{lstlisting}
eva-labelsort <histo.dat >map.txt
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-anahisto.py}
\item [Description:] Evaluate mean, median, and standart deviation of a histogram
\item [Remarks:] Requires Python to be installed
\item [Options:] This program doesn not support further options.
\item [Example:] Read the histogram \texttt{histo.dat} and write the results to stdout
\begin{lstlisting}
eva-anahisto.py <histo.dat
\end{lstlisting}
\end{description}
\section{Image Combination}
\begin{description}
\item [Program:]\emph{eva-border2d}
\item [Description:]Dilates two bit images and evaluates the overlap of the results. This can be used to evaluate boundaries.
\item [Options:] $\:$
\tabstart
--file1 & -1 & string & input image 1 & (none) \\\hline
--file2 & -2 & string & input image 2 & (none) \\\hline
\optoutfile
\opttypetwod
--dilate & -d & string & dilate mask (see Section \ref{sec:2dshapes}) & 4n \\\hline
\tabend
\item [Example:] Dialate image enamel.png and dentine.png with the 4-neighbourhood mask, evaluate the overlap, and store the result in border.png
(See Figure \ref{fig:border2d}).
\begin{lstlisting}
eva-border2d -1 test1.png -2 test2.png -d 4n -o border.png
\end{lstlisting}
\end{description}
\noindent
\colorbox{listinggray}{
\\[\intextsep]
\begin{minipage}{\linewidth}
\centering{\vspace{5mm}
\resizebox{0.3\columnwidth}{!}{\includegraphics{examples/enamel.png}}
\resizebox{0.3\columnwidth}{!}{\includegraphics{examples/dentine.png}}
\resizebox{0.3\columnwidth}{!}{\includegraphics{examples/border.png}}
\figcaption{\label{fig:border2d} From left to right: enamel.png, dentine.png, and border.png as result of eva-border2d}
}
\end{minipage}
\\[\intextsep]
}
\begin{description}
\item [Program:]\emph{eva-combineimages}
\item [Description:]Evaluates the pixel-wise logical combination of two bit-valued images.
\item [Options:] $\:$
\tabstart
--file1 & -1 & string & input image 1 & (none) \\\hline
--file2 & -2 & string & input image 2 & (none) \\\hline
--op & -p & string &logical operation (and|or|xor|nand|nor|nxor), ses also Figure \ref{fig:combine} & and \\\hline
\optoutfile
\opttypetwod
\tabend
\item [Example1:] Evaluate the areas that do not overlap from images test1.png and test2.png
\begin{lstlisting}
eva-combineimages -1 test1.png -2 test2.png -p xor -o diff.png
\end{lstlisting}
\item [Example2:] Evaluate the unmasked reminder of two images - e.g. to evaluate the dentine, if background and enamel masks are given:
\begin{lstlisting}
eva-combineimages -1 enamel.png -2 background.png -p nor -o dentine.png
\end{lstlisting}
\end{description}
\noindent
\colorbox{listinggray}{
\\[\intextsep]
\begin{minipage}{\linewidth}
\centering{\vspace{5mm}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/circle.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/square.png}}
\vspace{2mm}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/and.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/or.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/xor.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/nand.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/nor.png}}
\resizebox{0.15\columnwidth}{!}{\includegraphics{examples/nxor.png}}
}
\figcaption{\label{fig:combine} Top row: original binary images.
Bottom row f.l.t.r: Result by applying and, or, xor, nand, nor, nxor.
}
\end{minipage}
\\[\intextsep]
}
\begin{description}
\item [Program:] \emph{eva-maskdentine}
\item [Description:] Given two input masks $A$ and $B$ of an image area $\Omega$, evaluate the mask $C:= \Omega \ (A \cup B)$.
\item [Remarks:] Obsolete, use \emph{eva-combineimages -p nor} instead.
\item [Options:] $\:$
\tabstart
--file1 & -1 & string & input image 1 & (none) \\\hline
--file2 & -2 & string & input image 2 & (none) \\\hline
\optoutfile
\opttypetwod
\tabend
\item [Example:] Evaluate the unlabeled pixels from \texttt{enamel.png} and \texttt{bg.png} and write it to \texttt{dentine.png}.
\begin{lstlisting}
eva-maskdentine -1 enamel.png -2 bg.png -o dentine.png
\end{lstlisting}
\end{description}
\section{Composition}
\begin{description}
\item [Program:] \emph{tiff-compose}
\item [Description:] Compose a colour image from a TIFF files that contains three grey scale images.
\item [Remarks:]
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
\tabend
\item [Example:] Create a colour \texttt{colormap.tif} image from a segmentation \texttt{segmented.tif}.
\begin{lstlisting}
tiff-compose -i segmented.tif -o colormap.tif
\end{lstlisting}
\end{description}
\begin{description}
\item [Program:] \emph{eva-prob2color}
\item [Description:] reads an image and a probability map and generates a color
image displaying the probabilities of the classes dentine, enamel
and background - assuming the probability map has only three classes.
\item [Remarks:] So far this program only writes TIFF images.
\item [Options:] $\:$
\tabstart
\optinfile
\optoutfile
--map & -m & string & probability map file name & (none) \\\hline
\tabend
\item [Example:] Read an inpt image \texttt{original.png}, apply a probability map obtained from \emph{eva-cmeans}
\texttt{cmeans.txt} and write it to \texttt{colormap.tif}
\begin{lstlisting}
tiff-compose -i original.png -m cmeans.txt -o colormap.tif
\end{lstlisting}
\end{description}
\section{Miscellaneous}
\begin{description}
\item [Program:] \emph{eva-filenumber-pattern}
\item [Description:] writes out a number pattern for a given file name.
This is useful for scripts that may be able to handle differently formated numbered image stacks.
\item [Remarks:] Currently, the file has to exist.
\item [Example:] Print the numbering pattern of \texttt{file00012.png}, this will write out \texttt{00000}.
\begin{lstlisting}
eva-filenumber-pattern file00012.png
\end{lstlisting}
\end{description}