Removed and corrected unnecessary define.
if specified roi, now should return image wise coordinates.
Added comments for functions and their arguments.