public ELAReport elaCalculation() throws IOException { ELAReport elaReport = new ELAReport(); ELAExtractor elaExtractor; elaExtractor = new ELAExtractor(sourceFile); ImageIO.write(elaExtractor.displaySurface, "png", outputFile); ByteArrayOutputStream elabytes = new ByteArrayOutputStream(); ImageIO.write(elaExtractor.displaySurface, "png", elabytes); elaReport.map = outputFile.getCanonicalPath(); elaReport.maxValue = elaExtractor.elaMax; elaReport.minvalue = elaExtractor.elaMin; elaReport.completed = true; return elaReport; }