Added pet atlas based processing function. Also included were bug fixes.