Applications of dynamic programming and scan-rescan processes to nuclear medicine and tumor detection