#Stop = time.clock()
	#Elapsed = Stop - Start # in seconds
	#ListTime.append(Elapsed)
	 
	
	
	## Loop over final hits to generate ROI, result table... ###
	for hit in Hits_AfterNMS: 
		
		if Bool_SearchRoi: # Add the offset of the search ROI
			hit['BBox'] = (hit['BBox'][0]+dX, hit['BBox'][1]+dY, hit['BBox'][2], hit['BBox'][3])  
		 
		if add_roi: 
			roi = Roi(*hit['BBox']) 
			roi.setName(hit['TemplateName']) 
			roi.setProperty("Score",  str(hit["Score"]) )
			roi.setPosition(i+1) # set slice position 
			rm.add(None, roi, i+1) # Trick to be able to set slice when less images than ROI. Here i is an digit index before the Roi Name 
			 
		if show_table: 
			Xcorner, Ycorner = hit['BBox'][0], hit['BBox'][1] 
			Xcenter, Ycenter = CornerToCenter(Xcorner, Ycorner, hit['BBox'][2], hit['BBox'][3]) 
			
			Dico = {'Image':ImName, 'Template':hit['TemplateName'] ,'Xcorner':Xcorner, 'Ycorner':Ycorner, 'Xcenter':Xcenter, 'Ycenter':Ycenter, 'Score':hit['Score']} 
			if add_roi:
				Dico['Roi Index'] = rm.getCount()
				AddToTable(Table, Dico, Order=("Image", "Template", "Score", "Roi Index", "Xcorner", "Ycorner", "Xcenter", "Ycenter")) 
			else:				
				AddToTable(Table, Dico, Order=('Image', 'Template', 'Score', 'Xcorner', 'Ycorner', 'Xcenter', 'Ycenter')) 
			
			Table.show("Results")