Skip to content

Code_Snippets

CellDynamics edited this page Oct 15, 2017 · 8 revisions

Code snippets and coding rules..

Exception logging

Refer to wiki page for details about external configuration of logger.

Debug

Use QuimP.SUPER_DEBUG to enable additional (usually time consuming) debug:

if (QuimP.SUPER_DEBUG) { // save intermediate results
      LOGGER.debug("Saving intermediate results");
      String tmpdir = System.getProperty("java.io.tmpdir") + File.separator;
      IJ.saveAsTiff(new ImagePlus("", fg1), tmpdir + "fg1_QuimP.tif");
      IJ.saveAsTiff(new ImagePlus("", bg1), tmpdir + "bg1_QuimP.tif");
    }

Then, in e.g. runner code set:

  static {
    System.setProperty("logback.configurationFile", "quimp-logback.xml");
    System.setProperty("quimpconfig.superDebug", "true");
  }

or in runner configuration in Eclipse:

-ea
-Dlogback.configurationFile=quimp-logback.xml
-Dquimpconfig.superDebug=true

QuimP home page is here

QuimP Wiki pages

Developer zone

Clone this wiki locally