Adds the brightness test to the EnergyFunctionTest.
Adds the working ImageWriter (test included).