/***
 *  PROJECT     :  Generation of Anatomical Models for Surgical Simulators (GAMSS)
 *  AUTHOR      :  Raimundo Sierra
 *  CONTACT     :  http://www.rsierra.com/?main=contact
 *  CREATED     :  21.03.2002
 *  CHANGED     :  
 *  DESCRIPTION :  Read arbitrary image files
 *
 *                 readColorImage returns an array of size rows*columns*3 with the RGB values
 *                 packed as RGBRGBRGB...RGB
 *
 *                 readGreyImage returns an array of size rows*columns with the grey levels
 *                 of the image
 *
 *                 the functions don't care if the original image is a color or greylevel
 *                 image, i.e. a greylevel image will return the same values for the RGB channels
 *                 or a color image will return it's greylevels if opened with readGreyImage
 *
 *                 values are always in the range [0..1]
 *
 *                 gamma correction might be needed if colors look different
 *                 then in other applications, try a value of 0.5
 *
 *  TODO        :    
 */

#ifndef _READIMAGES
#define _READIMAGES

#include <Magick++.h> 
#include <iostream.h> 
using namespace std; 
using namespace Magick; 

template<class T> T* readColorImage(const char * file, int &rows, int &columns, T *image,
                                    const float gamma=-1.0);
template<class T> T* readGreyImage(const char * file, int &rows, int &columns, T *image,
                                   const float gamma=-1.0);

void dummyReadImages();

#endif //_READIMAGES
