##########
1) Objects
##########

general:
--------

GP thinks that it would nice that EBImage can seamlessly work with:
- Indexed images
- Gray levels images

And that there should be an automatic mapping between R primitives and these objects. 
EBImage has been written is this may but there are some cases where one have to cast, 
tweak the dimension or the mode to perform some operations.

The mapping could be the following:
- int, logi 2D-like arrays (matrices, 2D arrays or multi-dimensional arrays with an 
effective 2D dimension (e.g. dim(x)=c(1,1,2,1,5))) could map to Indexed images
- num 2D-like arrays map to Gray levels images

3D-like or nD-like should be also supported.

Binary images are just images with two indexes.

GP thinks it is misleading to have a color image object since it is a rendering task and 
not an image representation feature. A 3D matrix could be therefore seen as a RGB 
image or a set of gray images.

'filename' and 'compression slots of Image objects:
---------------------------------------------------
WH thinks that these shouldn't be slots of the Image class.  They are
not properties of an image, but rather of a saved file.  They should
be arguments to the 'writeImage' function, but nothing else
(otherwise, with the same logic, data.frames, matrices, etc.  could
have slots for 'filename' and 'separator character', which would be
just as odd).

'features' slot:
----------------
This shouldn't be a slot of the basic Image class, since it
corresponds to a rather specialized use case. For example, there could
be a derived class 'ImageWithFeatures' with that slot (and then some
validity checking that the list has the right length, contains the
right type and size of elements etc.)

'resolution' slot:
------------------
Again, this is a rather special use case, only applicable to
microscopy images of real-life objects. What's the resolution of an
image from a space telescope, a holiday picture, or pictures from a
CCTV camera on which you want to do novelty detection?

I think there is some value in allowing to store "tags" or image
attributes that were found e.g. in a TIFF file, or to add additional
ones by the user. For this, I would suggest just having a slot named
"tags" that is of type list, with arbitrary length, and its elements
can be, for example, list(resolution=2.5e6, units="ppi")

'colorMode':
-----------
Why is this sometimes spelt with uppercase 'M' (e.g. in accessor
functions) and sometimes with lowercase (e.g. in the 'Image' 
constructor and in the slotname)?  Both are exposed to users - 
and they might be happier about some more consistency.

'validity':
----------
There should be a validity method for Image objects. Currently it is 
possible to create invalid object e.g. with "new" that break e.g. the "show" 
method:

> a=new("Image")
> a

'Image'
  colorMode()   : Grayscale
  storage class : numeric 3D array, writable images in range [0..1]
Errore in if (dimobject[3] > 1) cat(sprintf("  dim()         : %dx%d, %d image(s)\n",  : 
  valore mancante dove è richiesto TRUE/FALSE

##########
2) Methods
##########

general:
-------
GP thinks that methods should be clearly sorted according to their level (low-level, high-level) 
depending on the genericity of their behavior and according to the field they 
belong to (i/o, displaying, linear filtering, morphological operations...).

Matlab's image toolbox is a good example of how an image processing toolbox should be.

'distmap':
---------
The function should check its argument 'x', verify that 'x' takes
   exactly two values, and then consider the larger one as foreground,
   the smaller one as background.

The result should NOT be 'floor'ed!

What exactly is this parameter 'bg' doing? Can we drop it? It seems
   odd to have it in this function.

What exactly is 'exact' doing? Do we need it? Can it get a more
   precise name, e.g. one that signifies that it controls the choice of the
   metric (L1 vs L2)?

Drop the parameter 't'. It is weird to convolute thresholding
   with this particular algorithm. If the function is called on an
   image with more than two values, then it should just throw an
   error, and not make up some thresholding.


'readImage':
-----------
Should be able to read color channels in a third dimension, without any options.
An attribute colordim should be added to the Image object to handle multidimensional color images.

