From eabdfcf80a42b751cf6c92c44e20fc128cd25d16 Mon Sep 17 00:00:00 2001 From: Niko Ehrenfeuchter <nikolaus.ehrenfeuchter@unibas.ch> Date: Mon, 7 Jan 2019 17:37:04 +0100 Subject: [PATCH] Re-activate logging in imagej.projections and imagej.shading --- src/imcflibs/imagej/projections.py | 7 ++++--- src/imcflibs/imagej/shading.py | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/imcflibs/imagej/projections.py b/src/imcflibs/imagej/projections.py index d8ccf2d..ab332f3 100644 --- a/src/imcflibs/imagej/projections.py +++ b/src/imcflibs/imagej/projections.py @@ -1,6 +1,7 @@ """Functions for creating Z projections.""" from .bioformats import export_using_orig_name +from ..log import LOG as log from ij.plugin import ZProjector @@ -18,7 +19,7 @@ def average(imp): ij.ImagePlus The result of the projection. """ - # log.debug("Creating average projection...") + log.debug("Creating average projection...") proj = ZProjector.run(imp, "avg") return proj @@ -36,7 +37,7 @@ def maximum(imp): ij.ImagePlus The result of the projection. """ - # log.debug("Creating maximum intensity projection...") + log.debug("Creating maximum intensity projection...") proj = ZProjector.run(imp, "max") return proj @@ -64,7 +65,7 @@ def create_and_save(imp, projections, path, filename, export_format): 'Sum': 'sum', } for projection in projections: - # log.debug("Creating '%s' projection..." % projection) + log.debug("Creating '%s' projection...", projection) proj = ZProjector.run(imp, command[projection]) export_using_orig_name(proj, path, filename, diff --git a/src/imcflibs/imagej/shading.py b/src/imcflibs/imagej/shading.py index 5f056af..eeaeff1 100644 --- a/src/imcflibs/imagej/shading.py +++ b/src/imcflibs/imagej/shading.py @@ -5,6 +5,7 @@ import os from ..imagej import bioformats from ..imagej import projections from ..pathtools import listdir_matching +from ..log import LOG as log from ij import IJ from ij.plugin import ImageCalculator, RGBStackMerge @@ -70,6 +71,7 @@ def correct_and_project(filename, path, model, proj, fmt): The file format suffix to be used for the results and projections, e.g. '.ics' for ICS2 etc. See the Bio-Formats specification for details. """ + log.debug("Processing [%s]...", filename) if not os.path.exists(path): os.makedirs(path) @@ -87,7 +89,7 @@ def correct_and_project(filename, path, model, proj, fmt): # corrected.show() corrected.close() - # log.debug("Done processing [%s]" % os.path.basename(in_file)) + log.debug("Done processing [%s].", os.path.basename(filename)) def process_folder(path, suffix, outpath, model_file, fmt): -- GitLab