added ability to compute moments disregarding internal contours.
Added getextremes and getcentroid functions!