Updated Code

Updated template fitting and filtering code using example segemented
images.