added fiducial region
bug fix
added outfile
wrong assert
added extra macros to readDat