added region of interest computation, including proper handling of dont care regions