added headlessFlatten to jmFijiGen.py