

Quick Start
===========

Before using the software, make sure the directory contains the input image (in PGM P5 format).


Installation
============

The software requires the installation of GSL (GNU Scientific Library) in the system.
Download gsl-2.1.tar.gz from http://www.gnu.org/software/gsl/.
Go to the folder, where gsl-2.1.tar.gz is downloaded, and run from terminal:

$ tar -zxvf gsl-2.1.tar.gz

$ cd gsl-2.1
$ ./configure
$ make
$ make check
$ make install

Open the .bashrc file from home directory and add the following lines, or run from terminal:

$ LD_LIBRARY_PATH=/usr/local/lib
$ export LD_LIBRARY_PATH

On Unix systems with 64-bit, read-write-execute permission is to be given to the "rprcm" by
running the command:

$ chmod 777 rprcm


Examples
========

If the name of the input file is "01.pgm" and the desired number of output image classes is 2,
the software runs as:

$ ./rprcm -f 01.pgm -c 2

If a mask image, i.e. a binary image, where Region of Interest is marked as white (or any
non-zero value) and background is marked as black (or zero value), is available, the software
runs as:

$ ./rprcm -f 01.pgm -m 01-mask.pgm -c 2

The software applies Otsu thresholding algorithm for initial segmentation. In case,
initial class label information is provided as an input to the algorithm, it should
be provided inside the TXT file "01-cls2-init_label.txt". In the initial class
label file, the pixels outside the region of interest are labeled as -1. In this
case, the software runs as:

$ ./rprcm -f 01.pgm -c 2 -p

Important Notes
===============

For HEp-2 cell image segmentation, the mask image is not required. The number of
image classes, in this case, should be given as 2.

For Brain MR Image segmentation, the mask image is necessary to discard non-brain
tissue classes (like skull and scalp) from consideration. In this case, the number
of image classes should be given as 3.

(In case, initial class label information is not provided)
$ ./rprcm -f pn0_rf0-088.pgm -m pn0_rf0-088-mask.pgm -c 3

(In case, initial class label information is provided as an input)
$ ./rprcm -f pn0_rf0-088.pgm -m pn0_rf0-088-mask.pgm -c 3 -p

In case, the mask image is not available for Brain MR Image segmentation, the
number of image classes should be given as, at least 4.


