Search in sources :

Example 1 with BatchRun

use of gdsc.smlm.ij.settings.BatchRun in project GDSC-SMLM by aherbert.

the class BatchPeakFit method saveRunSettings.

private String saveRunSettings(String prefix, String imageFilename, FitEngineConfiguration fitConfig) {
    BatchRun batchRun = new BatchRun(imageFilename, fitConfig);
    FileOutputStream fs = null;
    try {
        String settingsFilename = prefix + ".xml";
        fs = new FileOutputStream(settingsFilename);
        xs.toXML(batchRun, fs);
        return settingsFilename;
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    } catch (XStreamException e) {
        e.printStackTrace();
    } finally {
        if (fs != null) {
            try {
                fs.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    return null;
}
Also used : XStreamException(com.thoughtworks.xstream.XStreamException) FileOutputStream(java.io.FileOutputStream) FileNotFoundException(java.io.FileNotFoundException) IOException(java.io.IOException) BatchRun(gdsc.smlm.ij.settings.BatchRun)

Aggregations

XStreamException (com.thoughtworks.xstream.XStreamException)1 BatchRun (gdsc.smlm.ij.settings.BatchRun)1 FileNotFoundException (java.io.FileNotFoundException)1 FileOutputStream (java.io.FileOutputStream)1 IOException (java.io.IOException)1